feat: disk read/write support for both ATA and ATAPI device
[lunaix-os.git] / lunaix-os / includes / hal / ahci / ahci.h
1 #ifndef __LUNAIX_AHCI_H
2 #define __LUNAIX_AHCI_H
3
4 /*
5  * Macro naming rule:
6  *      HBA_R[xxx]
7  *          HBA Register [xxx]
8  *          e.g. HBA_RPxCLB is Register PxCLB
9  *
10  * All registers offset are 0 based index of a DWORD array
11  */
12
13 #define AHCI_HBA_CLASS 0x10601
14
15 /**
16  * @brief 初始化AHCI与HBA
17  *
18  */
19 void
20 ahci_init();
21
22 void
23 ahci_list_device();
24
25 unsigned int
26 ahci_get_port_usage();
27
28 struct hba_port*
29 ahci_get_port(unsigned int index);
30
31 #endif /* __LUNAIX_AHCI_H */