1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 07:57:49 +00:00

PCI: Add list of capabilities for each device during first enumeration

This commit is contained in:
Liav A 2020-12-18 17:37:51 +02:00 committed by Andreas Kling
parent 9d10eb473d
commit 85b4256d10
4 changed files with 44 additions and 3 deletions

View file

@ -122,7 +122,7 @@ MMIOAccess::MMIOAccess(PhysicalAddress p_mcfg)
InterruptDisabler disabler;
enumerate_hardware([&](const Address& address, ID id) {
m_physical_ids.append({ address, id });
m_physical_ids.append({ address, id, get_capabilities(address) });
m_mapped_device_regions.append(make<DeviceConfigurationSpaceMapping>(address, m_segments.get(address.seg()).value()));
#ifdef PCI_DEBUG
dbg() << "PCI: Mapping device @ pci (" << String::format("%w", address.seg()) << ":" << String::format("%b", address.bus()) << ":" << String::format("%b", address.slot()) << "." << String::format("%b", address.function()) << ")"