summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2020-11-08In case of failure, call sigexit() from trapsignal instead of sensig().Martin Pieuchot
Simplify MD code and reduce the amount of recursion into the signal code which helps when dealing with locks. ok cheloha@, deraadt@
2020-11-07multiple reads of pmap_emulate_reference() don't show any reason for itTheo de Raadt
to need KERNE_LOCK. Been testing this for about 3 weeks.
2020-11-06Clean up arm64's autoconf code. There have been quite a few unusedPatrick Wildt
variables and includes. While there get rid of the boot_file support and (void) casts. ok kettenis@
2020-11-04Recognise Cortex-A78AE, Cortex-X1 and Neoverse V1.Jonathan Gray
Checked against ATF, LLVM and Arm TRMs. ok kettenis@
2020-11-03Give sizes to more of the functions in locore.SPhilip Guenther
ok mpi@
2020-11-03Correct comment typo in previousPhilip Guenther
2020-11-02Set initial default display brightness via of_setbrightness() to ensuretobhe
wscons and ofw are in sync. ok kn@
2020-11-02Restore abstraction of register saving into macros in frameasm.hPhilip Guenther
The Meltdown mitigation work ran right across the previous abstractions; draw slightly different lines and use separate macros for interrupts vs traps vs syscall. The generated ASM for traps and general interrupts is completely unchanged; the ASM for the four directly routed interrupts is brought into line with the general interrupts; the ASM for syscalls is changed to delay reenabling interrupts until after all registers are saved and cleared. ok mpi@
2020-10-31Add support for passing a bootmac command line argument to RAMDISK.Patrick Wildt
The bootmac passed is supposed to be the MAC address of the NIC that we have booted from. This allows bsd.rd to realize it should run an unattended install via network. This is needed for adding powerpc64 to bluhm's regression tests. ok kettenis@
2020-10-30Use a 64MB block to load the kernel to deal with kernel growth.Mark Kettenis
Note that the first 16MB of the block are currently unused since we link our kernels at physical address 0x01000000. Therefore 32MB is no longer enough to load a kernel that is now larger than 16MB. Fixes the "entry point at 0x10010000" hang that people have reported on some machines. ok patrick@, naddy@, deraadt@
2020-10-30As done on other architectures, narrow the KERNEL_LOCK only aroundTheo de Raadt
uvm_fault (and some similar "fault emulation" code which scream danger danger) tested by aoyama
2020-10-30No need to print that we're the console device; wsdisplay(4) will do thatMark Kettenis
for us.
2020-10-30Add a comment that explains why the major/minor of the device is setMark Kettenis
unconditionally now that astfb(4) can be used as the console as well. Only print that we're the console if we actually are.
2020-10-30Allow astfb(4) to become the console. At this point this is a "late" switchMark Kettenis
and early kernel boot messages will appear on opalcons(4) until astfb(4) attaches.
2020-10-30Add code to determine the console devie node.Mark Kettenis
2020-10-28Use "memory" on inline fence instructions to suggest to the compilerJonathan Gray
it shouldn't optimise across them. ok kettenis@
2020-10-27If Open Firmware doesn't provide an interrupt mapping, use the swizzledMark Kettenis
interrupt pin as the devino. Fixes ohci(4) and ehci(4) interrupts on the Fujitsu M10-1.
2020-10-27Make ws_get_param() return -1 on error. Fixes unhandled wsconsctl displaytobhe
settings. Found by and ok kn@
2020-10-27uvm_grow() no longer needs the KERNEL_LOCK, bring it back to justTheo de Raadt
around uvm_fault(), and slightly refactor code to be more like on other architectures in snaps for 2 weeks
2020-10-27uvm_grow() no longer needs the KERNEL_LOCK, bring it back to justTheo de Raadt
around uvm_fault(), and slightly refactor code to be more like on other architectures
2020-10-27refactor page-fault handling out of the trap() switch into user andTheo de Raadt
kernel functions, rearrange to be highly similar to amd64 fault handling, and reduce the KERNEL_LOCK to only be around uvm_fault reviewed by numerous people, especially kettenis In snaps for over a week
2020-10-27add the nearly full list of usb devices.Theo de Raadt
2020-10-27Enable radeondrm(4).Mark Kettenis
2020-10-27Add limited emulation of unaligned access in the kernel. The radeondrm(4)Mark Kettenis
and amdgpu(4) drivers do unaligned access to uncached memory because the Linux DRM code doesn't mark pointers to device memory (VRAM) as volatile. I'm still investigating a better solution but this gets things going such that we can also look at the userland side of this issue. discussed with deraadt@
2020-10-27Flush cache before mapping a page as uncached. The CPU gets really upsetMark Kettenis
without this. The machine reboots and the core we were running on will be deconfigured.
2020-10-27observed by miod, a kernel unlock missed in last commitTheo de Raadt
2020-10-27Adding IOMMU support for AMD Vi and Intel VTD (disabled)Jordan Hargrave
This creates separate domains for each PCI device and can provide protection against invalid memory access. Needed for Passthrough PCI from vmd. ok deraadt@, kettenis@ : ----------------------------------------------------------------------
2020-10-26Retguard asm macros for powerpc libc, ld.sogkoehler
Add retguard to some, but not all, asm functions in libc. Edit SYS.h in libc to remove the PREFIX macros and add SYSENTRY (more like aarch64 and powerpc64), so we can insert RETGUARD_SETUP after SYSENTRY. Some .S files in this commit don't get retguard, but do stop using the old prefix macros. Tested by deraadt@, who put this diff in a macppc snap.
2020-10-26Define ws_get/set_param for macppc using ofw brightness and backlighttobhe
commands. Fixes wsconsctl display commands with drm drivers. ok kettenis@
2020-10-26Include I2C stuff.Mark Kettenis
2020-10-26Fix typo.Mark Kettenis
2020-10-26Switch the pmap and PDP pools to IPL_VM, drop the PR_WAITOK flag from theMark Kettenis
PDP pool and use the single page allocator for the PDP pool. This makes pmap_destroy(9) mpsafe while preventing additional pressure on the interrupt-safe kernel map. ok mpi@
2020-10-25As done with other architectures, narrow the KERNEL_LOCK around uvm_fault()Theo de Raadt
as best we can.
2020-10-25Implement a workaround for PCI devices that can't address the full 64-bitMark Kettenis
PCI address space. Needed for radeondrm(4) and amdgpu(4) since Radeon GPUs only implement 36, 40 or 44 bits of address space.
2020-10-25Revert accidental commit.Visa Hankala
2020-10-25Add missing firmload attribute.Visa Hankala
2020-10-24Add forward declaration of struct trapframe.Mark Kettenis
2020-10-24/dev/drm*Mark Kettenis
2020-10-24Prefer 32-bit MSI even if the hardware supports 64-bit MSI to workMark Kettenis
around buggy Radeon cards that advertise 64-bit MSI but only implement 40 bits.
2020-10-24If the #msi-eqs property says there are no event queues, don't try to setJonathan Matthew
up MSI support. stsp@ and bluhm@ ran into this on T5220s ok stsp@ kettenis@ patrick@
2020-10-23Refactor page fault/error functions, normalizing their operation relativeTheo de Raadt
to other architectures. Kernel lock only the minimum (in preparation for further unlocking down the line) ok kettenis
2020-10-22Add retguard to OPAL functions in powerpc64 locore.mortimer
ok deraadt@ kettenis@
2020-10-22Use the DBZ instruction to zero memory a cache line at a time.Mark Kettenis
This is what we already do on powerpc and seems to be what everybody does for 64-bit POWER systems. ok deraadt@, patrick@
2020-10-22uvm_grow() doesn't need KERNEL_LOCK anymore, and onfault never did.Theo de Raadt
minor refactorings to narrow KERNEL_LOCK just around uvm_fault() ok kettenis
2020-10-21Add retguard macros to powerpc64 locore functions.mortimer
ok deraadt@ kettenis@
2020-10-21(same as sh/sh/trap.c)Theo de Raadt
The condition around uvm_grow() can be simplified, as the error result adjustment is effectively a dead store ok kettenis
2020-10-21whitespaceTheo de Raadt
2020-10-21last argument to pmap_fault_fixup() is unused, delete itTheo de Raadt
noticed by kettenis
2020-10-21move the backwards-stack vm_minsaddr check from hppa trap.c to uvm_grow(),Theo de Raadt
within the correct #ifdef of course. ok kettenis
2020-10-21The condition around uvm_grow() can be simplified, as the error resultTheo de Raadt
adjustment is effectively a dead store ok kettenis