The following address is hardcoded and breaks if the bootrom size, the scratch1 register offset or the number of instructions preceding these in the bootrom change. Generalize this.
|
# This offset can be calculated as follows: |
|
# - 0x20 (start of this bootrom) |
|
# + 0x1000 (bootrom size 4kB) |
|
# + 0x188 (offset of the scratch1 register) |
|
li t1, 0x1168 |