nullplan wrote:To my knowledge, you can only use doubleword aligned accesses with the port access method. You should keep the low two bits of PCI_ADDRESS clear and access PCI_DATA with doubleword accesses only. To that end, don't use a template method. You can only read and write three data types here, and they are all different. I personally am only ever using 32-bit methods with either the port or MMIO access method, to reduce the amount of differences.
Hey wow thanks for the quick reply! you where on point, I totally missed the fact that you can only read and write double word aligned data from the PCI config space, fixing that solved the issue instantly!
And I also found the issue with the network driver, the Transmission Descriptor List was unaligned

, I am kinda new to rust and for some reason rust won't let you put packed and aligned on a struct so I assumed packed implies aligned as well. Fixed that and now it works 100% of the times!
And on the topic of my old laptop, I found out I have an Intel 82562GT, but I couldn't find a manual for it, after a bit of extra searching I found this site
https://linux-hardware.org/?id=pci:8086-10c4-103c-30d7 that claims that the Linux e1000 driver can works with the 82562GT so I added an entry for that card in my driver array and it seems to work ( the transmit head moved after writing to the tail ).
But I don't want to make more false assumptions, do you know if they are compatible and/or how to find the 82562GT manual?
FYI I follow this spec for my e1000
https://pdos.csail.mit.edu/6.828/2023/r ... Be_SDM.pdf