X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fatapi-types.h;h=299a2bb8ca8bf0f4fee3347792bc75f918f75c37;hb=c30d1b88a60c3a8df426ce81553675bbe4afef52;hp=300e618d9c1072c2ed97691fa3caa31985a89f7c;hpb=7b22bd6ad6a5bb413fd38e9ed7df668e34c052bb;p=palacios.git diff --git a/palacios/src/devices/atapi-types.h b/palacios/src/devices/atapi-types.h index 300e618..299a2bb 100644 --- a/palacios/src/devices/atapi-types.h +++ b/palacios/src/devices/atapi-types.h @@ -67,6 +67,36 @@ struct atapi_sense_data { } __attribute__((packed)); +struct atapi_error_recovery { + union { + uint8_t buf[12]; + struct { + uint8_t page_code : 6; + uint8_t rsvd : 1; + uint8_t page_ctrl : 1; + uint8_t page_len; + uint8_t dcr : 1; + uint8_t dte : 1; + uint8_t per : 1; + uint8_t rsvd1 : 1; + uint8_t rc : 1; + uint8_t tb : 1; + uint8_t arre : 1; + uint8_t awre : 1; + uint8_t rd_retry_cnt; + uint8_t correct_spin; + uint8_t head_offset; + uint8_t data_strobe_offset; + uint8_t emcdr : 2; + uint8_t rsvd2 : 6; + uint8_t wr_retry_cnt; + uint8_t rsvd3; + uint16_t recovery_time_limit; + } __attribute__((packed)); + } __attribute__((packed)); +} __attribute__((packed)); + + struct atapi_read10_cmd { @@ -188,6 +218,34 @@ struct atapi_rd_toc_resp { } __attribute__((packed)); +struct atapi_mech_status_cmd { + uint8_t atapi_cmd; // 0xbd + uint8_t rsvd1 : 5; + uint8_t lun : 3; + uint8_t rsvd2[6]; + uint16_t alloc_len; + uint8_t rsvd3; + uint8_t link : 1; + uint8_t flag : 1; + uint8_t naca : 1; + uint8_t rsvd5 : 3; + uint8_t vendor_specific : 2; +} __attribute__((packed)); + +struct atapi_mech_status_resp { + uint8_t cur_slot : 5; + uint8_t changer_state : 2; + uint8_t fault : 1; + uint8_t rsvd1 : 4; + uint8_t door_open : 1; + uint8_t cd_dvd_mech_state : 3; + uint32_t lba; + uint8_t num_slots : 6; + uint8_t rsvd2 : 2; + uint16_t slot_table_len; +} __attribute__((packed)); + + struct atapi_inquiry_cmd { uint8_t atapi_cmd; // 0x12 uint8_t evpd : 1; @@ -254,29 +312,6 @@ struct atapi_inquiry_resp { -struct atapi_error_recovery { - uint8_t page_code : 6; - uint8_t rsvd : 1; - uint8_t page_ctrl : 1; - uint8_t page_len; - uint8_t dcr : 1; - uint8_t dte : 1; - uint8_t per : 1; - uint8_t rsvd1 : 1; - uint8_t rc : 1; - uint8_t tb : 1; - uint8_t arre : 1; - uint8_t awre : 1; - uint8_t rd_retry_cnt; - uint8_t correct_spin; - uint8_t head_offset; - uint8_t data_strobe_offset; - uint8_t emcdr : 2; - uint8_t rsvd2 : 6; - uint8_t wr_retry_cnt; - uint8_t rsvd3; - uint16_t recovery_time_limit; -} __attribute__((packed)); struct atapi_cdrom_caps {