summaryrefslogtreecommitdiff
path: root/arch/sandbox/include/asm/state.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2025-06-08 09:54:27 +0200
committerTom Rini <trini@konsulko.com>2025-06-26 13:45:33 -0600
commit5c8de1bcfb0024993d902fb5dcfe87546116799b (patch)
tree5436cac5a328331074de9da0c685f4735cada24b /arch/sandbox/include/asm/state.h
parentd50fd7f91168576918d1b4a6394bf57767ed7cc4 (diff)
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>
Diffstat (limited to 'arch/sandbox/include/asm/state.h')
-rw-r--r--arch/sandbox/include/asm/state.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h
index dc21a623106..9dea0980bfc 100644
--- a/arch/sandbox/include/asm/state.h
+++ b/arch/sandbox/include/asm/state.h
@@ -75,6 +75,7 @@ struct sandbox_state {
char **argv; /* Command line arguments */
const char *jumped_fname; /* Jumped from previous U-Boot */
const char *prog_fname; /* U-Boot executable filename */
+ uint8_t *mmap_addr; /* Memory allocated via mmap */
uint8_t *ram_buf; /* Emulated RAM buffer */
unsigned long ram_size; /* Size of RAM buffer */
const char *ram_buf_fname; /* Filename to use for RAM buffer */