summaryrefslogtreecommitdiff
path: root/utils/sbtools/sb.h
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-04-17 18:37:23 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-04-17 18:37:23 +0000
commit8a8d77b8e572502a37bdcbb058dece745f911fcf (patch)
treeb05f3377b40db8b74a87b149054521fb3c3b8d5c /utils/sbtools/sb.h
parentc4cb4cca47091978be0c557bcc0b2fbdca7c3b61 (diff)
downloadrockbox-8a8d77b8e572502a37bdcbb058dece745f911fcf.tar.gz
rockbox-8a8d77b8e572502a37bdcbb058dece745f911fcf.zip
sbtoelf: include a raw command mode to see hidden command used by the bootrom (tag and nop)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29739 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/sbtools/sb.h')
-rw-r--r--utils/sbtools/sb.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/utils/sbtools/sb.h b/utils/sbtools/sb.h
index be25b4bf88..01ee0e642f 100644
--- a/utils/sbtools/sb.h
+++ b/utils/sbtools/sb.h
@@ -52,7 +52,7 @@ struct sb_header_t
52 uint64_t timestamp; /* In microseconds since 2000/1/1 00:00:00 */ 52 uint64_t timestamp; /* In microseconds since 2000/1/1 00:00:00 */
53 struct sb_version_t product_ver; 53 struct sb_version_t product_ver;
54 struct sb_version_t component_ver; 54 struct sb_version_t component_ver;
55 uint16_t drive_tag; /* Unknown meaning */ 55 uint16_t drive_tag; /* first tag to boot ? */
56 uint8_t rand_pad1[6]; /* Random padding */ 56 uint8_t rand_pad1[6]; /* Random padding */
57} __attribute__((packed)); 57} __attribute__((packed));
58 58
@@ -84,11 +84,19 @@ struct sb_key_dictionary_entry_t
84#define SB_INST_CALL 0x5 84#define SB_INST_CALL 0x5
85#define SB_INST_MODE 0x6 85#define SB_INST_MODE 0x6
86 86
87/* flags */
88#define SB_INST_LAST_TAG 1 /* for TAG */
89#define SB_INST_LOAD_DCD 1 /* for LOAD */
90#define SB_INST_FILL_BYTE 0 /* for FILL */
91#define SB_INST_FILL_HWORD 1 /* for FILL */
92#define SB_INST_FILL_WORD 2 /* for FILL */
93#define SB_INST_HAB_EXEC 1 /* for JUMP/CALL */
94
87struct sb_instruction_header_t 95struct sb_instruction_header_t
88{ 96{
89 uint8_t checksum; 97 uint8_t checksum;
90 uint8_t opcode; 98 uint8_t opcode;
91 uint16_t zero_except_for_tag; 99 uint16_t flags;
92} __attribute__((packed)); 100} __attribute__((packed));
93 101
94struct sb_instruction_load_t 102struct sb_instruction_load_t
@@ -114,3 +122,11 @@ struct sb_instruction_call_t
114 uint32_t zero; 122 uint32_t zero;
115 uint32_t arg; 123 uint32_t arg;
116} __attribute__((packed)); 124} __attribute__((packed));
125
126struct sb_instruction_tag_t
127{
128 struct sb_instruction_header_t hdr;
129 uint32_t identifier; /* section identifier */
130 uint32_t len; /* length of the section */
131 uint32_t flags; /* section flags */
132} __attribute__((packed));