diff options
-rw-r--r-- | firmware/fw_base.S | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/fw_base.S b/firmware/fw_base.S index 225f64f..f2b1ee0 100644 --- a/firmware/fw_base.S +++ b/firmware/fw_base.S @@ -13,6 +13,9 @@ #include <sbi/sbi_scratch.h> #include <sbi/sbi_trap.h> +#define BOOT_STATUS_RELOCATE_DONE 1 +#define BOOT_STATUS_BOOT_HART_DONE 2 + .macro MOV_3R __d0, __s0, __d1, __s1, __d2, __s2 add \__d0, \__s0, zero add \__d1, \__s1, zero @@ -115,7 +118,7 @@ _wait_relocate_copy_done: add t3, t3, t1 1: /* waitting for relocate copy done (_boot_status == 1) */ - li t4, 1 + li t4, BOOT_STATUS_RELOCATE_DONE REG_L t5, 0(t2) /* Reduce the bus traffic so that boot hart may proceed faster */ nop @@ -127,7 +130,7 @@ _relocate_done: /* mark relocate copy done */ la t0, _boot_status - li t1, 1 + li t1, BOOT_STATUS_RELOCATE_DONE REG_S t1, 0(t0) fence rw, rw @@ -302,7 +305,7 @@ _fdt_reloc_again: _fdt_reloc_done: /* mark boot hart done */ - li t0, 2 + li t0, BOOT_STATUS_BOOT_HART_DONE la t1, _boot_status REG_S t0, 0(t1) fence rw, rw @@ -310,7 +313,7 @@ _fdt_reloc_done: /* waitting for boot hart done (_boot_status == 2) */ _wait_for_boot_hart: - li t0, 2 + li t0, BOOT_STATUS_BOOT_HART_DONE la t1, _boot_status REG_L t1, 0(t1) /* Reduce the bus traffic so that boot hart may proceed faster */ |