mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +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
|
@ -7,9 +7,10 @@
|
|||
#include <AK/ByteReader.h>
|
||||
#include <AK/Error.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <Kernel/Arch/x86/IO.h>
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
# include <Kernel/Arch/x86/PCI/Controller/HostBridge.h>
|
||||
#endif
|
||||
#include <Kernel/Bus/PCI/Access.h>
|
||||
#include <Kernel/Bus/PCI/Controller/HostBridge.h>
|
||||
#include <Kernel/Bus/PCI/Controller/MemoryBackedHostBridge.h>
|
||||
#include <Kernel/Bus/PCI/Initializer.h>
|
||||
#include <Kernel/Debug.h>
|
||||
|
@ -104,6 +105,7 @@ UNMAP_AFTER_INIT bool Access::initialize_for_multiple_pci_domains(PhysicalAddres
|
|||
return true;
|
||||
}
|
||||
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
UNMAP_AFTER_INIT bool Access::initialize_for_one_pci_domain()
|
||||
{
|
||||
VERIFY(!Access::is_initialized());
|
||||
|
@ -114,6 +116,7 @@ UNMAP_AFTER_INIT bool Access::initialize_for_one_pci_domain()
|
|||
dbgln_if(PCI_DEBUG, "PCI: access for one PCI domain initialised.");
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
ErrorOr<void> Access::add_host_controller_and_enumerate_attached_devices(NonnullOwnPtr<HostController> controller, Function<void(DeviceIdentifier const&)> callback)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue