diff options
author | Devarsh Thakkar | 2023-12-05 21:25:16 +0530 |
---|---|---|
committer | Tom Rini | 2024-01-29 14:49:17 -0500 |
commit | 1d3c266758570ea7d329746ae2d5b31fb12b9f61 (patch) | |
tree | 1809c412742618f13b3755b86d27c8a3eab7db6a /common | |
parent | 52a86e69e2043fb488be67f5cfbbdeb30a02ddae (diff) |
spl: Enforce framebuffer reservation from end of RAM
Add an API which enforces framebuffer reservation from end of RAM.
This is done so that next stage can directly skip this region before
carrying out further reservations.
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/spl.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 3ce5bfeec8b..b65c439e7aa 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -42,6 +42,7 @@ #include <fdt_support.h> #include <bootcount.h> #include <wdt.h> +#include <video.h> DECLARE_GLOBAL_DATA_PTR; DECLARE_BINMAN_MAGIC_SYM; @@ -152,6 +153,24 @@ void spl_fixup_fdt(void *fdt_blob) #endif } +int spl_reserve_video_from_ram_top(void) +{ + if (CONFIG_IS_ENABLED(VIDEO)) { + ulong addr; + int ret; + + addr = gd->ram_top; + ret = video_reserve(&addr); + if (ret) + return ret; + debug("Reserving %luk for video at: %08lx\n", + ((unsigned long)gd->relocaddr - addr) >> 10, addr); + gd->relocaddr = addr; + } + + return 0; +} + ulong spl_get_image_pos(void) { if (!CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS)) |