mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
Kernel: Detect devices when enumerating the PCI bus
Instead of making each driver to enumerate the PCI bus itself, PCI::Initializer will call detect_devices() to do one enumeration of the bus.
This commit is contained in:
parent
60715695b2
commit
583e9ad372
10 changed files with 64 additions and 50 deletions
|
@ -74,6 +74,10 @@ struct ID {
|
|||
{
|
||||
return vendor_id == other.vendor_id && device_id == other.device_id;
|
||||
}
|
||||
bool operator!=(const ID& other) const
|
||||
{
|
||||
return vendor_id != other.vendor_id || device_id != other.device_id;
|
||||
}
|
||||
};
|
||||
|
||||
struct Address {
|
||||
|
@ -156,6 +160,7 @@ struct ChangeableAddress : public Address {
|
|||
}
|
||||
};
|
||||
|
||||
ID get_id(PCI::Address);
|
||||
void enumerate_all(Function<void(Address, ID)> callback);
|
||||
u8 get_interrupt_line(Address);
|
||||
u32 get_BAR0(Address);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue