summaryrefslogtreecommitdiffstats
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.tar.bz2
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
uint64_t timestamp; /* In microseconds since 2000/1/1 00:00:00 */
struct sb_version_t product_ver;
struct sb_version_t component_ver;
- uint16_t drive_tag; /* Unknown meaning */
+ uint16_t drive_tag; /* first tag to boot ? */
uint8_t rand_pad1[6]; /* Random padding */
} __attribute__((packed));
@@ -84,11 +84,19 @@ struct sb_key_dictionary_entry_t
#define SB_INST_CALL 0x5
#define SB_INST_MODE 0x6
+/* flags */
+#define SB_INST_LAST_TAG 1 /* for TAG */
+#define SB_INST_LOAD_DCD 1 /* for LOAD */
+#define SB_INST_FILL_BYTE 0 /* for FILL */
+#define SB_INST_FILL_HWORD 1 /* for FILL */
+#define SB_INST_FILL_WORD 2 /* for FILL */
+#define SB_INST_HAB_EXEC 1 /* for JUMP/CALL */
+
struct sb_instruction_header_t
{
uint8_t checksum;
uint8_t opcode;
- uint16_t zero_except_for_tag;
+ uint16_t flags;
} __attribute__((packed));
struct sb_instruction_load_t
@@ -114,3 +122,11 @@ struct sb_instruction_call_t
uint32_t zero;
uint32_t arg;
} __attribute__((packed));
+
+struct sb_instruction_tag_t
+{
+ struct sb_instruction_header_t hdr;
+ uint32_t identifier; /* section identifier */
+ uint32_t len; /* length of the section */
+ uint32_t flags; /* section flags */
+} __attribute__((packed));