Page MenuHomeFreeBSD

D23139.1793418313.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D23139.1793418313.diff

Index: sys/riscv/riscv/locore.S
===================================================================
--- sys/riscv/riscv/locore.S
+++ sys/riscv/riscv/locore.S
@@ -53,6 +53,12 @@
.text
.globl _start
_start:
+ /* Set the global pointer */
+.option push
+.option norelax
+ lla gp, __global_pointer$
+.option pop
+
/* Get the physical address kernel loaded to */
lla t0, virt_map
ld t1, 0(t0)
@@ -168,6 +174,11 @@
.align 2
va:
+ /* Set the global pointer again, this time with the virtual address. */
+.option push
+.option norelax
+ lla gp, __global_pointer$
+.option pop
/* Setup supervisor trap vector */
la t0, cpu_exception_handler
@@ -177,12 +188,6 @@
li t0, 0
csrw sscratch, t0
- /* Set the global pointer */
-.option push
-.option norelax
- la gp, __global_pointer$
-.option pop
-
/* Initialize stack pointer */
la s3, initstack_end
mv sp, s3
@@ -322,6 +327,12 @@
.align 2
mpva:
+ /* Set the global pointer again, this time with the virtual address. */
+.option push
+.option norelax
+ lla gp, __global_pointer$
+.option pop
+
/* Setup supervisor trap vector */
la t0, cpu_exception_handler
csrw stvec, t0
@@ -330,12 +341,6 @@
li t0, 0
csrw sscratch, t0
- /* Set the global pointer */
-.option push
-.option norelax
- la gp, __global_pointer$
-.option pop
-
call init_secondary
END(mpentry)
#endif

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 31, 3:45 AM (4 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41252593
Default Alt Text
D23139.1793418313.diff (1 KB)

Event Timeline