summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
AgeCommit message (Collapse)Author
2017-09-08If you use sys/param.h, you don't need sys/types.hTheo de Raadt
2017-09-05Move mutex, condvar, and thread-specific data routes, pthread_once, andPhilip Guenther
pthread_exit from libpthread to libc, along with low-level bits to support them. Major bump to both libc and libpthread. Requested by libressl team. Ports testing by naddy@ ok kettenis@
2017-06-22Tidy up comment about double load opcodes in m88k/eh_common.S (and fix ;; -> ||)Tom Cosgrove
ok miod@
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-29copyin32 implementation from miod@Martin Pieuchot
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-19Put the address of the per-cpu clock and interrupt registers into the cpu_infoMiod Vallat
struct, rather than fetching them from arrays every time they are needed. ok aoyama@
2017-02-15Make this build (and run) with gcc 4.Miod Vallat
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-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@
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-09Tweak the special handling of pid 1 in setregs()...and document thatPhilip Guenther
while it's not 100% correct, it's okay tested by aoyama@
2016-10-09Apply consistency to forever loops with continue and NOTREACHEDTom Cosgrove
Same thought from kettenis@, ok krw@ phessler@ millert@
2016-10-08Report the PID in sendsig() debuggingPhilip Guenther
tested by aoyama@
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-19ansify function definitionsJasper Lievisse Adriaanse
ok guenther@ millert@
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-04TCB_GET_MEMBER() is no longer used after the TIB changesPhilip 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-08-01bring the light of ansi to a few more filesTed Unangst
2016-06-21Add sc_cookie in sigcontext, as same as other ports.Kenji Aoyama
From Miod Vallat, tested by him and me. ok deraadt@
2016-06-13rename raiseipl to splraise()David Gwynne
another step toward making splraise an MI api. ok aoyama@
2016-06-07consistently set ipls on pmap pools.David Gwynne
this is a step toward making ipls unconditionaly on pools. ok deraadt@ kettenis@
2016-05-27Remove the non ELF macrosTheo de Raadt
ok millert
2016-05-21hand-massage sendsig() and sys_sigreturn() to be much more similar.Theo de Raadt
ok guenther kettenis
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-04-27G/C DDB_REGS.Martin Pieuchot
2016-03-19Reduces the noise around the global ``ticks'' variable by renamingMartin Pieuchot
all the local ones to ``nticks''. ok stefan@, deraadt@
2016-03-09Convert DDB_REGS -> &ddb_regs, inputs and ok naddy@Martin Pieuchot
Put addresses instead of registers inside db_regs[] to match what other archs do and to get rid of db_setf_regs().
2016-03-01DB_SYM_NULL -> NULL.Martin Pieuchot
2015-11-01Remove the definition of USRTEXT. It has no relevance outside of the non-PIEMiod Vallat
a.out world. ok deraadt@ kettenis@
2015-10-05user land -> userland; from Rob PierceTheo de Raadt
2015-09-26lint is dead and C99 may be old enough to drive a car: delete LONGLONGPhilip Guenther
comments ok millert@
2015-09-13<sys/systm.h> must be before <sys/syscall_mi.h> now.Miod Vallat
2015-09-08Give the pool page allocator backends more sensible names. We now have:Mark Kettenis
* pool_allocator_single: single page allocator, always interrupt safe * pool_allocator_multi: multi-page allocator, interrupt safe * pool_allocator_multi_ni: multi-page allocator, not interrupt-safe ok deraadt@, dlg@
2015-08-29_NLIST_DO_ELF is no longer needed: it's the only optionPhilip Guenther
ok deraadt@
2015-07-29Acquire the kernel lock in pmap_remove(). The reasons for this can't beMiod Vallat
stated here as I have been asked to be polite in this commit message. ok deraadt@
2015-07-25Only store mod/ref flags in the vm_page_md struct, not in every pv_entry.Miod Vallat
2015-07-17remove obsolete INET kernel optionTed Unangst
2015-07-03Rename mtx_cpu to mtx_owner for consistency with the other platforms.Miod Vallat
2015-07-03Fix cast in atomic_swap_ptr()Miod Vallat
2015-07-02copy MUTEX_ASSERT_LOCKED and MUTEX_ASSERT_UNLOCKED from alpha.David Gwynne
the previous asserts checked if the mutex was locked by any cpu or not when they should have been checking if the current cpu has the lock or not. found by miod after i enabled pool_gc again. ok miod@
2015-07-02introduce srp, which according to the manpage i wrote is short forDavid Gwynne
"shared reference pointers". srp allows concurrent access to a data structure by multiple cpus while avoiding interlocking cpu opcodes. it manages its own reference counts and the garbage collection of those data structure to avoid use after frees. internally srp is a twisted version of hazard pointers, which are a relative of RCU. jmatthew wrote the bulk of a hazard pointer implementation and changed bpf to use it to allow mpsafe access to bpfilters. however, at s2k15 we were trying to apply it to other data structures but the memory overhead of every hazard pointer would have blown out significantly in several uses cases. a bulk of our time at s2k15 was spent reworking hazard pointers into srp. this diff adds the srp api and adds the necessary metadata to struct cpuinfo on our MP architectures. srp on uniprocessor platforms has alternate code that is optimised because it knows there'll be no concurrent access to data by multiple cpus. srp is made available to the system via param.h, so it should be available everywhere in the kernel. the docs likely need improvement cos im too close to the implementation. ok mpi@
2015-05-05emul_native is only used for kernel threads which can't dump core, soPhilip Guenther
delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump, and various #includes that are superfluous. This leaves compat_linux processes without a coredump callback. If that ability is desired, someone should update it to use coredump_elf32() and verify the results... ok kettenis@
2015-04-30Remove SIZE_MAX from limits.h. It was added years ago before weTodd C. Miller
had a proper stdint.h. No ports fallout. OK guenther@ miod@
2015-03-06Unbreak IPL_TTY == IPL_SOFTTTY case. ok deraadt@Miod Vallat