Module Name: src
Committed By: skrll
Date: Sun Nov 8 10:08:28 UTC 2020
Modified Files:
src/sys/arch/riscv/riscv: locore.S
Log Message:
Fix register usage
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/riscv/riscv/locore.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/riscv/riscv/locore.S
diff -u src/sys/arch/riscv/riscv/locore.S:1.19 src/sys/arch/riscv/riscv/locore.S:1.20
--- src/sys/arch/riscv/riscv/locore.S:1.19 Sun Nov 8 08:12:17 2020
+++ src/sys/arch/riscv/riscv/locore.S Sun Nov 8 10:08:28 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.19 2020/11/08 08:12:17 skrll Exp $ */
+/* $NetBSD: locore.S,v 1.20 2020/11/08 10:08:28 skrll Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@ ENTRY_NP(start)
add s1, s1, s10 // PAGE_SIZE
addi s1, s1, -1 // -1 == PAGE_MASK
- neg a1, a0 // -PAGE_SIZE
+ neg a1, s10 // -PAGE_SIZE
and s1, s1, a1 // s1 is page aligned end of kernel
// s1 = uarea
add s2, s1, s9 // s2 = first PDE page