mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
Kernel/PCI: Expose PCI option ROM data from the sysfs interface
For each exposed PCI device in sysfs, there's a new node called "rom" and by reading it, it exposes the raw data of a PCI option ROM blob to a user for examining the blob.
This commit is contained in:
parent
1f9d3a3523
commit
a7677f1d9b
6 changed files with 155 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <Kernel/Bus/PCI/Access.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceAttribute.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceExpansionROM.h>
|
||||
#include <Kernel/Sections.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -34,6 +35,7 @@ UNMAP_AFTER_INIT NonnullLockRefPtr<PCIDeviceSysFSDirectory> PCIDeviceSysFSDirect
|
|||
list.append(PCIDeviceAttributeSysFSComponent::create(*directory, PCI::RegisterOffset::BAR3, 4));
|
||||
list.append(PCIDeviceAttributeSysFSComponent::create(*directory, PCI::RegisterOffset::BAR4, 4));
|
||||
list.append(PCIDeviceAttributeSysFSComponent::create(*directory, PCI::RegisterOffset::BAR5, 4));
|
||||
list.append(PCIDeviceExpansionROMSysFSComponent::create(*directory));
|
||||
return {};
|
||||
}));
|
||||
return directory;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue