summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
AgeCommit message (Collapse)Author
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
2017-01-21p_comm is the process's command and isn't per thread, so move it fromPhilip Guenther
struct proc to struct process. ok deraadt@ kettenis@
2017-01-15Harmonize the way frame buffer drivers display resolution and colorFrederic Cambus
depth when attaching. OK visa@, deraadt@
2017-01-13Ansify cpu_sysctl() on alpha, arm, arm64, luna88k and sparc64.Frederic Cambus
OK mpi@
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-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-07Hide FIX_SSTEP() behind #ifdef _KERNELPhilip Guenther
ok 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-27revert 1.41 now that subr_percpu is using ncpusfound instead of ncpus.David Gwynne
2016-10-27increment ncpus when a cpu is attached, not when its booted.David Gwynne
fixes percpu allocations, like visa@ just did on mips64.
2016-10-24make cleandir should skip the version file; ok otto millertTheo de Raadt
2016-10-19The first argument to process_domem() and its uio_procp should be curprocPhilip Guenther
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-10-04The new thread's userspace v0, a3, and a4 registers are updated inPhilip Guenther
child_return() like on other archs, so cpu_fork() doesn't need to touch them. ok kettenis@ deraadt@
2016-09-27typoTheo de Raadt
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
2016-09-24Add -Wno-pointer-sign to all our gcc4 architectures.Mark Kettenis
ok patrick@ (for armv7), deraadt@
2016-09-19ansify function definitionsJasper Lievisse Adriaanse
ok guenther@ millert@
2016-09-19fix whitespace at EOLJasper Lievisse Adriaanse
2016-09-18option INSECURE is obsoleteTheo de Raadt
2016-09-15all pools have their ipl set via pool_setipl, so fold it into pool_init.David Gwynne
the ioff argument to pool_init() is unused and has been for many years, so this replaces it with an ipl argument. because the ipl will be set on init we no longer need pool_setipl. most of these changes have been done with coccinelle using the spatch below. cocci sucks at formatting code though, so i fixed that by hand. the manpage and subr_pool.c bits i did myself. ok tedu@ jmatthew@ @ipl@ expression pp; expression ipl; expression s, a, o, f, m, p; @@ -pool_init(pp, s, a, o, f, m, p); -pool_setipl(pp, ipl); +pool_init(pp, s, a, ipl, f, m, p);
2016-09-04Remove support for tape block devices. Nobody mount(8)s tapes any longer.Christian Weisgerber
ok deraadt@ guenther@
2016-09-03Increase the number of mbufs on most architectures. This is basedAlexander Bluhm
on a guess how much memory a typical machine has. If the value is too high, users may run out of kernel memory. Then we will have to adjust this again. OK claudio@ deraadt@
2016-09-02Add switch(4) cdev entryKazuya Goda
ok deraadt@ yasuoka@ reyk@
2016-08-31remove some ISA drivers for devices not recently seen in the wild.Ted Unangst
2016-08-15normalize some commentsTed Unangst
2016-08-01bring the light of ansi to a few more filesTed Unangst
2016-07-30Prep for relro: make sure it's off for any non-PIE stand/ programPhilip Guenther
ok millert@ kettenis@
2016-06-28enable ure(4) where we already have url(4)Jonathan Matthew
2016-06-13rename _splraise to splraiseDavid Gwynne
gets us a bit closer to an MI splraise api.
2016-06-08remove obsolete raid from namtoblk tables. from Artturi AlmTed Unangst
2016-06-07consistently set ipls on pmap pools.David Gwynne
this is a step toward making ipls unconditionaly on pools. ok deraadt@ kettenis@
2016-06-01Enable utvfu(4) everywhere where uvideo(4) is also enabled.Marcus Glocker
suggested by mpi
2016-05-27Remove the non ELF macrosTheo de Raadt
ok millert
2016-05-23Place a cpu-dependent trap/illegal instruction over the remainder of theTheo de Raadt
sigtramp page, so that it will generate a nice kernel fault if touched. While here, move most of the sigtramps to the .rodata segment, because they are not executed in the kernel. Also some preparation for sliding the actual sigtramp forward (will need some gdb changes) ok mlarkin kettenis
2016-05-21hand-massage sendsig() and sys_sigreturn() to be much more similar.Theo de Raadt
ok guenther kettenis
2016-05-15Implement TCB_{GET,SET} using PAL_{rd,wr}unique.Philip Guenther
Inline asm from NetBSD testing deraadt@
2016-05-11Add the sigcontext cookie clearing block, which was missed in the previousTheo de Raadt
commit.
2016-05-10SROP mitigation. sendsig() stores a (per-process ^ &sigcontext) cookieTheo de Raadt
inside the sigcontext. sigreturn(2) checks syscall entry was from the exact PC addr in the (per-process ASLR) sigtramp, verifies the cookie, and clears it to prevent sigcontext reuse. not yet tested on landisk, sparc, *88k, socppc. ok kettenis
2016-05-04Initial support for MSI-X. Only supported on amd64 for now. I have diffs toMark Kettenis
actually use this in em(4) and xhci(4), but I'm not committing those yet because we almost certainly need to save and restore the MSI-X registers during suspend/resume. However, this allows mpi@ to play with multiple-vector support in networking hardware. Requested by mpi@ ok mlarkin@, mikeb@
2016-05-03alias bus_space_{read,write}_raw to the non-raw counterpartsDavid Gwynne
busses are little endian, so the non-raw ops are raw anyway. fixes the kernel build after xge grew the use of the raw ops.
2016-04-29Do not remove local symbols from the table.Martin Pieuchot
ddb(4) can now see static functions. That doesn't mean we should start declaring functions as ``static'', however it helps for the few existing exceptions. ok deraadt@, kettenis@
2016-04-27G/C DDB_REGS.Martin Pieuchot