mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 16:07:45 +00:00
Kernel/Storage: Do proper locking & reset in the AHCIController code
The initialize_hba method now calls the reset method to reset the HBA and initialize each AHCIPort. Also, after full HBA reset we need to turn on the AHCI functionality of the HBA and global interrupts since they are cleared to 0 according to the specification in the GHC register.
This commit is contained in:
parent
4d36989954
commit
8de395694d
2 changed files with 47 additions and 34 deletions
|
@ -56,5 +56,10 @@ private:
|
|||
|
||||
// FIXME: There could be multiple IRQ (MSI) handlers for AHCI. Find a way to use all of them.
|
||||
OwnPtr<AHCIInterruptHandler> m_irq_handler;
|
||||
|
||||
// Note: This lock is intended to be locked when doing changes to HBA registers
|
||||
// that affect its core functionality in a manner that controls all attached storage devices
|
||||
// to the HBA SATA ports.
|
||||
mutable Spinlock m_hba_control_lock;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue