mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-03-16 11:51:33 +00:00
platform: qemu: Set FW_JUMP_ADDR and FW_PAYLOAD_OFFSET as-per XLEN
The current 4MB aligned FW_JUMP_ADDR and FW_PAYLOAD_OFFSET breaks U-Boot on QEMU virt and sifive_u machines. Instead of using 4MB aligned for both 32bit and 64bit systems, we use different values based compiler XLEN. Another advantage of this approach will be that our fw_payload.bin will smaller for 64bit systems. Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
parent
ab12d6ef8f
commit
84169e2e69
2 changed files with 28 additions and 6 deletions
|
@ -21,10 +21,22 @@ PLATFORM_SYS_CLINT=y
|
|||
# Blobs to build
|
||||
FW_TEXT_START=0x80000000
|
||||
FW_JUMP=y
|
||||
FW_JUMP_ADDR=0x80200000
|
||||
ifeq ($(OPENSBI_CC_XLEN), 32)
|
||||
# This needs to be 4MB alligned for 32-bit system
|
||||
FW_JUMP_ADDR=0x80400000
|
||||
else
|
||||
# This needs to be 2MB alligned for 64-bit system
|
||||
FW_JUMP_ADDR=0x80200000
|
||||
endif
|
||||
FW_JUMP_FDT_ADDR=0x82200000
|
||||
FW_PAYLOAD=y
|
||||
FW_PAYLOAD_OFFSET=0x200000
|
||||
ifeq ($(OPENSBI_CC_XLEN), 32)
|
||||
# This needs to be 4MB alligned for 32-bit system
|
||||
FW_PAYLOAD_OFFSET=0x400000
|
||||
else
|
||||
# This needs to be 2MB alligned for 64-bit system
|
||||
FW_PAYLOAD_OFFSET=0x200000
|
||||
endif
|
||||
FW_PAYLOAD_FDT_ADDR=0x82200000
|
||||
|
||||
# External Libraries to include
|
||||
|
|
|
@ -30,12 +30,22 @@ PLATFORM_SYS_CLINT=y
|
|||
# Blobs to build
|
||||
FW_TEXT_START=0x80000000
|
||||
FW_JUMP=y
|
||||
# This needs to be 4MB alligned for 32-bit support
|
||||
FW_JUMP_ADDR=0x80400000
|
||||
ifeq ($(OPENSBI_CC_XLEN), 32)
|
||||
# This needs to be 4MB alligned for 32-bit system
|
||||
FW_JUMP_ADDR=0x80400000
|
||||
else
|
||||
# This needs to be 2MB alligned for 64-bit system
|
||||
FW_JUMP_ADDR=0x80200000
|
||||
endif
|
||||
FW_JUMP_FDT_ADDR=0x82200000
|
||||
FW_PAYLOAD=y
|
||||
# This needs to be 4MB alligned for 32-bit support
|
||||
FW_PAYLOAD_OFFSET=0x400000
|
||||
ifeq ($(OPENSBI_CC_XLEN), 32)
|
||||
# This needs to be 4MB alligned for 32-bit system
|
||||
FW_PAYLOAD_OFFSET=0x400000
|
||||
else
|
||||
# This needs to be 2MB alligned for 64-bit system
|
||||
FW_PAYLOAD_OFFSET=0x200000
|
||||
endif
|
||||
FW_PAYLOAD_FDT_ADDR=0x82200000
|
||||
|
||||
# External Libraries to include
|
||||
|
|
Loading…
Add table
Reference in a new issue