diff options
author | Ian Moffett <ian@osmora.org> | 2025-10-13 22:59:12 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-10-13 22:59:30 -0400 |
commit | 49467fee7899da041c25c07c55ac4bf339fd29d0 (patch) | |
tree | accff15268676f1907829c833575787a08d2fe24 /src/sys/include/io/ic | |
parent | ede029b9ac767b25f51d70ac2b08077a8a6e5eda (diff) |
kern: ahci: Add cmdslot allocation + identify
Implements command slot allocation, command submission and the ATA
identify command
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/io/ic')
-rw-r--r-- | src/sys/include/io/ic/ahcivar.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/sys/include/io/ic/ahcivar.h b/src/sys/include/io/ic/ahcivar.h index 15ce403..ed6bee2 100644 --- a/src/sys/include/io/ic/ahcivar.h +++ b/src/sys/include/io/ic/ahcivar.h @@ -180,6 +180,29 @@ struct ahci_fis_h2d { uint8_t rsvd1[4]; }; +struct ata_identity { + uint16_t rsvd0 : 1; + uint16_t unused0 : 1; + uint16_t incomplete : 1; + uint16_t unused1 : 3; + uint16_t fixed_dev : 1; + uint16_t removable : 1; + uint16_t unused2 : 7; + uint16_t device_type : 1; + uint16_t ncylinders; + uint16_t specific_config; + uint16_t nheads; + uint16_t unused3[2]; + uint16_t sectors_per_track; + uint16_t vendor[3]; + char serial_number[20]; + uint16_t unused4[2]; + uint16_t unused5; + char firmware_rev[8]; + char model_number[40]; + char pad[256]; +}; + #define AHCI_TIMEOUT 500 /* In ms */ /* AHCI size constants */ @@ -200,4 +223,7 @@ struct ahci_fis_h2d { #define AHCI_TIMEOUT 500 +#define MODEL_LEN 40 /* Model number length */ +#define SERIAL_LEN 20 /* Serial number length */ + #endif /* !_IC_AHCIVAR_H_ */ |