Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150028561
D47457.id146101.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
D47457.id146101.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
@@ -83,8 +83,12 @@
lla t0, boot_hart
sw a0, 0(t0)
- /* Load zero as modulep */
- mv a0, zero
+ /*
+ * Stash the DTB pointer in the callee-saved register s4, and zero s3
+ * to indicate that we have no loader metadata.
+ */
+ mv s4, a1
+ mv s3, zero
j pagetables
/*
@@ -104,10 +108,12 @@
.option pop
/*
- * Zero a1 to indicate that we have no DTB pointer. It is already
- * included in the loader(8) metadata.
+ * Stash modulep in the callee-saved register s3, and zero s4 to
+ * indicate that we have no DTB pointer. It is already included in the
+ * loader(8) metadata.
*/
- mv a1, zero
+ mv s3, a0
+ mv s4, zero
/*
* Set up page tables: Our goal is to enable virtual memory, doing the
@@ -128,8 +134,8 @@
* here and will conditionally enable Sv48 (or higher) later.
*
* We arrive here with:
- * a0 - modulep or zero
- * a1 - zero or dtbp
+ * s3 - modulep or zero
+ * s4 - zero or dtbp
*/
pagetables:
/* Get the kernel's load address (kernstart) in s9 */
@@ -244,8 +250,8 @@
la t0, initstack
sd t0, RISCV_BOOTPARAMS_KERN_STACK(sp)
- sd a1, RISCV_BOOTPARAMS_DTBP_PHYS(sp)
- sd a0, RISCV_BOOTPARAMS_MODULEP(sp)
+ sd s4, RISCV_BOOTPARAMS_DTBP_PHYS(sp)
+ sd s3, RISCV_BOOTPARAMS_MODULEP(sp)
mv a0, sp
call _C_LABEL(initriscv) /* Off we go */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 29, 8:41 PM (19 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30553795
Default Alt Text
D47457.id146101.diff (1 KB)
Attached To
Mode
D47457: locore.S: stash boot arguments in saved registers
Attached
Detach File
Event Timeline
Log In to Comment