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

Kernel/riscv64: Initialize PCI controllers using the device tree

Currently the search path is limited to `/soc/pci*` but this is enough
to get it to work on qemu.
This commit is contained in:
Hendiadyoin1 2024-01-28 23:39:12 +01:00 committed by Andrew Kaster
parent 7309427d2f
commit a99bd8eda6
2 changed files with 149 additions and 3 deletions

View file

@ -13,6 +13,7 @@
#include <AK/Vector.h>
#include <Kernel/Bus/PCI/Controller/HostController.h>
#include <Kernel/Bus/PCI/Definitions.h>
#include <Kernel/Bus/PCI/Initializer.h>
#include <Kernel/Locking/Spinlock.h>
namespace Kernel::PCI {
@ -50,6 +51,8 @@ public:
ErrorOr<void> add_host_controller_and_scan_for_devices(NonnullOwnPtr<HostController>);
private:
friend void PCI::initialize();
u8 read8_field(DeviceIdentifier const&, RegisterOffset field);
u16 read16_field(DeviceIdentifier const&, RegisterOffset field);