mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
Kernel: Map PCI devices only once during boot
Instead of mapping a 4KB region to access device configuration space each time we call one of the PCI helpers, just map them once during the boot process. Then, if we request to access one of those devices, we can ask the PCI subsystem to give us the virtual address where the device's configuration space is mapped.
This commit is contained in:
parent
0aeef47abd
commit
6131048a5f
4 changed files with 95 additions and 60 deletions
|
@ -63,6 +63,11 @@ public:
|
|||
protected:
|
||||
virtual void enumerate_hardware(Function<void(Address, ID)>) = 0;
|
||||
|
||||
u8 early_read8_field(Address address, u32 field);
|
||||
u16 early_read16_field(Address address, u32 field);
|
||||
u32 early_read32_field(Address address, u32 field);
|
||||
u16 early_read_type(Address address);
|
||||
|
||||
Access();
|
||||
Vector<PhysicalID> m_physical_ids;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue