Page MenuHomeFreeBSD

D45474.id139387.diff
No OneTemporary

D45474.id139387.diff

diff --git a/sys/riscv/riscv/locore.S b/sys/riscv/riscv/locore.S
--- a/sys/riscv/riscv/locore.S
+++ b/sys/riscv/riscv/locore.S
@@ -187,7 +187,11 @@
/* Page tables END */
- /* Setup supervisor trap vector */
+ /*
+ * Set the supervisor trap vector temporarily. Enabling virtual memory
+ * may generate a page fault. We simply wish to continue onwards, so
+ * have the trap deliver us to 'va'.
+ */
lla t0, va
sub t0, t0, s9
li t1, KERNBASE
@@ -210,7 +214,7 @@
lla gp, __global_pointer$
.option pop
- /* Setup supervisor trap vector */
+ /* Set the trap vector to the real handler. */
la t0, cpu_exception_handler
csrw stvec, t0
@@ -318,7 +322,11 @@
/* Get the kernel's load address */
jal get_physmem
- /* Setup supervisor trap vector */
+ /*
+ * Set the supervisor trap vector temporarily. Enabling virtual memory
+ * may generate a page fault. We simply wish to continue onwards, so
+ * have the trap deliver us to 'mpva'.
+ */
lla t0, mpva
sub t0, t0, s9
li t1, KERNBASE
@@ -339,7 +347,7 @@
lla gp, __global_pointer$
.option pop
- /* Setup supervisor trap vector */
+ /* Set the trap vector to the real handler. */
la t0, cpu_exception_handler
csrw stvec, t0

File Metadata

Mime Type
text/plain
Expires
Fri, Sep 11, 8:02 AM (19 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38693866
Default Alt Text
D45474.id139387.diff (1 KB)

Event Timeline