Commit Graph

6 Commits

Author SHA1 Message Date
Eric-Paul Ickhorn 0d16e3e35a
Make driver initialization easier in manager.asm
With this change, the driver's setup function only has to be added
to the 'driver_init_functions'-array and it will be called once
'setup_drivers' is called.
2024-07-24 00:14:55 +02:00
Eric-Paul Ickhorn 94e5e70305
Add driver manager's setup routine
The setup_drivers routine existed locally for some time now, so now
it also exists in the repository. It has gone through two iterations:

1. The drivers are all listed in a null-terminated array of function
   pointers to initialization functions (this didn't work and the time
   for debugging just wasn't there).

2. All drivers (currently, only the PCI driver, because that's the
   only one that exists) are initialized after each other; their
   initialization functions are called manually.

It might be possible that the bug from the first iteration was due to
the memory space being offset by 128 or 256 bytes; it might be useful
to use that concept again because then, it will be easier to add new
drivers. That's not of high importance now, though.
2024-07-23 01:04:35 +02:00
Eric-Paul Ickhorn 18e5b049a4
Add PCI register read utility
The newly added utility routine reads the content of a known PCI
device's register given the index assigned to the device during
enumeration and the index of the register (and the PCI driver area,
but that is implied).
2024-07-23 01:01:20 +02:00
Eric-Paul Ickhorn 1285994cbf
Improve coding style of PCI device enumerator
The arguments of all of the statements are now indented and one or two
comments have been rewritten partially, improving readability.
2024-07-23 00:51:04 +02:00
Eric-Paul Ickhorn 4d9b1e390d
Make PCI enumeration write more information
The PCI enumeration did, until now, only write a PCI device's address
into the device area. Now, it also writes the class and subclass.
2024-07-21 10:26:32 +02:00
Eric-Paul Ickhorn 6342b433b4
Add main PCI driver file and device enumeration
In this commit, the PCI driver can finally enumerate the devices in
the system. Some other things are still not pushed.
2024-07-20 18:54:10 +02:00