summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2022-04-07drm/amd/display: move FPU associated DSC code to DML folderJonathan Gray
From Qingqing Zhuo 27e01f10d183cd444eb4a0919934391de4db4ff5 in linux 5.15.y/5.15.27 d738db6883df3e3c513f9e777c842262693f951b in mainline linux
2022-04-06Support switching from glass console to serial console on systems thatMark Kettenis
default to glass console. ok miod@, patrick@
2022-04-06constify struct cfattachChristian Weisgerber
2022-04-06Recognize LUN 0 device if SID_QUAL_LU_OFFLINE and T_NODEVICE areKenneth R Westerback
true. This enables the discovery and probing of other LUNs the target has to offer. Add uk* to amd64 RAMDISK_CD so such devices are configured. Allows bsd.rd as well as bsd[.mp] to boot on Oracle Cloud amd64 instances. Issue reported by Ryan Kavanagh and Scott Nicholas via bugs@. Original diff and much subsequent testing by Scott. Thanks! ok dlg@ jmatthew@
2022-03-31Implement support for multiple dies. This should make OpenBSD work on theMark Kettenis
M1 Ultra. ok patrick@
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2022-03-31Remove duplicate scsi devices.Kenneth R Westerback
ok miod@ deraadt@
2022-03-29off-by-one check didn't recognize partition 'a' section on specifiedTheo de Raadt
disk, and would fall through to the active partition selection from crystal kolipe, ok miod krw
2022-03-28Put call to vmx_remote_vmclear() under #ifdef MULTIPROCESSORTheo Buehler
to unbreak build of amd64 GENERIC makes sense to jsing
2022-03-28vmm(4): add quiesce/wakeup hooks to sync vcpu state.Dave Voutila
If a host suspends or hibernates, a task in the middle of using vcpu state may be rescheduled to another cpu. This is primarily a problem for Intel hosts as vcpu state is kept local to the physical cpu and must be flushed back to physical memory before another cpu can issue certain vmx instructions. This change ensures no tasks are actively using the vmm device, flushes all vcpu state (if Intel hardware), and turns off virtualization mode on the host cpus. Upon wakeup, we reverse the process. Reported on bugs@ by mpi@. OK mlarkin@
2022-03-26grow i386 mediaTheo de Raadt
2022-03-26Enable mtw(4) on i386, macppc, and arm64.Stefan Sperling
Testing by hastings@ and myself. i386 has a media size issue, deraadt@ will sort it out.
2022-03-25Implement reboot/powerdown support based on nvmem cells. This works onMark Kettenis
M1 Pro/Max machines and will hopefully continue to work on future models by abstracting the magic flag that needs to be set using device tree properties. ok patrick@
2022-03-24Add $OpenBSD$ tag and declare that this file is in the public domain.Mark Kettenis
requested by miod@
2022-03-23Trapping a riscv illegal instruction shouldn't print a console messageJeremie Courreges-Anglas
"Old debugging code obviously" deraadt@
2022-03-23Export the ID_AA64ISARn_EL1 registers to userspace through sysctl(2) suchMark Kettenis
that we can detect which instruction set extensions are supported without relying in catching SIGILL. ok deraadt@
2022-03-22Copy the FDT into a larger buffer such that we have space to add additionalMark Kettenis
nodes and properties to it like we do on arm64 and armv7. ok patrick@
2022-03-22After copying the FDT into a new larger buffer, adjust the FDT size toMark Kettenis
reflect the size of the new buffer like we do on arm64. ok patrick@
2022-03-22Make sure kernel longjmp always returns 1 rather than what turns out to beMiod Vallat
in a register at call-time. with & ok jsg@
2022-03-22Fix wrong comment in sendsig(), and remove unused dumpframe()Miod Vallat
ok jsg@
2022-03-22Do not bother initializing a0 with a special value in setregs, that's aMiod Vallat
FreeBSDism we have no need for. ok jsg@
2022-03-22Change VM_MIN_ADDRESS to PAGE_SIZE to forbid mapping anything at virtualMiod Vallat
address zero, as done on all other platforms. ok deraadt@ kettenis@
2022-03-22Do not pretend there exist MD code for byte swapping yet provide copiesMiod Vallat
of the MI fallback code; ok deraadt@ jsg@
2022-03-21Constify struct {audio,midi,radio,video}_hw_if. No functional change.Miod Vallat
ok mpi@ ratchov@ "More const is good" deraadt@
2022-03-21Remove unused files which serve no purpose in OpenBSD; with and ok jsg@Miod Vallat
(works better with `cvs rm' prior to commit...)
2022-03-18spellingJonathan Gray
2022-03-17Fix previous commit; the FDT header is big-endian so we need to do theMark Kettenis
appropriate byte swapping.
2022-03-16When we allocate space a buffer with some extra space for the FDT, adjustMark Kettenis
the size of the FDT to reflect the size of that buffer. This prevents an FDT overflow if the original FDT doesn't have enough space for the additional properties that we add to it in our bootloader. Fixes boot on the mcbin. tested by bluhm@, ok patrick@
2022-03-15Implement additional error checking for aplsmc_read_key() such that we canMark Kettenis
detect when we read a key that isn't supported by the firmware. Only provide RTC functionality if the "CLKM" key is implemented. Fixes reading the time on machines with old SMC firmware from macOS 11.x. ok jsg@
2022-03-14The current FDT code we use in the bootloader is buggy and will write intoMark Kettenis
memory beyond the actual FDT data structure when adding information to the device tree. This is especially problematic on ACPI systems where we add lots of information to the device tree based on ACPI tables. Fix the FDT code to never write beyond the end of the data structure and panic if we run out of free space. Raise the amount of free space frm 4K to 16K for the proto-FDT we use on ACPI systems. Bump the version number of the arm64 bootloader. ok visa@, patrick@
2022-03-14Make sure the apldart(4) implementation of bus_dmamap_destroy(9) does theMark Kettenis
equivalent of bus_dmamap_unload(9) if active mappings exist. This fixes the kerenal panics seen with bringing bwfm(4) down and up again. ok jsg@, patrick@
2022-03-13Constify struct cfattach.Martin Pieuchot
ok miod@
2022-03-13Constify struct cfattach.Martin Pieuchot
ok miod@
2022-03-12Constify struct cfattach.Martin Pieuchot
ok patrick@
2022-03-12Unfortunately some last-minute changes were made to the AIC2 device treeMark Kettenis
bindings before it was accepted in Linux. But handling both the preliminary and (hopefully) final bindings can be done in a fairly clean way. ok jsg@
2022-03-08Enable mtw(4) in the build for amd64.hastings
Firmware is available via fw_update(8). ok stsp@
2022-03-07Since AIC2 uses 4 interrupt cells we need to adjust the code that handlesMark Kettenis
the "msi-ranges" property and converts it into a proper interrupt descriptor for MSIs. ok jsg@
2022-03-06Convert KVA allocation to km_alloc(9).Mark Kettenis
ok mpi@
2022-03-05Move initial ROM console related codes into separated luna88k/romcons.cKenji Aoyama
file. No functional change, tested by me.
2022-03-05Move CPU-CMMU association report into #ifdef DEBUG section.Kenji Aoyama
This was useful in early days of porting OpenBSD to LUNA-88K, but now more detailed information is shown in dmesg. Tested by me.
2022-03-02Recognize the cores on Apple's M1 Pro/Max SoCs.Mark Kettenis
ok jsg@
2022-03-02Add RTC support to aplsmc(4). The SMC firmware distributed with macOS 12.xMark Kettenis
has a method to read the counter that forms the base of the RTC. This seems to be the preferred way to access the RTC going forward. The RTC offset is still stored in the SPMI PMU, but we can use the nvmem interface to read and write that. This makes the RTC work on systems with the M1 Pro/Max SoC. Sprinkle some #ifdef SMALL_KERNEL around and enable the driver on RAMDISK kernels. ok patrick@
2022-03-02Add nvmem support and make this available on all Apple SPMI PMUs. RestrictMark Kettenis
the RTC interface to the "sera" PMU found on Apple M1 systems. ok patrick@
2022-03-01Apple M1 Pro/Max SoCs come with a new version of the interrupt controller.Mark Kettenis
This version appears to be more scalable (supports more cores, more interrupts) but is still fairly similar to the previous generation so it makes sense for them to share a driver. One major difference is that it seems that the new interrupt controller no longer has the ability to have external interrupts target specific CPU cores. Instead it delivers them to whichever core is willing to handle the interrupt. Since this currently isn't compatible with what OpenBSD wants we disable the delivery of external interrupts to the secondary cores by setting some bits in an implementation-defined system register. This makes OpenBSD run on M1 Pro/Max machines. ok jsg@
2022-03-01The display controller sits behind a DART. We must make sure we keepMark Kettenis
that DART enabled with the mappings provided by the firmware. Otherwise the display controller can no longer access the framebuffer and the display goes black. ok jsg@
2022-02-28The IOMMUs integrated on Apple's M1 Pro/MaxJ SoC use a different page tableMark Kettenis
layout where the physical (CPU) address needs to be shifted to allow for the larger physical address space implemented in these SoCs. Make apldart(4) handle this new page table layout based on the compatible property. ok jsg@
2022-02-28Remove unneeded symbol name lookup.Visa Hankala
2022-02-27Adjust definition of DART_L1_TABLE to what Linux uses.Mark Kettenis
ok jsg@
2022-02-25Enable cduart(4) on arm64.Visa Hankala
OK kettenis@
2022-02-24Fix kernel stack alignment on riscv64Visa Hankala
Pad trapframe and switchframe structs so that their size is a multiple of 16 bytes. This makes context switching and exception handlers keep kernel stack properly aligned. OK kettenis@