diff options
author | Maximilian Brune <maximilian.brune@9elements.com> | 2023-09-18 14:19:53 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-01-18 15:30:05 +0000 |
commit | 6515e56006089fb6bddad2cd998b2bd916583505 (patch) | |
tree | 2358b3ec341bb0359207f74b1ddebd8bd857c473 /src | |
parent | 79b548cf3b9440dd258e4f88fef33b4b5c6d6fff (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/riscv/include/arch/memlayout.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/riscv/include/arch/memlayout.h b/src/arch/riscv/include/arch/memlayout.h index 3a77bd527b..0c539d27a5 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 */ |