summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2020-08-23Attempt to support IODA2 bridges such as the one found on POWER8 chips.Mark Kettenis
These lack an "ibm,opal-available-m64-ranges" property, but it seems we can assume a 0-15 range. At least this is what Linux does.
2020-08-23Add support for POWER8 (and maybe earlier) CPUs. Not sure if this works onMark Kettenis
real hardware, but it gets the kernel booting on QEMU emulating a POWER8 CPU so it's a step in the right direction. This establishes a way to distinguish CPU features based on the AT_HWCAP and AT_HWCAP2 features documented in the ELF ABI. Also use this to determine the availability of the DARN instruction instead of keying of the processor model.
2020-08-23Use sysctl_bounded_args for simple cases in cpu_sysctl on i386gnezdo
OK kn
2020-08-21Use u_long for generation of VSIDs.Mark Kettenis
2020-08-20Fix build without NPCKBC and NUKBDkn
The "error" variable is used in one case only, so move it into scope under #ifdef. OK deraadt gnezdo
2020-08-19Use sysctl_bounded_args for simple cases in cpu_sysctl on amd64gnezdo
deraadt@: fine
2020-08-19Push KERNEL_LOCK/UNLOCK() dance inside trapsignal().Martin Pieuchot
ok kettenis@, visa@
2020-08-17base clang is now i586. SMALL_KERNEL images have historically forcedTheo de Raadt
i486 (for space-saving reasons), but we don't currently need this in bsd.rd so let's try without to see if it improves things in any way (at least until the next have a space-saving crisis)
2020-08-17Switch to a per-proc SLB cache. Seems to make GENERIC.MP kernelsMark Kettenis
(much more) stable. Probably because we could restore an incoherent SLB cache since there was no locking in the trap return path.
2020-08-17Enable PAN (Privileged Access Never) on CPUs that support it. This meansMark Kettenis
that user-space access from the kernel is not allowed for "normal" load/store instructions. Only the special "unprivileged" load/store instructions are allowed. We already use those in copyin(9) and copyout(9). ok patrick@, drahn@, jsg@
2020-08-17Panic on an attempt to access user-space unless it is done usingMark Kettenis
an "unpriviliged" load/store instruction. This makes sure we catch PAN violations and might even catch some incorrect user-space access cases on systems without PAN. ok drahn@, jsg@
2020-08-15Remove unused headersVisa Hankala
2020-08-15Inline handling of receive checksum offloadVisa Hankala
2020-08-14Remove "for all XXX platforms" from comment. Fixes the issue pointed outMark Kettenis
by miod@ where the powerpc64 claimed to be "for all AArch64 platforms". ok patrick@
2020-08-14Fix typo.Mark Kettenis
Spotted by miod@
2020-08-14Initialize local variable that was supposed to hold the value of curcpu().Mark Kettenis
Spotted by miod@
2020-08-13Add __multi3 from compiler_rt-8.xJeremie Courreges-Anglas
Needed to build a sparc64 kernel with clang 10. ok kettenis@
2020-08-10Do not block IPIs when acquiring the rendezvous mutex. Otherwise theVisa Hankala
system would deadlock when a CPU gets blocked by the mutex while another CPU is waiting for the first CPU to finish a rendezvous request. This possibly fixes some hangs on sgi. There should be no effect on loongson and octeon because their interrupt code is sloppy with masking of IPIs. While here, rename the rendezvous mutex to better reflect its use.
2020-08-05sigh, some duplication, but at least put things into the canonical orderTheo de Raadt
2020-08-04add cd9660, msdos, and inet6 supportTheo de Raadt
2020-08-04Initialize per-pmap lock.Mark Kettenis
2020-08-04On POWER9 use the "darn" instruction and feed its output as entropy intoMark Kettenis
the random subsystem. ok deraadt@
2020-08-03add more scsi devices, observed by gkoehlerTheo de Raadt
2020-08-02additional files from libkern will be needed by clang10Theo de Raadt
2020-08-02additional files from libkern will be needed by clang10Theo de Raadt
from mortimer
2020-07-31like amd64:Theo de Raadt
atapiscsi is not needed here. (well maybe it changes the behaviour of the pciide subsystem a tiny bit at attach-time, but we don't have the downstream cd(4) device to attach, so let's try without)
2020-07-31Make sure bcmtmon(4) attaches even if it has a "syscon" compatible.Mark Kettenis
2020-07-31On sun4u systems that have the STICK register, clear the NPT bit of theMark Kettenis
register such that it can be accessed from userland. With this change we can unconditionally enabled the usertc code again. ok naddy@
2020-07-30Only invalidate "user" SLB entry if it is currently set.Mark Kettenis
2020-07-29atapiscsi is not needed here. (well maybe it changes the behaviour ofTheo de Raadt
the pciide subsystem a tiny bit at attach-time, but we don't have the downstream cd(4) device to attach, so let's try without)
2020-07-25Port over NetBSD's arm64 disassembler for DDB.tobhe
ok kettenis@, patrick@
2020-07-25Change kernel SLB setup code to avoid the (theoretical) possibility toMark Kettenis
enter duplicate mappings.
2020-07-24Enable usertc if the NPT bit isn't set for %tick and %sys_tick.Mark Kettenis
ok naddy@
2020-07-24Suppress kernel printf output in the octeon boot kernel.Visa Hankala
OK kettenis@
2020-07-24Remove bge(4) and brgphy(4) as the bootloader doesn't include network supportMark Kettenis
of any kind. Speeds up booting a bit.
2020-07-24Implement BOOT_QUIET option that supresses kernel printf output to theMark Kettenis
console. When the kernel panics, print console output is enabled such that we see those messages. Use this option for the powerpc64 boot kernel. ok visa@, deraadt@
2020-07-23Free SLB descriptors when we destroy a pmap.Mark Kettenis
2020-07-23Bump MAXCPUS (for MULTIPROCESSOR kernels) to 48, which seems to be theMark Kettenis
maximum numbers of cores available in any POWER9 system.
2020-07-23Enter DDB directly when we encounter an unhandled trap such that weMark Kettenis
can inspect the state corresponding to that trap.
2020-07-23Use per-pmap lock to protect userland SLB handling.Mark Kettenis
2020-07-23Fix typo in previous commit such that the code is actually compiled in.Mark Kettenis
2020-07-23Handle the case where we can sleep (and therefore switch CPUs) whileMark Kettenis
handling kernel traps.
2020-07-23Nuke unused struct scsi_link member of spc_softc.Kenneth R Westerback
luna88k compile test by aoyama@
2020-07-22Nuke unused struct scsi_link member of vdsk_softc.Kenneth R Westerback
sparc64 compile test by jmatthew@
2020-07-22Make switching CPUs in DDB work.Mark Kettenis
2020-07-22Actually try to evict a PTE from a different slot instead of failing toMark Kettenis
evict the same PTE 16 times because the PTE is wired.
2020-07-22Don't grab the kernel lock for mpsafe interrupts.Mark Kettenis
2020-07-22Implement IPIs.Mark Kettenis
2020-07-22console marker should be after :Theo de Raadt
2020-07-22Remove debugging printf in critical section. This doesn't play well withMark Kettenis
the hash lock on MULTIPROCESSOR kernels.