summaryrefslogtreecommitdiffstats
path: root/utils/imxtools/scsitools/stmp_scsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/imxtools/scsitools/stmp_scsi.h')
-rw-r--r--utils/imxtools/scsitools/stmp_scsi.h58
1 files changed, 48 insertions, 10 deletions
diff --git a/utils/imxtools/scsitools/stmp_scsi.h b/utils/imxtools/scsitools/stmp_scsi.h
index 167c9a042d..f46bdb14b3 100644
--- a/utils/imxtools/scsitools/stmp_scsi.h
+++ b/utils/imxtools/scsitools/stmp_scsi.h
@@ -83,8 +83,22 @@ struct scsi_stmp_logical_table_t
uint16_t count; /* big-endian */
} __attribute__((packed));
-#define SCSI_STMP_MEDIA_INFO_TYPE 6
-#define SCSI_STMP_MEDIA_INFO_VENDOR 12
+#define SCSI_STMP_MEDIA_INFO_NR_DRIVES 0
+#define SCSI_STMP_MEDIA_INFO_SIZE 1 /* in bytes */
+#define SCSI_STMP_MEDIA_INFO_ALLOC_UNIT_SIZE 2 /* in bytes */
+#define SCSI_STMP_MEDIA_INFO_IS_INITIALISED 3
+#define SCSI_STMP_MEDIA_INFO_STATE 4
+#define SCSI_STMP_MEDIA_INFO_IS_WRITE_PROTECTED 5
+#define SCSI_STMP_MEDIA_INFO_TYPE 6
+#define SCSI_STMP_MEDIA_INFO_SERIAL_NUMBER_SIZE 7 /* in bytes */
+#define SCSI_STMP_MEDIA_INFO_SERIAL_NUMBER 8
+#define SCSI_STMP_MEDIA_INFO_IS_SYSTEM_MEDIA 9
+#define SCSI_STMP_MEDIA_INFO_IS_MEDIA_PRESENT 10
+#define SCSI_STMP_MEDIA_INFO_VENDOR 12
+
+#define SCSI_STMP_MEDIA_STATE_UNKNOWN 0
+#define SCSI_STMP_MEDIA_STATE_ERASED 1
+#define SCSI_STMP_MEDIA_STATE_ALLOCATED 2
#define SCSI_STMP_MEDIA_TYPE_NAND 0
#define SCSI_STMP_MEDIA_TYPE_SDMMC 1
@@ -111,14 +125,38 @@ struct scsi_stmp_logical_media_info_manufacturer_t
uint32_t type; /* big-endian */
} __attribute__((packed));
-#define SCSI_STMP_DRIVE_INFO_SECTOR 0 /** Sector Size (bytes) */
-#define SCSI_STMP_DRIVE_INFO_SIZE 2 /** Total Size (bytes) */
-#define SCSI_STMP_DRIVE_INFO_COUNT 4 /** Sector Count */
-#define SCSI_STMP_DRIVE_INFO_TYPE 5 /** Drive Type */
-
-#define SCSI_STMP_DRIVE_TYPE_USER 0
-#define SCSI_STMP_DRIVE_TYPE_SYSTEM 1
-#define SCSI_STMP_DRIVE_TYPE_DRM 2
+#define SCSI_STMP_DRIVE_INFO_SECTOR_SIZE 0 /** Sector Size (bytes) */
+#define SCSI_STMP_DRIVe_INFO_ERASE_SIZE 1 /** Erase Size (bytes) */
+#define SCSI_STMP_DRIVE_INFO_SIZE 2 /** Total Size (bytes) */
+#define SCSI_STMP_DRIVE_INFO_SIZE_MEGA 3 /** Total Size (mega-bytes) */
+#define SCSI_STMP_DRIVE_INFO_SECTOR_COUNT 4 /** Sector Count */
+#define SCSI_STMP_DRIVE_INFO_TYPE 5 /** Drive Type */
+#define SCSI_STMP_DRIVE_INFO_TAG 6 /** Drive Tag */
+#define SCSI_STMP_DRIVE_INFO_COMPONENT_VERSION 7 /** Component Version */
+#define SCSI_STMP_DRIVE_INFO_PROJECT_VERSION 8 /** Project Version */
+#define SCSI_STMP_DRIVE_INFO_IS_WRITE_PROTETED 9 /** Is Write Protected */
+#define SCSI_STMP_DRIVE_INFO_SERIAL_NUMBER_SIZE 10 /** Serial Number Size */
+#define SCSI_STMP_DRIVE_INFO_SERIAL_NUMBER 11 /** Serial Number */
+#define SCSI_STMP_DRIVE_INFO_MEDIA_PRESENT 12 /** Is Media Present */
+#define SCSI_STMP_DRIVE_INFO_MEDIA_CHANGE 13 /** Media Change */
+#define SCSI_STMP_DRIVE_INFO_SECTOR_ALLOCATION 14 /** Sector Allocation */
+
+#define SCSI_STMP_DRIVE_TYPE_DATA 0
+#define SCSI_STMP_DRIVE_TYPE_SYSTEM 1
+#define SCSI_STMP_DRIVE_TYPE_HIDDEN 2
+#define SCSI_STMP_DRIVE_TYPE_UNKNOWN 3
+
+#define SCSI_STMP_DRIVE_TAG_STMPSYS_S 0x00 /** Player drive */
+#define SCSI_STMP_DRIVE_TAG_HOSTLINK_S 0x01 /** USB MSC/MTP drive */
+#define SCSI_STMP_DRIVE_TAG_RESOURCE_BIN 0x02 /** Resource drive */
+#define SCSI_STMP_DRIVE_TAG_EXTRA_S 0x03 /** Extra system drive */
+#define SCSI_STMP_DRIVE_TAG_RESOURCE1_BIN 0x04 /** Extra resource drive */
+#define SCSI_STMP_DRIVE_TAG_OTGHOST_S 0x05 /** OTG drive */
+#define SCSI_STMP_DRIVE_TAG_HOSTRSC_BIN 0x06 /** USB MSC/MTP resource drive */
+#define SCSI_STMP_DRIVE_TAG_DATA 0x0a /** Data drive */
+#define SCSI_STMP_DRIVE_TAG_HIDDEN 0x0b /** Hidden data drive */
+#define SCSI_STMP_DRIVE_TAG_BOOTMANAGER_S 0x50 /** Boot manager drive */
+#define SCSI_STMP_DRIVE_TAG_UPDATER_S 0xff /** Recovery drive */
struct scsi_stmp_logical_drive_info_sector_t
{