summaryrefslogtreecommitdiff
path: root/sys/arch/arm64/dev
AgeCommit message (Collapse)Author
2019-08-22Don't check _TTP for io windows.Mark Kettenis
ok patrick@, jsg@
2019-08-04Cleanup the bios(4)/smbios(4) code a bit. Fix some KNF issues, reduceMark Kettenis
differences between the i386 and amd64 versions of the code and switch to using the standard C integer exact width integer types. ok deraadt@
2019-08-04Unmap tables once we're done with them.Mark Kettenis
2019-08-04Implement smbios support on arm64.Mark Kettenis
ok deraadt@, jsg@
2019-08-02Add support for additional ITS page sizes and make sure we allocateMark Kettenis
enough memory for the device table to cover the entire DeviceID space. ok patrick@
2019-07-30Fix mapping of MSI sideband data when there are SMMU's present.Mark Kettenis
2019-07-30Seems the Amppere eMAG has a silicon big where the number of writable bitsMark Kettenis
of the ICC_PMR_EL1 registers varies with the value being written. Change the value we write to probe the number of writable bits to a value that yields the desired result. Suggested by drahn@ ok patrick@
2019-07-02Add thermal zone handling code. This provides support for thermal zonesMark Kettenis
defined in device trees that link together thermal sensors and cooling devices to actively or passively cool devices when certain trip points are reached. ok mlarkin@ patrick@
2019-06-25Implement suspend/resume support for MSI-X interrupts. Loosely based onMark Kettenis
an earlier diff from sf@. ok jmatthew@, also ok mlarkin@, sf@ for a slightly different earlier version
2019-06-23The MAPTI command has no valid bit. Pointed out by Jared McNeill.Mark Kettenis
ok patrick@
2019-06-17Make pci_intr_map_msix(9) assign an address to the BAR used by the MSI-XMark Kettenis
tables if no address has been assigned yet to prevent a panic in pci_intr_establish(9) later. ok patrick@
2019-06-03Fix priorities of LIPs to match the other changes made in rev 1.17.Mark Kettenis
Makes MSI/MSI-X actually work reliably on machines with agintc(4). ok patrick@
2019-06-02Change pci_intr_handle_t into a struct and replace duplicated code thatMark Kettenis
implements mapping of MSI and MSI-X interrupts with new generic functions. Fixes a use-after-free in sone PCI device drivers that call pci_intr_string(9) after pci_intr_establish(9). ok deraadt@
2019-05-31Add MSI-X support.Mark Kettenis
ok patrick@
2019-05-31Add MSI-X support for acpipci(4). This splits out some generic code intoMark Kettenis
a new pci_machdep.c file such that it can be re-used by other arm64 PCI host bridge drivers in the future. ok patrick@
2019-05-24Pass extent for prefetchable mmio. Since there is no distinction betweenMark Kettenis
prefetchable and "normal" mmio at the host bridge level we can simply pass the same extent. ok patrick@
2019-05-23Don't print "not conigured" messages for nodes that are disabled.Mark Kettenis
ok patrick@
2019-05-13Move idepth tracking out of interrupt controller into common layer.Dale Rahn
'looks good' kettenis@
2019-05-12Between the broken GIC-500 on the RK3399 and differences in the secure modeMark Kettenis
configuration done by TF-A between boards we have to shift the priorities that we use for both the architected ICC_PMR_EL1 register and the memory mapped priority registers on the GIC in different ways. Make this explicit in the code and try to handle all the cases we care about. This includes QEMU and RK3399 boards that still use the TF-A version provided by Rockchip. Seems to make the rockpro64 run stable with a GENERIC kernel. ok drahn@, patrick@
2019-05-08Fix kernel compile with DEBUG_AGINTC.ccardenas
ok phessler, deraadt
2019-05-02Add a print function to mainbus(4) such that it prints unconfigured devicesMark Kettenis
just like we do for simplebus(4). ok patrick@, visa@
2019-04-16Prevent attaching drivers to devices for which we attached a driver early.Mark Kettenis
ok patrick@, dlg@, visa@
2019-03-07When accessing the child address cells make sure to use the size forPatrick Wildt
those instead of the size of the parent address cells. ok kettenis@
2019-01-23Add the apm(4) subsystem to arm64.Peter Hessler
NB: acpi(4) is not hooked up to this yet. previous version OK deraadt@ patrick@ OK jsg@
2019-01-03add a simplebus print function so unconfigured devices appear in dmesg.David Gwynne
this was avoided previously because during the early stages of the port, there were mostly unsupported devices. the situation is a bit better now, so make the missing drivers more obvious so people can get interested. ok kettenis@
2018-12-07For shared interrupts we need to make sure that we registerPatrick Wildt
with the lowest IPL. Once we actually run the IRQ handler we raise to the highest IPL. Fixes a crash seen when having a network card in the PCIe slot of the MacchiatoBin. ok ccardenas@
2018-08-20Implement bus_space_mmap(9).Mark Kettenis
ok patrick@
2018-08-19Add support for multiple PCI segments. Only really implemented for arm64Mark Kettenis
for now as amd64/i386 firmware still caters for legacy OSes that only support a single PCI segment. ok patrick@
2018-08-18Support arbitrary number of redistributors.Mark Kettenis
Inspired by an earlier diff from drahn@ ok patrick@, jsg@
2018-08-15Turns out the integration of the GIC-500 on the Rockchip RK3399 is busted.Mark Kettenis
It treats all access to the memory mapped registers as "secure" even if we're running in non-secure mode. As a result, during bringup of OpenBSD on the RK3399, I got confused and tweaked the interrupt priorities in a way that is wrong (but worked on the RK3399. Fix those priorities to match what they should be according to the documentation (and works on other hardware that includes a GICv3) and add code that detects the broken RK3399 GIC and adjusts the priorities accordingly. Also remove (broken) code that tries to mess around with group 0 interrupts and fix setting bits in the GICD_CTLR register on the broken RK3399 GIC.
2018-08-15Distinguish between softc array members that are indexed by redistributorMark Kettenis
and those that are indexed by the assigned CPU (unit) number. Fix the shuffling of the affinity fields are shuffled around to match the spec.
2018-08-11Make legacy interrupts work in more cases.Mark Kettenis
2018-08-11Use IORT table to map requester ID into MSI sideband data.Mark Kettenis
2018-08-11Fix a couple of bugs in the ITS support code:Mark Kettenis
- Don't dereference sc_prop if we're not handling an LPI. Fixes a crash on qemu when emulating a GICv3 without ITS (and therefore no LPIs(. - Use the true IPL when calculating the priority of an LPI. The old code used a variable that still had the IPL_MPSAFE flag in it. - Write to the right GITS_BASERn instead of ialways writing to GITS_BASER0. - Flush the cache after initializing/modifying the in-memory tables. The GICv3 on the SynQuacer isn't fully coherent and only supports the "non-shareable" attribute for its in-memory tables. So we have to flush the cache to the point of coherency to guarentee that the GIC sees our changes to those tables. Throw in a full memory barrier for good measure. Also add support for the SynQuacer pre-ITS. ok jsg@, patrick@
2018-08-11Use MAXCPUS as the number of elements for the array of per-cpu data.Mark Kettenis
Fixes machines with more than 8 cores. ok jsg@, patrick@
2018-08-09Synopsys Designeware PCIe IP isn't 100% ECAM compliant. It doesn't handleMark Kettenis
type 0 configuration requests correctly which results in devices on bus 0 appearing multiple times. Fix this by adding a quirk and match the appropriate compatible string. ok jsg@, patrick@
2018-08-08Support DMA coherent devices that attach to mainbus(4) as well.Mark Kettenis
ok patrick@
2018-08-08Fix the ITLinesNumber mask and bump the number of supprted redistributorsMark Kettenis
up to 24. ok patrick@
2018-08-03Pass PCIe requester ID as sideband data here as well.Mark Kettenis
2018-07-30Add support for the GIC v3 ITS and use it to implement MSI support forMark Kettenis
rkpcie(4). ok patrick@
2018-07-28Make use of PCI_FLAGS_MSI_ENABLED such that drivers for hardware with brokenMark Kettenis
MSI support can selectively disable the use of MSI.
2018-07-10Make legacy interrupts work in acpipci(4).Mark Kettenis
ok patrick@
2018-07-05Add acpipci(4), a driver that supports generic ECAM-compatible PCI hostMark Kettenis
bridges based on information provided by ACPI. ok mlarkin@
2018-07-02Enable the FPU when calling EFI runtime services. The new UEFI firmware forMark Kettenis
the od1000 that I built myself seems to use the FPU when setting the RTC, and the UEFI standard allows this. ok drahn@
2018-06-24If ACPI tables are present, set a global variable to point at theirMark Kettenis
(physical) address such that acpidump(8) can read it and dump the tables on arm64 systems. ok deraadt@
2018-06-05Move pluart(4) to dev/fdt.Mark Kettenis
ok jsg@
2018-06-05Unify arm64 and armv7 pluart(4) implementations.Mark Kettenis
ok jsg@
2018-05-31Move com_fdt.c to dev/fdt since we can share it between armv7 and arm64 now.Mark Kettenis
ok patrick@
2018-05-15Remove a4x bus space hack.Mark Kettenis
ok patrick@
2018-05-14Add support for register shift/io-width to the console code as well.Mark Kettenis
ok visa@, patrick@