skni-kod / MicrOS

32-bit operating system with kernel written in C. Created by SKNI "KOD".
GNU General Public License v3.0
56 stars 9 forks source link

PCI device definition is wrong #129

Closed MinusPL closed 1 year ago

MinusPL commented 2 years ago

Our current approach to dealing with PCI devices is not good enough. PCI Device after listing does not know it's own device number and at which bus it is present. This leads to problems with reading device configuration space later in drivers.

Also PCI configuration space is divided into two blocks - 64 bytes are mandatory for all devices, but later additional 192 bytes are available for devices. This additional space is used for device specific configuration. (For example: PCI ATA controller will use some of this space to configure timings).

Things to change:

MinusPL commented 1 year ago

Issue has been resolved in #137. Further testing is pending, but initial tests show everything works as intended. Closing.