diff options
| author | s-ol <s+removethis@s-ol.nu> | 2021-10-10 18:56:11 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2021-10-10 18:56:11 +0000 |
| commit | 2ebb76ee7d6d89b0c141cef00c1a32b1fe406d45 (patch) | |
| tree | eb2ee6c4ab8f4e52412a1baa3b50e70fd43b6026 | |
| parent | add optional strings stage (diff) | |
| download | subv-2ebb76ee7d6d89b0c141cef00c1a32b1fe406d45.tar.gz subv-2ebb76ee7d6d89b0c141cef00c1a32b1fe406d45.zip | |
examples/device_tree: print more header fields
| -rw-r--r-- | examples/device_tree.subv | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/examples/device_tree.subv b/examples/device_tree.subv index f79a233..07c7032 100644 --- a/examples/device_tree.subv +++ b/examples/device_tree.subv @@ -22,6 +22,33 @@ main: 6f/jal 1/rd/ra print_hex_word/off21 6f/jal 1/rd/ra printnl/off21 + 37/lui b/rd/a1 S_VER/imm20hi + 13/opi b/rd/a1 0/subop/add b/rs/a1 S_VER/imm12lo + 6f/jal 1/rd/ra print/off21 + + 03/load b/rd/a1 2/width/w 15/rs/s5 14/imm12 + 6f/jal 1/rd/ra bswapw/off21 + 6f/jal 1/rd/ra print_hex_word/off21 + 6f/jal 1/rd/ra printnl/off21 + + 37/lui b/rd/a1 S_LC_VER/imm20hi + 13/opi b/rd/a1 0/subop/add b/rs/a1 S_LC_VER/imm12lo + 6f/jal 1/rd/ra print/off21 + + 03/load b/rd/a1 2/width/w 15/rs/s5 18/imm12 + 6f/jal 1/rd/ra bswapw/off21 + 6f/jal 1/rd/ra print_hex_word/off21 + 6f/jal 1/rd/ra printnl/off21 + + 37/lui b/rd/a1 S_BOOT_CPU/imm20hi + 13/opi b/rd/a1 0/subop/add b/rs/a1 S_BOOT_CPU/imm12lo + 6f/jal 1/rd/ra print/off21 + + 03/load b/rd/a1 2/width/w 15/rs/s5 2c/imm12 + 6f/jal 1/rd/ra bswapw/off21 + 6f/jal 1/rd/ra print_hex_word/off21 + 6f/jal 1/rd/ra printnl/off21 + exit: # system reset (via SBI extension SRST) # a7 = ext id, a6 = fid, a0 = 0, a1 = 0 @@ -145,8 +172,14 @@ print_hex_dgt:spin: == data 0x80500000 E_MAGIC: - # "Invalid DTB magic!\n\0" - 49/8 6e/8 76/8 61/8 6c/8 69/8 64/8 20/8 44/8 54/8 42/8 20/8 6d/8 61/8 67/8 69/8 63/8 21/8 0a/8 00/8 + @@/string "Invalid DTB magic!\n\0" S_TOTALSZ: - 54/8 6f/8 74/8 61/8 6c/8 20/8 53/8 69/8 7a/8 65/8 3a/8 20/8 00/8 - + @@/string "Total Size: \0" +S_VER: + @@/string "DTB Format Version: \0" +S_LC_VER: + @@/string "Last Compatible: \0" +S_BOOT_CPU: + @@/string "Boot CPU id: \0" +S_DASH: + @@/string " - \0" |
