plan9fox/sys
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
..
doc /sys/doc: fix mkfile to and remove files that now can be regenerated 2017-05-09 16:23:48 +02:00
games/lib fortunes: As much as I'd love to I feel I have to let it go -- rminnich 2020-04-18 21:37:53 -04:00
include ape/ctype.h: add isblank, fix functions (thanks staalmannen) 2020-08-29 11:09:20 -07:00
lib tmac.eai: wrapper around -me: auto indexing sections, .TC macro (thanks sirjofri) 2020-05-04 11:57:24 +02:00
man tmdate(1): document tz field 2020-09-12 17:36:14 -07:00
src kernel: massive pci code rewrite 2020-09-13 20:33:17 +02:00