plan9fox/sys/src/9/pc64
cinap_lenrek 4f85115526 kernel: massive pci code rewrite
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;
2020-09-13 20:33:17 +02:00
..
apbootstrap.s pc64: map kernel text readonly and everything else no-execute 2019-08-29 07:35:22 +02:00
dat.h pc, pc64: use 64-bit physical addresses for ISAConf.port 2020-06-06 14:52:16 +02:00
fns.h kernel: massive pci code rewrite 2020-09-13 20:33:17 +02:00
l.s kernel: change peek to return number of characters left rather than 0/-1 2018-12-11 09:17:44 +00:00
main.c kernel: massive pci code rewrite 2020-09-13 20:33:17 +02:00
mem.h pc, pc64: do page attribute table (PAT) init early in cpuidentify() 2020-05-22 23:58:24 +02:00
mkfile pc, pc64: new memory map code 2020-04-04 16:48:37 +02:00
mmu.c pc64: disable interrupts in mmuwalk() for checkmmu() 2020-07-16 03:11:27 +02:00
pc64 kernel: massive pci code rewrite 2020-09-13 20:33:17 +02:00
rebootcode.s pc, pc64: park application processors in rebootcode with mmu off 2018-11-19 18:42:01 +01:00
squidboy.c pc64: map kernel text readonly and everything else no-execute 2019-08-29 07:35:22 +02:00
trap.c pc, pc64: remove "got unassigned irq" prints 2020-04-09 13:05:10 +02:00