diff options
Diffstat (limited to 'utils/sbinfo/sb.h')
-rw-r--r-- | utils/sbinfo/sb.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/utils/sbinfo/sb.h b/utils/sbinfo/sb.h index c4d705c14b..1d62aa4daa 100644 --- a/utils/sbinfo/sb.h +++ b/utils/sbinfo/sb.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <sys/types.h> | 23 | #include <sys/types.h> |
24 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
25 | 25 | ||
26 | #define BLOCK_SIZE 16 | ||
27 | |||
26 | struct sb_version_t | 28 | struct sb_version_t |
27 | { | 29 | { |
28 | uint16_t major; | 30 | uint16_t major; |
@@ -56,6 +58,23 @@ struct sb_header_t | |||
56 | uint8_t rand_pad1[6]; /* Random padding */ | 58 | uint8_t rand_pad1[6]; /* Random padding */ |
57 | } __attribute__((packed)); | 59 | } __attribute__((packed)); |
58 | 60 | ||
61 | struct sb_section_header_t | ||
62 | { | ||
63 | uint32_t identifier; | ||
64 | uint32_t offset; /* In blocks */ | ||
65 | uint32_t size; /* In blocks */ | ||
66 | uint32_t flags; | ||
67 | } __attribute__((packed)); | ||
68 | |||
69 | struct sb_key_dictionary_entry_t | ||
70 | { | ||
71 | uint8_t hdr_cbc_mac[16]; /* CBC-MAC of the header */ | ||
72 | uint8_t key[16]; /* Actual AES Key (encrypted by the global key) */ | ||
73 | } __attribute__((packed)); | ||
74 | |||
75 | #define ROM_SECTION_BOOTABLE (1 << 0) | ||
76 | #define ROM_SECTION_CLEARTEXT (1 << 1) | ||
77 | |||
59 | #define SB_INST_NOP 0x0 | 78 | #define SB_INST_NOP 0x0 |
60 | #define SB_INST_TAG 0x1 | 79 | #define SB_INST_TAG 0x1 |
61 | #define SB_INST_LOAD 0x2 | 80 | #define SB_INST_LOAD 0x2 |
@@ -64,9 +83,6 @@ struct sb_header_t | |||
64 | #define SB_INST_CALL 0x5 | 83 | #define SB_INST_CALL 0x5 |
65 | #define SB_INST_MODE 0x6 | 84 | #define SB_INST_MODE 0x6 |
66 | 85 | ||
67 | #define ROM_SECTION_BOOTABLE (1 << 0) | ||
68 | #define ROM_SECTION_CLEARTEXT (1 << 1) | ||
69 | |||
70 | struct sb_instruction_header_t | 86 | struct sb_instruction_header_t |
71 | { | 87 | { |
72 | uint8_t checksum; | 88 | uint8_t checksum; |