Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163291474
D45474.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D45474.diff
View Options
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
@@ -197,7 +197,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'.
+ */
2:
lla t0, va
sub t0, t0, s9
@@ -221,7 +225,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
@@ -342,7 +346,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
@@ -365,7 +373,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
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 22, 7:08 PM (12 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35377866
Default Alt Text
D45474.diff (1 KB)
Attached To
Mode
D45474: riscv: improve commentary around initial stvec
Attached
Detach File
Event Timeline
Log In to Comment