ApertureOS
Macros | Functions | Variables
ahci.c File Reference
#include "ahci.h"
#include "priv_ahci.h"
#include "managers.h"
#include "kmalloc.h"
Include dependency graph for ahci.c:

Macros

#define READ_BUFFER_DMA_R_CMD_EXT   0x25
 
#define WRITE_DMA_R_CMD_EXT   0x35
 

Functions

uint8_t AHCI_Initialize (void)
 Initialize the AHCI controller. More...
 
void AHCI_Reset (void)
 Reset the AHCI controller. More...
 
uint8_t AHCI_CheckDeviceType (HBA_PORT *port)
 Check the device type of the current port. More...
 
bool AHCI_0_Read (uint64_t start, uint32_t count, uint16_t *buf)
 Read from the first disk. More...
 
bool AHCI_Read (HBA_PORT *port, uint64_t start, uint32_t count, uint16_t *buf)
 Read from the disk. More...
 
bool AHCI_0_Write (uint64_t start, uint32_t count, uint16_t *buf)
 Write to the first disk. More...
 
bool AHCI_Write (HBA_PORT *port, uint64_t start, uint32_t count, uint16_t *buf)
 Write to the disk. More...
 
bool AHCI_SendIOCommand (HBA_PORT *port, uint64_t start, uint32_t count, uint16_t *buf, bool write)
 
int AHCI_FindCMDSlot (HBA_PORT *port)
 
void AHCI_RebasePort (HBA_PORT *port, uint32_t AHCI_BASE, int portno)
 
void AHCI_StartCMD (HBA_PORT *port)
 
void AHCI_StopCMD (HBA_PORT *port)
 

Variables

uint32_t ahci_memory_base = 0
 
uint32_t ahci_controller_index = 0
 
HBA_MEMhba_mem
 
uint8_t disks [32]
 

Macro Definition Documentation

#define READ_BUFFER_DMA_R_CMD_EXT   0x25
#define WRITE_DMA_R_CMD_EXT   0x35

Function Documentation

int AHCI_FindCMDSlot ( HBA_PORT port)
void AHCI_RebasePort ( HBA_PORT port,
uint32_t  AHCI_BASE,
int  portno 
)
bool AHCI_SendIOCommand ( HBA_PORT port,
uint64_t  start,
uint32_t  count,
uint16_t *  buf,
bool  write 
)
void AHCI_StartCMD ( HBA_PORT port)
void AHCI_StopCMD ( HBA_PORT port)

Variable Documentation

uint32_t ahci_controller_index = 0
uint32_t ahci_memory_base = 0
uint8_t disks[32]
HBA_MEM* hba_mem