aboutsummaryrefslogtreecommitdiff
path: root/platform/qemu/virt/config.mk
diff options
context:
space:
mode:
Diffstat (limited to 'platform/qemu/virt/config.mk')
-rw-r--r--platform/qemu/virt/config.mk18
1 files changed, 14 insertions, 4 deletions
diff --git a/platform/qemu/virt/config.mk b/platform/qemu/virt/config.mk
index fcd25c8..cd87745 100644
--- a/platform/qemu/virt/config.mk
+++ b/platform/qemu/virt/config.mk
@@ -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