Rearrange AHCI code, attempt to read WIP

This commit is contained in:
Justin C. Miller
2018-05-11 01:24:59 -07:00
parent 8ae3eea19c
commit d06dd2ef43
15 changed files with 774 additions and 243 deletions

31
src/kernel/ahci/hba.h Normal file
View File

@@ -0,0 +1,31 @@
#pragma once
/// \file hba.h
/// Definition for AHCI host bus adapters
#include "kutil/vector.h"
#include "ahci/port.h"
class pci_device;
namespace ahci {
enum class hba_cap : uint32_t;
enum class hba_cap2 : uint32_t;
struct hba_data;
/// An AHCI host bus adapter
class hba
{
public:
/// Constructor.
/// \arg device The PCI device for this HBA
hba(pci_device *device);
private:
pci_device *m_device;
hba_data *m_data;
kutil::vector<port> m_ports;
};
} // namespace ahci