Changeset 21d8020 in mainline for uspace/srv/bd/ata_bd/ata_bd.h
- Timestamp:
- 2009-08-23T20:54:52Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e0565005
- Parents:
- 22af3af (diff), 5048be7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/ata_bd/ata_bd.h
r22af3af r21d8020 132 132 133 133 enum ata_command { 134 CMD_IDENTIFY_DRIVE = 0xEC,135 134 CMD_READ_SECTORS = 0x20, 136 CMD_WRITE_SECTORS = 0x30 135 CMD_READ_SECTORS_EXT = 0x24, 136 CMD_WRITE_SECTORS = 0x30, 137 CMD_WRITE_SECTORS_EXT = 0x34, 138 CMD_IDENTIFY_DRIVE = 0xEC 137 139 }; 138 140 … … 156 158 uint16_t _vs8; 157 159 uint16_t _vs9; 160 158 161 uint16_t serial_number[10]; 159 162 uint16_t _vs20; … … 162 165 uint16_t firmware_rev[4]; 163 166 uint16_t model_name[20]; 167 164 168 uint16_t max_rw_multiple; 165 169 uint16_t _res48; … … 168 172 uint16_t pio_timing; 169 173 uint16_t dma_timing; 174 170 175 uint16_t validity; 171 176 uint16_t cur_cyl; … … 175 180 uint16_t cur_capacity1; 176 181 uint16_t mss; 177 uint16_t total_lba _sec0;178 uint16_t total_lba _sec1;182 uint16_t total_lba28_0; 183 uint16_t total_lba28_1; 179 184 uint16_t sw_dma; 180 185 uint16_t mw_dma; … … 184 189 uint16_t min_raw_pio_cycle; 185 190 uint16_t min_iordy_pio_cycle; 191 186 192 uint16_t _res69; 187 193 uint16_t _res70; 188 uint16_t _res71[1 + 127 - 71]; 194 uint16_t _res71; 195 uint16_t _res72; 196 uint16_t _res73; 197 uint16_t _res74; 198 199 uint16_t queue_depth; 200 uint16_t _res76[1 + 79 - 76]; 201 uint16_t version_maj; 202 uint16_t version_min; 203 uint16_t cmd_set0; 204 uint16_t cmd_set1; 205 uint16_t csf_sup_ext; 206 uint16_t csf_enabled0; 207 uint16_t csf_enabled1; 208 uint16_t csf_default; 209 uint16_t udma; 210 211 uint16_t _res89[1 + 99 - 89]; 212 213 /* Total number of blocks in LBA-48 addressing */ 214 uint16_t total_lba48_0; 215 uint16_t total_lba48_1; 216 uint16_t total_lba48_2; 217 uint16_t total_lba48_3; 218 219 /* Note: more fields are defined in ATA/ATAPI-7 */ 220 uint16_t _res104[1 + 127 - 104]; 189 221 uint16_t _vs128[1 + 159 - 128]; 190 222 uint16_t _res160[1 + 255 - 160]; … … 198 230 }; 199 231 232 /** Bits of @c identify_data_t.cmd_set1 */ 233 enum ata_cs1 { 234 cs1_addr48 = 0x0400 /**< 48-bit address feature set */ 235 }; 236 200 237 /** Block addressing mode. */ 201 238 enum addr_mode { 202 am_chs, 203 am_lba28 204 }; 239 am_chs, /**< CHS block addressing */ 240 am_lba28, /**< LBA-28 block addressing */ 241 am_lba48 /**< LBA-48 block addressing */ 242 }; 243 244 /** Block coordinates */ 245 typedef struct { 246 /** Addressing mode used */ 247 enum addr_mode amode; 248 249 union { 250 /** CHS coordinates */ 251 struct { 252 uint8_t sector; 253 uint8_t cyl_lo; 254 uint8_t cyl_hi; 255 }; 256 /** LBA coordinates */ 257 struct { 258 uint8_t c0; 259 uint8_t c1; 260 uint8_t c2; 261 uint8_t c3; 262 uint8_t c4; 263 uint8_t c5; 264 }; 265 }; 266 267 /** Lower 4 bits for device/head register */ 268 uint8_t h; 269 } block_coord_t; 205 270 206 271 typedef struct {
Note:
See TracChangeset
for help on using the changeset viewer.