Thread (14 messages) 14 messages, 2 authors, 2024-02-23
STALE866d
Revisions (5)
  1. v1 [diff vs current]
  2. v1 current
  3. v1 [diff vs current]
  4. v2 [diff vs current]
  5. v2 [diff vs current]

[PATCH 3/4] platform: Apply relocatable address

From: Anup Patel <anup@brainfault.org>
Date: 2024-02-23 05:03:09

On Fri, Feb 2, 2024 at 9:35?AM Inochi Amaoto [off-list ref] wrote:
Since jump and payload firmware support relocatable address, make
general platform use runtime relocatable address.

Signed-off-by: Inochi Amaoto <redacted>
This patch should also update platform/template/objects.mk.

Regards,
Anup
quoted hunk ↗ jump to hunk
---
 platform/generic/objects.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/platform/generic/objects.mk b/platform/generic/objects.mk
index 136853e..85aa723 100644
--- a/platform/generic/objects.mk
+++ b/platform/generic/objects.mk
@@ -27,12 +27,12 @@ FW_DYNAMIC=y
 FW_JUMP=y
 ifeq ($(PLATFORM_RISCV_XLEN), 32)
   # This needs to be 4MB aligned for 32-bit system
-  FW_JUMP_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x400000)))
+  FW_JUMP_OFFSET=0x400000
 else
   # This needs to be 2MB aligned for 64-bit system
-  FW_JUMP_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x200000)))
+  FW_JUMP_OFFSET=0x200000
 endif
-FW_JUMP_FDT_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x2200000)))
+FW_JUMP_FDT_OFFSET=0x2200000
 FW_PAYLOAD=y
 ifeq ($(PLATFORM_RISCV_XLEN), 32)
   # This needs to be 4MB aligned for 32-bit system
@@ -41,4 +41,4 @@ else
   # This needs to be 2MB aligned for 64-bit system
   FW_PAYLOAD_OFFSET=0x200000
 endif
-FW_PAYLOAD_FDT_ADDR=$(FW_JUMP_FDT_ADDR)
+FW_PAYLOAD_FDT_OFFSET=$(FW_JUMP_FDT_OFFSET)
--
2.43.0
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help