lkml.org 
[lkml]   [2022]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH v2 4/5] RISC-V: purgatory: Use XLEN-length loads to support rv32
Date
From
This uses an explicit "ld" to load up target address, which dosn't work
on rv32. Convert it to a REG_L macro, like everywhere else.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
arch/riscv/purgatory/entry.S | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/purgatory/entry.S b/arch/riscv/purgatory/entry.S
index 0194f4554130..71c50fef051c 100644
--- a/arch/riscv/purgatory/entry.S
+++ b/arch/riscv/purgatory/entry.S
@@ -8,6 +8,8 @@
*
*/

+#include <asm/asm.h>
+
.macro size, sym:req
.size \sym, . - \sym
.endm
@@ -26,7 +28,7 @@ purgatory_start:
/* Start new image. */
mv a0, s0
mv a1, s1
- ld a2, riscv_kernel_entry
+ REG_L a2, riscv_kernel_entry
jr a2

size purgatory_start
@@ -41,7 +43,7 @@ size purgatory_start

.globl riscv_kernel_entry
riscv_kernel_entry:
- .quad 0
+ REG_ASM 0
size riscv_kernel_entry

.end
--
2.34.1
\
 
 \ /
  Last update: 2022-06-24 06:51    [W:0.059 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site