mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
Kernel/PCI: Move IO based HostBridge code to x86 arch-specific directory
The simple PCI::HostBridge class implements access to the PCI configuration space by using x86 IO instructions. Therefore, it should be put in the Arch/x86/PCI directory so it can be easily omitted for non-x86 builds.
This commit is contained in:
parent
a02c9c9569
commit
1596ee241f
9 changed files with 113 additions and 90 deletions
|
@ -31,15 +31,26 @@ public:
|
|||
|
||||
u32 domain_number() const { return m_domain.domain_number(); }
|
||||
|
||||
virtual void enumerate_attached_devices(Function<IterationDecision(DeviceIdentifier)> callback) = 0;
|
||||
void enumerate_attached_devices(Function<IterationDecision(DeviceIdentifier)> callback);
|
||||
|
||||
private:
|
||||
void enumerate_bus(Function<IterationDecision(DeviceIdentifier)> const& callback, BusNumber, bool recursive);
|
||||
void enumerate_functions(Function<IterationDecision(DeviceIdentifier)> const& callback, BusNumber, DeviceNumber, FunctionNumber, bool recursive);
|
||||
void enumerate_device(Function<IterationDecision(DeviceIdentifier)> const& callback, BusNumber bus, DeviceNumber device, bool recursive);
|
||||
|
||||
u8 read8_field(BusNumber, DeviceNumber, FunctionNumber, RegisterOffset field);
|
||||
u16 read16_field(BusNumber, DeviceNumber, FunctionNumber, RegisterOffset field);
|
||||
|
||||
Optional<u8> get_capabilities_pointer_for_function(BusNumber, DeviceNumber, FunctionNumber);
|
||||
Vector<Capability> get_capabilities_for_function(BusNumber, DeviceNumber, FunctionNumber);
|
||||
|
||||
protected:
|
||||
explicit HostController(PCI::Domain const& domain)
|
||||
: m_domain(domain)
|
||||
{
|
||||
}
|
||||
explicit HostController(PCI::Domain const& domain);
|
||||
|
||||
const PCI::Domain m_domain;
|
||||
|
||||
private:
|
||||
Bitmap m_enumerated_buses;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue