summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
AgeCommit message (Collapse)Author
2017-06-13First step of randomized link for sparc64: gap.S and randomize files.Theo de Raadt
locore isn't split up yet, nor is the startup code smashed. ok dlg, pieces seen before by kettenis
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-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-27Move SPINLOCK_SPIN_HOOK to the header used by other archs in order toMartin Pieuchot
prepare the terrain for MI locks. ok kettenis@
2017-05-27Claim physical memory allocated during early bootstrap from the PROM.Mark Kettenis
2017-05-27Make room for another 4GB of .text.Mark Kettenis
2017-05-25tweak sparc64 membars as a step toward making them usable in userland.David Gwynne
specifically, dont rely on magic in ctlreg to implement membars. moving that to atomic.h would add a lot of pollution to the namespace, so move to passing the membar options to a single __membar macro. this tweaks everything that was using the ctlreg backend to either use an appropriate membar_foo(), or to use __membar() in the MD code. ok kettenis@
2017-05-16Implement copyin32(9).Mark Kettenis
ok mpi@, visa@
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-05-04Also pass the blk offset to disk_unbusy(), so that it can pass it toTheo de Raadt
the random subsystem as entropy. This value is pretty much unknown, and anyways our entropy input ring does not saturate from knowns. ok mikeb djm
2017-05-03explicitly initialise the mutex in the kernel map.David Gwynne
previously it was zeroed memory from a global, which kind of looks like a valid mutex, but we shouldnt rely on that. 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-30Unifdef KGDB.Martin Pieuchot
It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
2017-04-20Hook up mutex(9) to witness(4).Visa Hankala
2017-04-20Use register names without the % prefix in the global register variableMark Kettenis
declarations since clang doesn't register the %-prefixed ones.
2017-04-16Remove some defines marked #ifdef notyet, which really is #ifdef notever.Mark Kettenis
Reduces the diffs with other architectures.
2017-04-15Build sparc64 kernels with -ffreestanding.Mark Kettenis
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-04-04Issue memory barrier before lock release, not after. This ensuresVisa Hankala
the release write becomes globally visible only after any writes of the critical section are globally visible. In practice, the reordering has not happened because the kernel runs in the total store order mode. Tested by and OK kettenis@
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-03-07Keep on trying to grab the lock after leaving ddb after lock spin-out.Visa Hankala
This restores the behaviour that preceded ticket locks. The feature can be useful in some debug cases where the system is not totally borken. OK guenther@, dlg@, 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-13whitespace tweak. no functional change.David Gwynne
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-26Disable pgt(4) and acx(4) on sparc64. The kernel has grown too large.Stefan Sperling
Unbreaks the build and allows GENERIC.MP to boot again on T5220. I am quite sure the zero users of these old wireless cards on sparc64 will be much happier with a ral(4) or athn(4) card instead. ok otto@
2017-01-24Rename pfind(9) into tfind(9) to reflect that it deals with threads.Martin Pieuchot
While here document prfind(9. with and ok guenther@
2017-01-22move counting if_opackets next to counting if_obytes in if_enqueue.David Gwynne
this means packets are consistently counted in one place, unlike the many and various ways that drivers thought they should do it. ok mpi@ deraadt@
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-13Ansify cpu_sysctl() on alpha, arm, arm64, luna88k and sparc64.Frederic Cambus
OK mpi@
2016-12-20fix use of uninitialised variablesJonathan Gray
ok kettenis@
2016-12-20no need to test if an array is non-NULLJonathan Gray
ok kettenis@
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-07Split PID from TID, giving processes a PID unrelated to the TID of theirPhilip Guenther
initial thread ok jsing@ kettenis@
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-18Delete remnants of "traptrace" supportPhilip Guenther
ok deraadt@
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-13Fix another memory leak on error path in ldc.cTom Cosgrove
"right" deraadt@
2016-10-13Fix memory leaks on error paths spotted by coypu (at) SDF (dot) ORG - thanksTom Cosgrove
ok deraadt@