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

Kernel/Storage: Move Identify page allocation to the AHCIPort class

Instead of doing this in a parent class like the AHCIController, let's
do that directly in the AHCIPort class as that class is the only user of
these sort of physical pages. While it seems like we waste an entire 4KB
of physical RAM for each allocation, this could serve us later on if we
want to fetch other types of logs from the ATA device.
This commit is contained in:
Liav A 2022-04-02 01:47:44 +03:00 committed by Idan Horowitz
parent bf82c4b81b
commit 4d36989954
4 changed files with 14 additions and 21 deletions

View file

@ -34,7 +34,6 @@ public:
virtual void start_request(ATADevice const&, AsyncBlockDeviceRequest&) override;
virtual void complete_current_request(AsyncDeviceRequest::RequestResult) override;
PhysicalAddress get_identify_metadata_physical_region(Badge<AHCIPort>, u32 port_index) const;
void handle_interrupt_for_port(Badge<AHCIInterruptHandler>, u32 port_index) const;
private:
@ -51,7 +50,6 @@ private:
NonnullOwnPtr<Memory::Region> default_hba_region() const;
volatile AHCI::HBA& hba() const;
NonnullRefPtrVector<Memory::PhysicalPage> m_identify_metadata_pages;
Array<RefPtr<AHCIPort>, 32> m_ports;
NonnullOwnPtr<Memory::Region> m_hba_region;
AHCI::HBADefinedCapabilities m_hba_capabilities;