diff options
author | Tom Rini <trini@konsulko.com> | 2024-01-29 14:49:25 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-01-29 14:49:25 -0500 |
commit | 073f4f10b9941c7b3cec7db41c82ac00b811eaba (patch) | |
tree | d738f7aac345d7c1cfdd9a5d22c7211156d202ce /common/spl | |
parent | 7af90646df59dd7a4e0809c67ded6df835fd4808 (diff) | |
parent | aaeb330cac116a1a41c97c8e7a8349b8aea914c2 (diff) | |
download | u-boot-073f4f10b9941c7b3cec7db41c82ac00b811eaba.tar.gz u-boot-073f4f10b9941c7b3cec7db41c82ac00b811eaba.tar.bz2 u-boot-073f4f10b9941c7b3cec7db41c82ac00b811eaba.zip |
Merge patch series "Move framebuffer reservation for SPL to RAM end"
Devarsh Thakkar <devarsht@ti.com> says:
Move video memory reservation for SPL at end of RAM so that it does
not interefere with reservations for next stage so that the next stage
need not have holes in between for passed regions and instead it can
maintain continuity in reservations.
Also catch the bloblist before starting reservations to avoid the same
problem.
While at it, also fill missing fields in video handoff struct before
passing it to next stage.
This is as per discussions at :
For moving SPL framebuffer reservation at end of RAM:
https://lore.kernel.org/all/CAPnjgZ3xSoe_G3yrqwuAvoiVjUfZ+YQgkOR0ZTVXGT9VK8TwJg@mail.gmail.com/
For filling missing video handoff fields :
https://lore.kernel.org/all/CAPnjgZ1Hs0rNf0JDirp6YPsOQ5=QqQSP9g9qRwLoOASUV8a4cw@mail.gmail.com/
Diffstat (limited to 'common/spl')
-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 3ce5bfeec8..b65c439e7a 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)) |