sandbox: align LMB memory
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 8 Jun 2025 07:54:27 +0000 (09:54 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 26 Jun 2025 19:45:33 +0000 (13:45 -0600)
commit5c8de1bcfb0024993d902fb5dcfe87546116799b
tree5436cac5a328331074de9da0c685f4735cada24b
parentd50fd7f91168576918d1b4a6394bf57767ed7cc4
sandbox: align LMB memory

To implement the EFI_SYSTEM_TABLE_POINTER we need 4 MiB aligned
memory.

On the sandbox LMB uses addresses relative to the start of a page aligned
RAM buffer allocated with mmap(). This leads to a mismatch of alignment
between EFI which uses pointers and LMB which uses phys_addr_t.

Ensure that the RAM buffer used for LMB is 4 MiB aligned.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
arch/sandbox/cpu/state.c
arch/sandbox/include/asm/state.h
include/configs/sandbox.h