summaryrefslogtreecommitdiff
path: root/arch/riscv/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/cpu')
-rw-r--r--arch/riscv/cpu/mtrap.S3
-rw-r--r--arch/riscv/cpu/start.S5
-rw-r--r--arch/riscv/cpu/u-boot.lds1
3 files changed, 4 insertions, 5 deletions
diff --git a/arch/riscv/cpu/mtrap.S b/arch/riscv/cpu/mtrap.S
index 407ecfa9c0..e40c7bd3f4 100644
--- a/arch/riscv/cpu/mtrap.S
+++ b/arch/riscv/cpu/mtrap.S
@@ -64,7 +64,8 @@ trap_entry:
SREG x31, 31 * REGBYTES(sp)
csrr a0, MODE_PREFIX(cause)
csrr a1, MODE_PREFIX(epc)
- mv a2, sp
+ csrr a2, MODE_PREFIX(tval)
+ mv a3, sp
jal handle_trap
csrw MODE_PREFIX(epc), a0
diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
index f3dccdbe4c..6b3ff99c38 100644
--- a/arch/riscv/cpu/start.S
+++ b/arch/riscv/cpu/start.S
@@ -359,9 +359,8 @@ relocate_secondary_harts:
call_board_init_r:
jal invalidate_icache_all
jal flush_dcache_all
- la t0, board_init_r
- mv t4, t0 /* offset of board_init_r() */
- add t4, t4, t6 /* real address of board_init_r() */
+ la t0, board_init_r /* offset of board_init_r() */
+ add t4, t0, t6 /* real address of board_init_r() */
/*
* setup parameters for board_init_r
*/
diff --git a/arch/riscv/cpu/u-boot.lds b/arch/riscv/cpu/u-boot.lds
index 838a844399..c00d17c736 100644
--- a/arch/riscv/cpu/u-boot.lds
+++ b/arch/riscv/cpu/u-boot.lds
@@ -32,7 +32,6 @@ SECTIONS
. = ALIGN(4);
.data : {
- __global_pointer$ = . + 0x800;
*(.data*)
}
. = ALIGN(4);