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>
This commit is contained in:
Maximilian Brune 2023-09-18 14:19:53 +02:00 committed by Felix Held
parent 79b548cf3b
commit 6515e56006
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,11 @@
ALIAS_REGION(mem_stack, stack) ALIAS_REGION(mem_stack, stack)
#endif #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? */ /* TODO: Need to add DMA_COHERENT region like on ARM? */
#endif /* __ARCH_MEMLAYOUT_H */ #endif /* __ARCH_MEMLAYOUT_H */