Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136023046
D22970.id66145.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
D22970.id66145.diff
View Options
Index: head/sys/riscv/riscv/genassym.c
===================================================================
--- head/sys/riscv/riscv/genassym.c
+++ head/sys/riscv/riscv/genassym.c
@@ -101,3 +101,9 @@
ASSYM(TF_SSTATUS, offsetof(struct trapframe, tf_sstatus));
ASSYM(RISCV_BOOTPARAMS_SIZE, sizeof(struct riscv_bootparams));
+ASSYM(RISCV_BOOTPARAMS_KERN_L1PT, offsetof(struct riscv_bootparams, kern_l1pt));
+ASSYM(RISCV_BOOTPARAMS_KERN_PHYS, offsetof(struct riscv_bootparams, kern_phys));
+ASSYM(RISCV_BOOTPARAMS_KERN_STACK, offsetof(struct riscv_bootparams,
+ kern_stack));
+ASSYM(RISCV_BOOTPARAMS_DTBP_VIRT, offsetof(struct riscv_bootparams, dtbp_virt));
+ASSYM(RISCV_BOOTPARAMS_DTBP_PHYS, offsetof(struct riscv_bootparams, dtbp_phys));
Index: head/sys/riscv/riscv/locore.S
===================================================================
--- head/sys/riscv/riscv/locore.S
+++ head/sys/riscv/riscv/locore.S
@@ -206,15 +206,15 @@
/* Fill riscv_bootparams */
la t0, pagetable_l1
- sd t0, 0(sp) /* kern_l1pt */
- sd s9, 8(sp) /* kern_phys */
+ sd t0, RISCV_BOOTPARAMS_KERN_L1PT(sp)
+ sd s9, RISCV_BOOTPARAMS_KERN_PHYS(sp)
la t0, initstack
- sd t0, 16(sp) /* kern_stack */
+ sd t0, RISCV_BOOTPARAMS_KERN_STACK(sp)
li t0, (VM_MAX_KERNEL_ADDRESS - 2 * L2_SIZE)
- sd t0, 24(sp) /* dtbp_virt */
- sd a1, 32(sp) /* dtbp_phys */
+ sd t0, RISCV_BOOTPARAMS_DTBP_VIRT(sp)
+ sd a1, RISCV_BOOTPARAMS_DTBP_PHYS(sp)
mv a0, sp
call _C_LABEL(initriscv) /* Off we go */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 16, 4:27 AM (6 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25352521
Default Alt Text
D22970.id66145.diff (1 KB)
Attached To
Mode
D22970: RISC-V: Don't hard-code field offsets of struct riscv_bootparams
Attached
Detach File
Event Timeline
Log In to Comment