Kernel: PCI devices can now create region for BAR

This creates either MEM or IO region for read/write access to PCI
device.
This commit is contained in:
Bananymous
2023-09-18 13:53:10 +03:00
parent a740bf8df4
commit 11717f90c1
7 changed files with 296 additions and 155 deletions

View File

@@ -11,13 +11,13 @@ namespace Kernel
class ATAController final : public StorageController
{
public:
static BAN::ErrorOr<BAN::RefPtr<ATAController>> create(const PCIDevice&);
static BAN::ErrorOr<BAN::RefPtr<ATAController>> create(const PCI::Device&);
virtual BAN::Vector<BAN::RefPtr<StorageDevice>> devices() override;
private:
ATAController();
BAN::ErrorOr<void> initialize(const PCIDevice& device);
BAN::ErrorOr<void> initialize(const PCI::Device& device);
private:
ATABus* m_buses[2] { nullptr, nullptr };