mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01: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:
@@ -21,10 +21,22 @@ PLATFORM_SYS_CLINT=y
|
|||||||
# Blobs to build
|
# Blobs to build
|
||||||
FW_TEXT_START=0x80000000
|
FW_TEXT_START=0x80000000
|
||||||
FW_JUMP=y
|
FW_JUMP=y
|
||||||
|
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
|
FW_JUMP_ADDR=0x80200000
|
||||||
|
endif
|
||||||
FW_JUMP_FDT_ADDR=0x82200000
|
FW_JUMP_FDT_ADDR=0x82200000
|
||||||
FW_PAYLOAD=y
|
FW_PAYLOAD=y
|
||||||
|
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
|
FW_PAYLOAD_OFFSET=0x200000
|
||||||
|
endif
|
||||||
FW_PAYLOAD_FDT_ADDR=0x82200000
|
FW_PAYLOAD_FDT_ADDR=0x82200000
|
||||||
|
|
||||||
# External Libraries to include
|
# External Libraries to include
|
||||||
|
@@ -30,12 +30,22 @@ PLATFORM_SYS_CLINT=y
|
|||||||
# Blobs to build
|
# Blobs to build
|
||||||
FW_TEXT_START=0x80000000
|
FW_TEXT_START=0x80000000
|
||||||
FW_JUMP=y
|
FW_JUMP=y
|
||||||
# This needs to be 4MB alligned for 32-bit support
|
ifeq ($(OPENSBI_CC_XLEN), 32)
|
||||||
|
# This needs to be 4MB alligned for 32-bit system
|
||||||
FW_JUMP_ADDR=0x80400000
|
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_JUMP_FDT_ADDR=0x82200000
|
||||||
FW_PAYLOAD=y
|
FW_PAYLOAD=y
|
||||||
# This needs to be 4MB alligned for 32-bit support
|
ifeq ($(OPENSBI_CC_XLEN), 32)
|
||||||
|
# This needs to be 4MB alligned for 32-bit system
|
||||||
FW_PAYLOAD_OFFSET=0x400000
|
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
|
FW_PAYLOAD_FDT_ADDR=0x82200000
|
||||||
|
|
||||||
# External Libraries to include
|
# External Libraries to include
|
||||||
|
Reference in New Issue
Block a user