Page MenuHomeFreeBSD

D23436.1793693955.diff
No OneTemporary

Authored By
Unknown
Size
716 B
Referenced Files
None
Subscribers
None

D23436.1793693955.diff

Index: sys/conf/ldscript.riscv
===================================================================
--- sys/conf/ldscript.riscv
+++ sys/conf/ldscript.riscv
@@ -3,11 +3,19 @@
ENTRY(_start)
SEARCH_DIR(/usr/lib);
+
+/*
+ * Set the ELF LMA to the address that OpenSBI's fw_jump jumps to. This allows
+ * us to load the kernel with the -kernel flag in QEMU without having to embed
+ * it inside BBL or OpenSBI's fw_payload first.
+ */
+__OPENSBI_FW_JUMP_ADDR__ = 0x80200000; /* Note: 0x80400000 for RISCV32 */
+
SECTIONS
{
/* Read-only sections, merged into text segment: */
. = kernbase;
- .text : AT(ADDR(.text) - kernbase)
+ .text : AT(__OPENSBI_FW_JUMP_ADDR__)
{
*(.text)
*(.stub)

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 3, 8:19 AM (14 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41362329
Default Alt Text
D23436.1793693955.diff (716 B)

Event Timeline