summaryrefslogtreecommitdiff
path: root/sys/src/9/port/pci.h
AgeCommit message (Collapse)Author
2022-07-03imx8: pcie and nvme supportcinap_lenrek
2021-11-26kernel: support large 64-bit pci membars, increase pc64 VMAPSIZE to 1TBcinap_lenrek
This makes vmap()/vunmap() take a vlong size argument, and change the type of Pci.mem[].size to vlong as well. Even if vmap() wont support large mappings, it is nice to get the original unruncated value for error checking. pc64 needs a bigger VMAP window, as system76 pangolin puts the framebuffer at a physical address > 512GB.
2021-07-10kernel: export pcienumcaps() for custom capability enumeration in drivers ↵cinap_lenrek
(virtio) This used to be a internal function, but virtio uses multiple structures with the same cap type to indicate the location of various register blocks in the pci bars so export it.
2021-03-01devpccard, pci: fix pccard support and handle pci expansion romscinap_lenrek
let pci.c deal with the special cardbus controller bar0 and expansion roms. handle apic interrupt routing for devices behind a cardbus slot. do not free the pcidev on card removal, as the drivers most certanly are not prepared to handle this yet. instead, we provide a pcidevfree() function that just unlinks the device from pcilist and the parent bridge.
2020-11-21kernel: add portable pcimsienable()/pcimsidisable(), disable MSI/MSI-X on ↵cinap_lenrek
pcidisable()/pcireset() This avoids some duplication in the pci support code and allows pcireset() to diable MSI and MSI-X interrupts when disabling or reseting a device.
2020-11-21kernel: remove unused pcinextcap() functioncinap_lenrek
2020-09-13kernel: massive pci code rewritecinap_lenrek
The new pci code is moved to port/pci.[hc] and shared by all ports. Each port has its own PCI controller implementation, providing the pcicfgrw*() functions for low level pci config space access. The locking for pcicfgrw*() is now done by the caller (only port/pci.c). Device drivers now need to include "../port/pci.h" in addition to "io.h". The new code now checks bridge windows and membars, while enumerating the bus, giving the pc driver a chance to re-assign them. This is needed because some UEFI implementations fail to assign the bars for some devices, so we need to do it outselfs. (See pcireservemem()). While working on this, it was discovered that the pci code assimed the smallest I/O bar size is 16 (pcibarsize()), which is wrong. I/O bars can be as small as 4 bytes. Bit 1 in an I/O bar is also reserved and should be masked off, making the port mask: port = bar & ~3;