NeKernel dev
|
AHCI support. More...
Go to the source code of this file.
Classes | |
struct | FisRegH2D |
struct | FisRegD2H |
struct | FisData |
struct | FisPioSetup |
struct | FisDmaSetup |
struct | FisDevBits |
struct | HbaPort |
ifndef kSATAGHC_AE More... | |
struct | HbaMem |
struct | HbaCmdHeader |
union | HbaCmdHeader::HbaFlags |
struct | HbaCmdHeader::HbaFlags::HbaFlags_ |
union | HbaFlags |
struct | HbaFlags::HbaFlags_ |
struct | HbaFis |
struct | HbaPrdtEntry |
struct | HbaCmdTbl |
Macros | |
#define | kAHCISectorSize (512) |
#define | kSATAGHC_AE (31) |
Enable AHCI device bit in GHC register. |
Typedefs | |
typedef struct FisRegH2D | FisRegH2D |
typedef struct FisRegD2H | FisRegD2H |
typedef struct FisData | FisData |
typedef struct FisPioSetup | FisPioSetup |
typedef struct FisDmaSetup | FisDmaSetup |
typedef struct FisDevBits | FisDevBits |
typedef struct HbaPort | HbaPort |
ifndef kSATAGHC_AE | |
typedef struct HbaMem | HbaMem |
typedef HbaMem * | HbaMemRef |
typedef struct HbaFis | HbaFis |
typedef struct HbaPrdtEntry | HbaPrdtEntry |
typedef struct HbaCmdTbl | HbaCmdTbl |
Enumerations | |
enum | { kFISTypeRegH2D = 0x27 , kFISTypeRegD2H = 0x34 , kFISTypeDMAAct = 0x39 , kFISTypeDMASetup = 0x41 , kFISTypeData = 0x46 , kFISTypeBIST = 0x58 , kFISTypePIOSetup = 0x5F , kFISTypeDevBits = 0xA1 } |
Frame information type. More... | |
enum | { kAHCICmdIdentify = 0xEC , kAHCICmdReadDma = 0xC8 , kAHCICmdReadDmaEx = 0x25 , kAHCICmdWriteDma = 0xCA , kAHCICmdWriteDmaEx = 0x35 } |
Functions | |
struct HbaCmdHeader | ATTRIBUTE (packed, aligned(32)) HbaCmdHeader |
Kernel::Boolean | drv_std_init (Kernel::UInt16 &PortsImplemented) |
Initializes an AHCI disk. | |
Kernel::Boolean | drv_std_detected (Kernel::Void) |
Kernel::Void | drv_std_read (Kernel::UInt64 lba, Kernel::Char *buf, Kernel::SizeT sector_sz, Kernel::SizeT buf_sz) |
Read from AHCI disk. | |
Kernel::Void | drv_std_write (Kernel::UInt64 lba, Kernel::Char *buf, Kernel::SizeT sector_sz, Kernel::SizeT buf_sz) |
Write to AHCI disk. | |
Kernel::SizeT | drv_std_get_sector_count () |
Gets the sector count from AHCI disk. | |
Kernel::SizeT | drv_std_get_size () |
Gets the AHCI disk size. | |
Kernel::Bool | drv_is_ready (void) |
Checks if the drive has completed the command. |
Variables | |
union HbaFlags | HbaFlags |
Kernel::UInt16 | Prdtl |
Kernel::UInt32 | Prdbc |
Kernel::UInt32 | Ctba |
Kernel::UInt32 | Ctbau |
Kernel::UInt32 | Rsv [4] |
AHCI support.
#define kAHCISectorSize (512) |
#define kSATAGHC_AE (31) |
Enable AHCI device bit in GHC register.
typedef struct FisData FisData |
typedef struct FisDevBits FisDevBits |
typedef struct FisDmaSetup FisDmaSetup |
typedef struct FisPioSetup FisPioSetup |
typedef struct FisRegD2H FisRegD2H |
typedef struct FisRegH2D FisRegH2D |
typedef struct HbaCmdTbl HbaCmdTbl |
typedef struct HbaFis HbaFis |
typedef struct HbaMem HbaMem |
typedef struct HbaPort HbaPort |
ifndef kSATAGHC_AE
typedef struct HbaPrdtEntry HbaPrdtEntry |
anonymous enum |
anonymous enum |
struct HbaCmdHeader ATTRIBUTE | ( | packed | , |
aligned(32) | ) |
Kernel::Bool drv_is_ready | ( | void | ) |
Checks if the drive has completed the command.
Kernel::Boolean drv_std_detected | ( | Kernel::Void | ) |
Kernel::SizeT drv_std_get_sector_count | ( | ) |
Gets the sector count from AHCI disk.
Kernel::SizeT drv_std_get_size | ( | ) |
Gets the AHCI disk size.
Kernel::Boolean drv_std_init | ( | Kernel::UInt16 & | PortsImplemented | ) |
Initializes an AHCI disk.
PortsImplemented | the amount of port that have been detected. |
Kernel::Void drv_std_read | ( | Kernel::UInt64 | lba, |
Kernel::Char * | buf, | ||
Kernel::SizeT | sector_sz, | ||
Kernel::SizeT | buf_sz ) |
Read from AHCI disk.
lba | |
buf | |
sector_sz | |
buf_sz |
Kernel::Void drv_std_write | ( | Kernel::UInt64 | lba, |
Kernel::Char * | buf, | ||
Kernel::SizeT | sector_sz, | ||
Kernel::SizeT | buf_sz ) |
Write to AHCI disk.
lba | |
buf | |
sector_sz | |
buf_sz |
Kernel::UInt32 Ctba |
Kernel::UInt32 Ctbau |
union HbaFlags HbaFlags |
Kernel::UInt32 Prdbc |
Kernel::UInt16 Prdtl |
Kernel::UInt32 Rsv[4] |