diff --git a/target/snitch_cluster/test/bootrom.S b/target/snitch_cluster/test/bootrom.S index 9ef465e06c..69b3bd00e0 100644 --- a/target/snitch_cluster/test/bootrom.S +++ b/target/snitch_cluster/test/bootrom.S @@ -13,7 +13,9 @@ _snitch_park: wfi _snitch_resume: - lui t0, 0xfffff # Peripheral start is 0x1000 before bootrom start. - addi t0, t0, 0x15c # This is the 0x2c instruction and we want to jump to scratch_1 (0x188). + auipc t0, 0 + li t1, -3736 # Jump to scratch register 1 at offset 0x188 + add t0, t0, t1 + lw t0, 0(t0) jalr ra, 0(t0) j _snitch_park \ No newline at end of file diff --git a/target/snitch_cluster/test/bootrom.bin b/target/snitch_cluster/test/bootrom.bin index 1570feb53f..b10f89a03f 100755 Binary files a/target/snitch_cluster/test/bootrom.bin and b/target/snitch_cluster/test/bootrom.bin differ diff --git a/target/snitch_cluster/test/bootrom.dump b/target/snitch_cluster/test/bootrom.dump index 037babd8e6..4f25268a62 100644 --- a/target/snitch_cluster/test/bootrom.dump +++ b/target/snitch_cluster/test/bootrom.dump @@ -15,7 +15,10 @@ Disassembly of section .text: 1c: 10500073 wfi 00000020 <_snitch_resume>: - 20: fffff2b7 lui t0,0xfffff - 24: 15c28293 addi t0,t0,348 # fffff15c <_snitch_resume+0xfffff13c> - 28: 000280e7 jalr t0 - 2c: fd5ff06f j 0 <_snitch_park> + 20: 00000297 auipc t0,0x0 + 24: fffff337 lui t1,0xfffff + 28: 16830313 addi t1,t1,360 # fffff168 <_snitch_resume+0xfffff148> + 2c: 006282b3 add t0,t0,t1 + 30: 0002a283 lw t0,0(t0) # 20 <_snitch_resume> + 34: 000280e7 jalr t0 + 38: fc9ff06f j 0 <_snitch_park> diff --git a/target/snitch_cluster/test/bootrom.elf b/target/snitch_cluster/test/bootrom.elf index 29c82e1ecd..07a241da2e 100755 Binary files a/target/snitch_cluster/test/bootrom.elf and b/target/snitch_cluster/test/bootrom.elf differ diff --git a/target/snitch_cluster/test/bootrom.sv b/target/snitch_cluster/test/bootrom.sv index 0806b4d00d..90a4c1dbdf 100644 --- a/target/snitch_cluster/test/bootrom.sv +++ b/target/snitch_cluster/test/bootrom.sv @@ -65497,34 +65497,34 @@ {8'h00}, /* 0x003e */ {8'h00}, /* 0x003d */ {8'h00}, /* 0x003c */ - {8'h00}, /* 0x003b */ - {8'h00}, /* 0x003a */ - {8'h00}, /* 0x0039 */ - {8'h00}, /* 0x0038 */ + {8'hfc}, /* 0x003b */ + {8'h9f}, /* 0x003a */ + {8'hf0}, /* 0x0039 */ + {8'h6f}, /* 0x0038 */ {8'h00}, /* 0x0037 */ - {8'h00}, /* 0x0036 */ - {8'h00}, /* 0x0035 */ - {8'h00}, /* 0x0034 */ + {8'h02}, /* 0x0036 */ + {8'h80}, /* 0x0035 */ + {8'he7}, /* 0x0034 */ {8'h00}, /* 0x0033 */ - {8'h00}, /* 0x0032 */ - {8'h00}, /* 0x0031 */ - {8'h00}, /* 0x0030 */ - {8'hfd}, /* 0x002f */ - {8'h5f}, /* 0x002e */ - {8'hf0}, /* 0x002d */ - {8'h6f}, /* 0x002c */ - {8'h00}, /* 0x002b */ - {8'h02}, /* 0x002a */ - {8'h80}, /* 0x0029 */ - {8'he7}, /* 0x0028 */ - {8'h15}, /* 0x0027 */ - {8'hc2}, /* 0x0026 */ - {8'h82}, /* 0x0025 */ - {8'h93}, /* 0x0024 */ - {8'hff}, /* 0x0023 */ - {8'hff}, /* 0x0022 */ - {8'hf2}, /* 0x0021 */ - {8'hb7}, /* 0x0020 */ + {8'h02}, /* 0x0032 */ + {8'ha2}, /* 0x0031 */ + {8'h83}, /* 0x0030 */ + {8'h00}, /* 0x002f */ + {8'h62}, /* 0x002e */ + {8'h82}, /* 0x002d */ + {8'hb3}, /* 0x002c */ + {8'h16}, /* 0x002b */ + {8'h83}, /* 0x002a */ + {8'h03}, /* 0x0029 */ + {8'h13}, /* 0x0028 */ + {8'hff}, /* 0x0027 */ + {8'hff}, /* 0x0026 */ + {8'hf3}, /* 0x0025 */ + {8'h37}, /* 0x0024 */ + {8'h00}, /* 0x0023 */ + {8'h00}, /* 0x0022 */ + {8'h02}, /* 0x0021 */ + {8'h97}, /* 0x0020 */ {8'h10}, /* 0x001f */ {8'h50}, /* 0x001e */ {8'h00}, /* 0x001d */ diff --git a/target/snitch_cluster/test/gen_bootrom_param.py b/target/snitch_cluster/test/gen_bootrom_param.py index c5d5ffcb92..b1fcdef744 100644 --- a/target/snitch_cluster/test/gen_bootrom_param.py +++ b/target/snitch_cluster/test/gen_bootrom_param.py @@ -18,7 +18,7 @@ from struct import * # Parse arguments. -parser = argparse.ArgumentParser(description="Generate thestral_bootrom.sv") +parser = argparse.ArgumentParser(description="Generate bootrom.sv") parser.add_argument("BINARY", help="Binary image for which to create a bootrom") parser.add_argument(