X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/df1e857ac4d1410ae2bd354e361210b842ab7bc8..dbfc095e6e2db3fd17d5406c1ec30a478194ad4d:/lunaix-os/includes/hal/ahci/hba.h diff --git a/lunaix-os/includes/hal/ahci/hba.h b/lunaix-os/includes/hal/ahci/hba.h index 9bebe8e..c396628 100644 --- a/lunaix-os/includes/hal/ahci/hba.h +++ b/lunaix-os/includes/hal/ahci/hba.h @@ -79,27 +79,27 @@ typedef unsigned int hba_reg_t; struct hba_cmdh { - uint16_t options; - uint16_t prdt_len; - uint32_t transferred_size; - uint32_t cmd_table_base; - uint32_t reserved[5]; + u16_t options; + u16_t prdt_len; + u32_t transferred_size; + u32_t cmd_table_base; + u32_t reserved[5]; } __HBA_PACKED__; #define HBA_PRDTE_BYTE_CNT(cnt) ((cnt & 0x3FFFFF) | 0x1) struct hba_prdte { - uint32_t data_base; - uint32_t reserved[2]; - uint32_t byte_count; + u32_t data_base; + u32_t reserved[2]; + u32_t byte_count; } __HBA_PACKED__; struct hba_cmdt { - uint8_t command_fis[64]; - uint8_t atapi_cmd[16]; - uint8_t reserved[0x30]; + u8_t command_fis[64]; + u8_t atapi_cmd[16]; + u8_t reserved[0x30]; struct hba_prdte entries[HBA_MAX_PRDTE]; } __HBA_PACKED__; @@ -113,21 +113,21 @@ struct hba_device { char serial_num[20]; char model[40]; - uint32_t flags; - uint64_t max_lba; - uint32_t block_size; - uint64_t wwn; - uint8_t cbd_size; + u32_t flags; + lba_t max_lba; + u32_t block_size; + u64_t wwn; + u8_t cbd_size; struct { - uint8_t sense_key; - uint8_t error; - uint8_t status; - uint8_t reserve; + u8_t sense_key; + u8_t error; + u8_t status; + u8_t reserve; } last_result; - uint32_t alignment_offset; - uint32_t block_per_sec; - uint32_t capabilities; + u32_t alignment_offset; + u32_t block_per_sec; + u32_t capabilities; struct hba_port* port; struct ahci_hba* hba;