summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
AgeCommit message (Collapse)Author
2017-08-28swap ualea for urngJasper Lievisse Adriaanse
2017-08-12Use ctfstrip(1) by default to strip kernels.Martin Pieuchot
ok deraadt@, jasper@
2017-07-25change -Os to -Oz all around the treeRobert Nagy
clang optimizes better for size with -Oz so use that as a default to avoid overflowing the ramdisk floppies. gcc now accepts -Oz as an alias for -Os. ok kettenis@
2017-07-22Fix the various SIGSEGV and SIGBUS scenarios to match what we do onMark Kettenis
amd64/arm64/armv7/i386/sparc64. ok visa@
2017-07-18Stop automatically regenerating gap.o (and hence linking a new kernel)Theo Buehler
whenever make is issued. Only do this when there are actual source changes below /sys. This restores the behavior prior to the KARL implementation. Problem noticed and patiently explained by mpi implementation with a lot of help from espie ok mpi, espie, deraadt
2017-07-16Add WITNESS supportPhilip Guenther
ok visa@ kettenis@
2017-07-16Clear the framepointer (r3) in switch_trampoline to avoid faults in stack tracePhilip Guenther
Reduce size of switch stack frame to match normal 64byte alignment Eliminate useless 'osp' variable when setting up initial frame in cpu_fork() ok visa@ kettenis@
2017-07-16Pass the linker from make environment to makegap.sh. This is (only)Visa Hankala
a partial solution to cross compiling the kernel with KARL. OK deraadt@ a while ago
2017-06-29put SYSTEM_SWAP_DEP out of its misery, it died in 1997, along with config.oldMarc Espie
"go for it" deraadt@
2017-06-25dull dependency for copying makegap.sh to obj, so that installsTheo de Raadt
without src and comp work. That is what we've designed for, but since we always have src and comp on our systems it is so easy to slide... problem first noted by rpe.
2017-06-23Unbreak profiling assembly functions in userland by defining theMartin Pieuchot
correct prologue if compiled with -DPROF. ok deraadt@
2017-06-22Generate a gap.link script, and use that to generate gap.o. On multi-ABITheo de Raadt
architectures we must also link against a gapdummy.o to repair the ABI of the resulting .o file. Woe is me. Also repair install: target to update the linkkit & hash when a kernel is installed. ok rpe tb mlarkin and tested by others also
2017-06-21Better off padding with 0x0. 0x0 = "break 0,0".Theo de Raadt
(BTW, the binutils disasm cannot handle that instruction with those parameters, because the decoder logic is wrong..)
2017-06-13newbsd: target which re-links a kernel. We cannot use the bsd: targetTheo de Raadt
since it has source dependencies, and relinking doesn't have any. Also the bsd: target is created by config(8)... worked on with rpe.
2017-06-11make vers.o not depend on gap.o using a trick, because it is piece ofTheo de Raadt
fiction participating only in the linkphase. tricks from rpe and espie
2017-06-11Use umask 077 instead of cp -p when installing the kernel as root.Alexander Bluhm
Otherwise owner of /bsd could be the build user with permissions inherited from the compile directory. OK deraadt@ tb@
2017-06-05Split early startup code out of locore.S into locore0.S. Adjust linkTheo de Raadt
run so that this locore0.o is always at the start of the executable. But randomize the link order of all other .o files in the kernel, so that their exec/rodata/data/bss segments land all over the place. The bootstrap code will need smashing because it is mapped by BLTB, but this is a bit involved so not done yet. As a result, the internal layout of every newly build bsd kernel is different from past kernels. Internal relative offsets are not known to an outside attacker. The only known offsets are in the startup code (which will be gone when it is smashed). Ramdisk kernels cannot be compiled like this, because they are gzip'd. When the internal pointer references change, the compression dictionary bloats and results in poorer compression.
2017-06-05Increase kernel size, by pushing rodata 1MB forward, from 5MB to 6MB.Theo de Raadt
This seems to satisfy the BTLB granularity. Good enough for now. ok kettenis
2017-06-05The arm* architectures edit the ld.script, creating a copy in the compileTheo de Raadt
directories. Copy it in the same way on other architectures, for the same effect. Something upcoming will want that file there anyways.
2017-06-03Create gap.S and gap.o with umask 077. Create lorder and bsd* with umask 007.Theo de Raadt
Prying eyes cannot look at the kernels in the compile directory. ok tb rpe, kernel developers seem unimpacted
2017-05-30Kill db_sym_t.Martin Pieuchot
ok deraadt@, kettenis@, jasper@
2017-05-29Kill SPINLOCK_SPIN_HOOK, use CPU_BUSY_CYCLE() instead.Martin Pieuchot
ok visa@, kettenis@
2017-05-19tweak the spllower asm so it is more straightforward.David Gwynne
this properly identifies the registers used as input and output operands to the code running in the trap handler, and passes them to the asm statement as such. this means we dont have to do an extra copy in the asm, or an extra clobber to keep the compiler away from the registers. it also lets gcc set up and use the input register nicely before it reaches the asm. ok kettenis@
2017-05-18Implement copyin32(9).Mark Kettenis
"your chicken scratches look fine to me" deraadt@
2017-05-08add a BUS_DMA_64BIT flag to bus_dma on all our archs.David Gwynne
this is so drivers can advertise that they can handle 64 dma addresses to the platform. it may choose to handle dmamaps differently based on this flag. tweaks and ok tom@ ok kettenis@
2017-04-30Rename Debugger() into db_enter().Martin Pieuchot
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
2017-04-20Hook up mutex(9) to witness(4).Visa Hankala
2017-04-13Provide mips64 with kernel-facing TCB_{GET,SET} macros that store itPhilip Guenther
in struct mdproc. With that, all archs have those and the __HAVE_MD_TCB macro can be unifdef'ed as always defined. ok kettenis@ visa@ jsing@
2017-03-15Fix building profiling kernels by passing the -p flag to config(8)Theo Buehler
if the kernel's name ends in .PROF. problem reported by jmc via mpi ok mpi
2017-02-28Switch geteblks()'s size argument from int to size_t. It's called withMartin Natano
unsigned variables as argument in most places anyway. Decrease the chance of signedness/range mismatch issues. ok stefan
2017-02-27Build hppa kernels with -ffreestanding.Mark Kettenis
2017-02-12Split up fork1():Philip Guenther
- FORK_THREAD handling is a totally separate function, thread_fork(), that is only used by sys___tfork() and which loses the flags, func, arg, and newprocp parameters and gains tcb parameter to guarantee the new thread's TCB is set before the creating thread returns - fork1() loses its stack and tidptr parameters Common bits factor out: - struct proc allocation and initialization moves to thread_new() - maxthread handling moves to fork_check_maxthread() - setting the new thread running moves to fork_thread_start() The MD cpu_fork() function swaps its unused stacksize parameter for a tcb parameter. luna88k testing by aoyama@, alpha testing by dlg@ ok mpi@
2017-02-10Unbreak 'config -p'.Martin Pieuchot
ok tb@, jca@
2017-02-08In exec_elf.c: expand ELFNAME(), ELFNAME2(), and ELFNAMEEND() exceptPhilip Guenther
leaving out the size, so that ELFNAME2(exec,makecmds) becomes exec_elf_makecmds instead of exec_elf{32,64}_makecmds and then delete the ELFNAME2() and ELFNAMEEND() macros. Move the prototypes for functions local to exec_elf.c to there from exec_elf.h. Simplify the SMALL_KERNEL conditionals around the ELF coredump code. Change exec_conf.c to use the size-generic names and macros Remove exec_elf{32,64}.c and just build exec_elf.c; delete the _KERN_DO_ELF and _KERN_DO_ELF64 #defines. ok jca@, encouragement from deraadt@ and tom@
2017-01-22Introduce the KEEPKERNELS variable: if this is set either in mk.conf orTheo Buehler
the environment, 'make cleandir' does not descend into kernel build directories. Thus, kernel object files survive 'make build' on slower architectures. WARNING: If you set this variable, you run the risk of breaking 'make release': Be sure to run 'make cleandir' from /sys/arch/$(machine)/compile before doing 'make release'. This issue will be addressed shortly. requested by kettenis; ok deraadt
2016-12-30Increase space for ramdisk inserts to match ftp(1) https growth.Theo de Raadt
2016-11-29Build kernel with DEBUG=-g by default.Martin Pieuchot
This will allow us to extract type informations from DWARF2 sections. It also makes developer life easier as debug information are now included in every object. Resulting kernels will be stripped using strip(1) instead of ld(1). Kernel build time increases by approximately 10%. However it is still possible to disable this by defining DEBUG="". ok kettenis@, bluhm@, natano@, jasper@, reyk@, deraadt@
2016-11-27ashldi3 is now neededTheo de Raadt
2016-11-15Clean up the kernel Makefile's:Martin Natano
- Remove the 'lint' target. lint has been removed with OpenBSD 5.2. - Remove the 'tags' target. It does nothing of value. - Replace 'clean::' with 'clean:', as requested by espie and millert, and remove files from the 'clean' target, that are never generated. - Don't create a file called 'depend' in 'make depend', but just do nothing instead. ok mpi tb
2016-11-06Do not create machine@ symlinks in obj as root during includes:, butTheo Buehler
defer their creation to later, so that they are owned by BUILDUSER. This eliminates the last root-owned files in obj/ from 'make build'. In addition, place a MACHINE == hppa test in hppa/stand/Makefile.inc to avoid creating bogus symlinks on all other archs. joint work with & ok natano, "let's try it" deraadt
2016-11-05Two tweaks for compile/Makefile.inc:Martin Natano
1) Replace '.elif !exists(${OBJDIR}/Makefile)' with just '.else'. espie pointed out, that if the file existed, make wouldn't be reading this file, so the check is superflous. Less clutter. 2) Unconditionally define the 'clean' and 'cleandir' targets, also when obj doesn't exist. This changes the behaviour of 'make clean' to be successful (doing nothing) without obj@ or obj/. ok tb millert deraadt
2016-10-27We don't generate an eddep script for kernel builds nowadays. The lastMartin Natano
reference to eddep in the kernel Makefile I could find is in 4.3BSD, released some 30 years ago. ok tb millert
2016-10-24make cleandir should skip the version file; ok otto millertTheo de Raadt
2016-10-19Change process_{domem,auxv_offset}() to take a process instead of a proc.Philip Guenther
Make process_auxv_offset() take and release a reference of the vmspace like process_domem() does. ok kettenis@
2016-10-19Change pmap_proc_iflush() to take a process instead of a procPhilip Guenther
powerpc: rename second argument of pmap_proc_iflush() to match other archs ok kettenis@
2016-10-15cleandir: target for kernel compile directoriesTheo de Raadt
ok natano
2016-10-14Kernel builds now happen in compile/CONFIG/obj@ -> /usr/obj/... [or ./obj/,Theo de Raadt
if srctree is not rooted at /usr/src]. As a result, stock GENERIC & RAMDISK kernels are commited to the tree, to ensure the src tree can be "readonly" during builds, with all writes occuring inside the obj space. config -b options are handled by ../Makefile.inc. The canonical new way to configure one of these kernels is: % cd /sys/arch/amd64/compile/GENERIC.MP % doas make obj % make config % make % doas cp obj/bsd /bsd The build infrastructure will use this new mechanism in a de-escalation way using BUILDUSER. Much help from natano and tb.
2016-10-09Apply consistency to forever loops with continue and NOTREACHEDTom Cosgrove
Same thought from kettenis@, ok krw@ phessler@ millert@
2016-10-08Various printf claim to report the PID, so actually report that and not the TIDPhilip Guenther
Build testing assistance from deraadt@
2016-09-25Make a move towards ending 4 decades of kernel snooping.Theo de Raadt
Add sysctl kern.allowkmem (default 0) which controls the ability to open /dev/mem or /dev/kmem at securelevel > 0. Over 15 years we converted 99% of utilities in the tree to operate on sysctl-nodes (either by themselves or via code hiding in the guts of -lkvm). pstat -d and -v & procmap are affected and continued use of them will require kern.allowkmem=1 in /etc/sysctl.conf. acpidump (and it's buddy sendbug) are affected, but we'll work out a solution soon. There will be some impact in ports. ok kettenis guenther