Further parse AHCI information.
Send an IDENTIFY command to each drive and set up a hook to handle interrupts.
This commit is contained in:
parent
4e1888bd24
commit
0f0e39d1e9
25 changed files with 721 additions and 90 deletions
29
sys/denali/ahci/ahci_device.h
Normal file
29
sys/denali/ahci/ahci_device.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <zerrors.h>
|
||||
|
||||
#include "ahci/ahci.h"
|
||||
|
||||
class AhciDevice {
|
||||
public:
|
||||
AhciDevice() {}
|
||||
// Caller retains ownership of the pointer.
|
||||
AhciDevice(AhciPort* port_struct);
|
||||
|
||||
void DumpInfo();
|
||||
|
||||
bool IsInit() { return port_struct_ != nullptr && vmmo_cap_ != 0; }
|
||||
|
||||
// Result will point to a 512 byte (256 word array).
|
||||
z_err_t SendIdentify(uint16_t** result);
|
||||
|
||||
void HandleIrq();
|
||||
|
||||
private:
|
||||
AhciPort* port_struct_ = nullptr;
|
||||
uint64_t vmmo_cap_ = 0;
|
||||
|
||||
CommandList* command_list_ = nullptr;
|
||||
ReceivedFis* received_fis_ = nullptr;
|
||||
CommandTable* command_table_ = nullptr;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue