Commit graph

19 commits

Author SHA1 Message Date
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
cinap_lenrek 8243b6600f pc/ether*: use 64-bit physical addresses and check pci membar types and sizes 2020-06-06 16:04:24 +02:00
cinap_lenrek 9fec0e7360 pc drivers: use pcienable() to handle device power up and missing initialization 2018-10-07 22:28:21 +02:00
cinap_lenrek 729c9c39d9 devether: mux bridges, portable netconsole 2018-02-18 19:56:01 +01:00
cinap_lenrek d6e0e9c402 kernel: move devether and wifi to port/
the only architecture dependence of devether was enabling interrupts,
which is now done at the end of the driver's reset() function now.

the wifi stack and dummy ethersink also go to port/.

do the IRQ2->IRQ9 hack for pc kernels in intrenabale(), so not
every caller of intrenable() has to be aware of it.
2018-02-11 18:08:03 +01:00
cinap_lenrek da62091c07 pc64: port etherbcm
do not store Block* pointer in packet descriptor, assumed
pointer would fit in a long. we use pointer table now to
record the Block* pointer and store index instead.
2014-03-19 09:00:20 +01:00
cinap_lenrek 4b8eb68f8d etherbcm: missing free() 2011-12-12 22:42:40 +01:00
cinap_lenrek 9679d7525c kernel: fix more malloc bugs 2011-12-12 22:24:25 +01:00
cinap_lenrek 9d82b73dbe etherbcm: fix did emum 2011-12-07 19:41:12 +01:00
cinap_lenrek d342e41177 etherbcm: fix pci fix, add pci dids 2011-12-07 18:52:48 +01:00
cinap_lenrek 663240a9ae etherbcm: endian word swap 2011-11-27 05:55:27 +01:00
aiju 6f8f383ab1 added timeouts to bcminit() 2011-11-05 10:22:21 +01:00
aiju a8f69d4a0d etherbcm: another try at the memleak 2011-07-22 11:25:44 +02:00
cinap_lenrek 7b6c150f5d etherbcm: add pci id for NetXtreme BCM5751 Gigabit Ethernet 2011-07-21 01:11:48 +02:00
aiju 61a8b5c803 fixed memory leak in bcm driver 2011-07-19 18:56:41 +02:00
aiju fe668572ff added basic MSI and PCI capabilities support 2011-05-16 00:35:16 +00:00
aiju b267359b69 fixed interrupt problem with BCM driver on multicore machines 2011-04-24 17:23:17 +02:00
aiju c6e26a4aeb fixed compiler warnings in BCM driver 2011-04-23 10:09:09 +02:00
aiju e0b36c7084 added BCM57xx driver 2011-04-22 13:17:59 +02:00