From 5c1073a62dce7dae517138d85775e2ce10b7e3d0 Mon Sep 17 00:00:00 2001 From: Liav A Date: Sat, 29 May 2021 00:50:56 +0300 Subject: [PATCH] Kernel/Storage: Rename the method hba_region => default_hba_region Also, make sure we unmap it after the init process. --- Kernel/Storage/AHCIController.cpp | 4 ++-- Kernel/Storage/AHCIController.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Kernel/Storage/AHCIController.cpp b/Kernel/Storage/AHCIController.cpp index 8142f3c257..7e2731296b 100644 --- a/Kernel/Storage/AHCIController.cpp +++ b/Kernel/Storage/AHCIController.cpp @@ -82,7 +82,7 @@ volatile AHCI::HBA& AHCIController::hba() const AHCIController::AHCIController(PCI::Address address) : StorageController() , PCI::DeviceController(address) - , m_hba_region(hba_region()) + , m_hba_region(default_hba_region()) , m_capabilities(capabilities()) { initialize(); @@ -125,7 +125,7 @@ AHCI::HBADefinedCapabilities AHCIController::capabilities() const }; } -NonnullOwnPtr AHCIController::hba_region() const +NonnullOwnPtr AHCIController::default_hba_region() const { auto region = MM.allocate_kernel_region(PhysicalAddress(PCI::get_BAR5(pci_address())).page_base(), page_round_up(sizeof(AHCI::HBA)), "AHCI HBA", Region::Access::Read | Region::Access::Write); return region.release_nonnull(); diff --git a/Kernel/Storage/AHCIController.h b/Kernel/Storage/AHCIController.h index b15a42572b..ba57706506 100644 --- a/Kernel/Storage/AHCIController.h +++ b/Kernel/Storage/AHCIController.h @@ -48,7 +48,7 @@ private: RefPtr device_by_port(u32 index) const; volatile AHCI::PortRegisters& port(size_t port_number) const; - NonnullOwnPtr hba_region() const; + UNMAP_AFTER_INIT NonnullOwnPtr default_hba_region() const; volatile AHCI::HBA& hba() const; NonnullOwnPtr m_hba_region;