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:
Liav A 2022-02-10 20:35:30 +02:00 committed by Jelle Raaijmakers
commit a7677f1d9b
Notes: sideshowbarker 2024-07-18 08:59:31 +09:00
6 changed files with 155 additions and 0 deletions

View file

@ -35,6 +35,8 @@ u32 get_BAR5(DeviceIdentifier const&);
u32 get_BAR(DeviceIdentifier const&, HeaderType0BaseRegister);
size_t get_BAR_space_size(DeviceIdentifier const&, HeaderType0BaseRegister);
BARSpaceType get_BAR_space_type(u32 pci_bar_value);
size_t get_expansion_rom_space_size(DeviceIdentifier const&);
void enable_bus_mastering(DeviceIdentifier const&);
void disable_bus_mastering(DeviceIdentifier const&);
void enable_io_space(DeviceIdentifier const&);