aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZong Li <zong@andestech.com>2018-08-02 11:21:56 -0400
committerPalmer Dabbelt <palmer@sifive.com>2018-08-13 11:31:31 -0400
commit94f592f0e5b9c17a7505119a2d6c0f1f529ae93d (patch)
tree1756b57cd7fd41d14e9902eba01283caee7d747b
parent62b0194368147def8c5a77ce604a125d620fc582 (diff)
RISC-V: Add the directive for alignment of stvec's value
The stvec's value must be 4 byte alignment by specification definition. These directives avoid to stvec be set the non-alignment value. Signed-off-by: Zong Li <zong@andestech.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
-rw-r--r--arch/riscv/kernel/head.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
index 6e07ed37bbff..c4d2c63f9a29 100644
--- a/arch/riscv/kernel/head.S
+++ b/arch/riscv/kernel/head.S
@@ -94,6 +94,7 @@ relocate:
94 or a0, a0, a1 94 or a0, a0, a1
95 sfence.vma 95 sfence.vma
96 csrw sptbr, a0 96 csrw sptbr, a0
97.align 2
971: 981:
98 /* Set trap vector to spin forever to help debug */ 99 /* Set trap vector to spin forever to help debug */
99 la a0, .Lsecondary_park 100 la a0, .Lsecondary_park
@@ -143,6 +144,7 @@ relocate:
143 tail smp_callin 144 tail smp_callin
144#endif 145#endif
145 146
147.align 2
146.Lsecondary_park: 148.Lsecondary_park:
147 /* We lack SMP support or have too many harts, so park this hart */ 149 /* We lack SMP support or have too many harts, so park this hart */
148 wfi 150 wfi