Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/77974?usp=email )
Change subject: include/memlayout.h: Add OPENSBI linker macro ......................................................................
include/memlayout.h: Add OPENSBI linker macro
This adds an opensbi linker macro for easier integration into memlayout.ld linker scripts.
Signed-off-by: Maximilian Brune maximilian.brune@9elements.com Change-Id: I4f138de685c6bfb3cdbf79d63787eb0c5aab8590 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77974 Reviewed-by: Julius Werner jwerner@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/arch/riscv/include/arch/memlayout.h 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/arch/riscv/include/arch/memlayout.h b/src/arch/riscv/include/arch/memlayout.h index 3a77bd5..0c539d2 100644 --- a/src/arch/riscv/include/arch/memlayout.h +++ b/src/arch/riscv/include/arch/memlayout.h @@ -21,6 +21,11 @@ ALIAS_REGION(mem_stack, stack) #endif
+#define OPENSBI(addr, size) \ + _ = ASSERT(addr == CONFIG_OPENSBI_TEXT_START, \ + "opensbi linker address must equal CONFIG_OPENSBI_TEXT_START"); \ + REGION(opensbi, addr, size, 4K) + /* TODO: Need to add DMA_COHERENT region like on ARM? */
#endif /* __ARCH_MEMLAYOUT_H */