summaryrefslogtreecommitdiff
path: root/utils/imxtools/sbtools/sb.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/imxtools/sbtools/sb.h')
-rw-r--r--utils/imxtools/sbtools/sb.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/imxtools/sbtools/sb.h b/utils/imxtools/sbtools/sb.h
index aa382fca82..67d0d8c423 100644
--- a/utils/imxtools/sbtools/sb.h
+++ b/utils/imxtools/sbtools/sb.h
@@ -81,6 +81,7 @@ struct sb_key_dictionary_entry_t
81 81
82#define SECTION_BOOTABLE (1 << 0) 82#define SECTION_BOOTABLE (1 << 0)
83#define SECTION_CLEARTEXT (1 << 1) 83#define SECTION_CLEARTEXT (1 << 1)
84#define SECTION_STD_MASK (3 << 0)
84 85
85#define SB_INST_NOP 0x0 86#define SB_INST_NOP 0x0
86#define SB_INST_TAG 0x1 87#define SB_INST_TAG 0x1
@@ -187,6 +188,7 @@ struct sb_section_t
187 uint32_t identifier; 188 uint32_t identifier;
188 bool is_data; 189 bool is_data;
189 bool is_cleartext; 190 bool is_cleartext;
191 uint32_t other_flags;
190 uint32_t alignment; 192 uint32_t alignment;
191 // data sections are handled as one or more SB_INST_DATA virtual instruction 193 // data sections are handled as one or more SB_INST_DATA virtual instruction
192 int nr_insts; 194 int nr_insts;
@@ -204,15 +206,13 @@ struct sb_file_t
204 /* override crypto IV, use with caution ! Use NULL to generate it */ 206 /* override crypto IV, use with caution ! Use NULL to generate it */
205 bool override_crypto_iv; 207 bool override_crypto_iv;
206 uint8_t crypto_iv[16]; 208 uint8_t crypto_iv[16];
207 /* override timestamp */
208 bool override_timestamp;
209 uint64_t timestamp; /* In microseconds since 2000/1/1 00:00:00 */ 209 uint64_t timestamp; /* In microseconds since 2000/1/1 00:00:00 */
210 uint8_t minor_version;
210 211
211 int nr_sections; 212 int nr_sections;
212 uint16_t drive_tag; 213 uint16_t drive_tag;
213 uint32_t first_boot_sec_id; 214 uint32_t first_boot_sec_id;
214 uint16_t flags; 215 uint16_t flags;
215 uint8_t minor_version;
216 struct sb_section_t *sections; 216 struct sb_section_t *sections;
217 struct sb_version_t product_ver; 217 struct sb_version_t product_ver;
218 struct sb_version_t component_ver; 218 struct sb_version_t component_ver;
@@ -244,6 +244,9 @@ struct sb_file_t *sb_read_file_ex(const char *filename, size_t offset, size_t si
244struct sb_file_t *sb_read_memory(void *buffer, size_t size, bool raw_mode, void *u, 244struct sb_file_t *sb_read_memory(void *buffer, size_t size, bool raw_mode, void *u,
245 generic_printf_t printf, enum sb_error_t *err); 245 generic_printf_t printf, enum sb_error_t *err);
246 246
247uint64_t sb_generate_timestamp(void);
248void sb_generate_default_version(struct sb_version_t *ver);
249void sb_build_default_image(struct sb_file_t *file);
247void sb_fill_section_name(char name[5], uint32_t identifier); 250void sb_fill_section_name(char name[5], uint32_t identifier);
248void sb_dump(struct sb_file_t *file, void *u, generic_printf_t printf); 251void sb_dump(struct sb_file_t *file, void *u, generic_printf_t printf);
249void sb_free_instruction(struct sb_inst_t inst); 252void sb_free_instruction(struct sb_inst_t inst);