1 #ifndef _IMR_TOC_H_ 2 #define _IMR_TOC_H_ 3 4 /* 5 * IMR Table of Contents format 6 */ 7 typedef struct { 8 uint32_t start_offset; 9 uint32_t size; 10 uint32_t reserved1; 11 uint32_t reserved2; 12 } imr_toc_entry_t; 13 14 typedef struct { 15 imr_toc_entry_t entries[8]; /* pick reasonable size to make gcc happy */ 16 } imr_toc_t; 17 18 #define MAKE_TOC_VERSION(maj, min) ((min) << 16 | (maj)) 19 typedef struct { 20 uint16_t toc_maj_ver; 21 uint16_t toc_min_ver; 22 } imr_toc_entry_version_t; 23 24 /* 25 * IMR6 values 26 */ 27 28 #define IMR6_TOC_MAGIC 0x6CD96EDB 29 30 #define IMR6_TOC_VERSION_MAJ 0x0001 31 #define IMR6_TOC_VERSION_MIN 0x0000 32 33 /* ToC entry order for IMR6 */ 34 enum imr6_entries { 35 IMR_TOC_ENTRY_TOC = 0, 36 IMR_TOC_ENTRY_MTX_WB_BUF, 37 IMR_TOC_ENTRY_VXE_FW, 38 IMR_TOC_ENTRY_VXE_CTX_BUF, 39 IMR_TOC_ENTRY_VXE_SEC_PGTBLS, 40 IMR_TOC_ENTRY_PC_BUFS, 41 IMR_TOC_ENTRY_VXE_SHADOW_PGTBLS, 42 IMR_TOC_ENTRY_XEN_EXTRA, 43 }; 44 45 46 /* 47 * IMR7 values 48 */ 49 50 #define IMR7_TOC_MAGIC 0x6ED96CDB 51 52 #define IMR7_TOC_VERSION_MAJ 0x0001 53 #define IMR7_TOC_VERSION_MIN 0x0000 54 55 /* ToC entry order for IMR7 */ 56 enum imr7_entries { 57 /* IMR_TOC_ENTRY_TOC = 0, */ 58 IMR_TOC_ENTRY_MAILBOXES = 1, /* contents per imr_ia_chaabi_mailbox_t */ 59 IMR_TOC_ENTRY_IA_RUNTIME_FW, 60 IMR_TOC_ENTRY_XEN 61 }; 62 63 /* entry-specific data structures */ 64 65 #define IMR6_PC_BUFS_START_VADDR 0x11223344 66 67 typedef struct { 68 uint32_t hdcp_sess_status; 69 union { 70 struct { 71 uint32_t hdcp_sess_key_00_31; 72 uint32_t hdcp_sess_key_32_63; 73 uint32_t hdcp_sess_key_64_95; 74 uint32_t hdcp_sess_key_96_127; 75 }; 76 uint8_t hdcp_sess_key[16]; 77 }; 78 union { 79 struct { 80 uint32_t hdcp_iv_00_31; 81 uint32_t hdcp_iv_32_63; 82 }; 83 uint64_t hdcp_iv; 84 }; 85 } imr_ia_chaabi_mailbox_t; 86 87 #endif 88