diff options
| author | Tom Rini <[email protected]> | 2025-02-11 18:09:05 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-02-11 18:09:05 -0600 |
| commit | 87dec3078a0a36d2e6da7602b9a750010c2d111d (patch) | |
| tree | 1f18e43f1a5a6e32dd4f0319cf58a5cfc3fbdf91 /common | |
| parent | b4df7003dfd06da630c248c958993a686fb1619b (diff) | |
| parent | 42aebf0f987798599b5f2d2ca6098a775bb9f448 (diff) | |
Merge patch series "Enable bloblist support on Vexpress64"
Harrison Mutai <[email protected]> says:
This series of patches enhances the vexpress64 platform by enabling bloblist
support. It also introduces support for CONFIG_BLOBLIST_PASSAGE. This is
necessary to boot vexpress64 and other boards without manually specifying a
fixed address and size for the bloblist.
After this change, all the bloblist init modes are supported (i.e., fixed,
alloc, passage) and Vexpress64 boots with CONFIG_BLOBLIST_PASSAGE.
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'common')
| -rw-r--r-- | common/Kconfig | 14 | ||||
| -rw-r--r-- | common/bloblist.c | 18 |
2 files changed, 20 insertions, 12 deletions
diff --git a/common/Kconfig b/common/Kconfig index 7685914fa6f..7b2db46ef06 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1055,8 +1055,8 @@ choice config BLOBLIST_FIXED bool "Place bloblist at a fixed address in memory" help - Select this to used a fixed memory address for the bloblist. If the - bloblist exists at this address from a previous phase, it used as is. + Select this to use a fixed memory address for the bloblist. If the + bloblist exists at this address from a previous phase, it is used as is. If not it is created at this address in U-Boot. config BLOBLIST_ALLOC @@ -1066,6 +1066,12 @@ config BLOBLIST_ALLOC specify a fixed address on systems where this is unknown or can change at runtime. +config BLOBLIST_PASSAGE + bool "Use bloblist in-place" + help + Use a bloblist in the incoming standard passage. The size is detected + automatically so CONFIG_BLOBLIST_SIZE can be 0. + endchoice config BLOBLIST_ADDR @@ -1080,17 +1086,17 @@ config BLOBLIST_ADDR config BLOBLIST_SIZE hex "Size of bloblist" + default 0x0 if BLOBLIST_PASSAGE default 0x400 help Sets the size of the bloblist in bytes. This must include all overhead (alignment, bloblist header, record header). The bloblist is set up in the first part of U-Boot to run (TPL, SPL or U-Boot - proper), and this sane bloblist is used for subsequent phases. + proper), and this same bloblist is used for subsequent phases. config BLOBLIST_SIZE_RELOC hex "Size of bloblist after relocation" default BLOBLIST_SIZE if BLOBLIST_FIXED || BLOBLIST_ALLOC - default 0x0 if BLOBLIST_PASSAGE default 0x20000 if (ARM && EFI_LOADER && GENERATE_ACPI_TABLE) help Sets the size of the bloblist in bytes after relocation. Since U-Boot diff --git a/common/bloblist.c b/common/bloblist.c index ab48a3cdb98..31ba0311090 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -488,6 +488,9 @@ int bloblist_reloc(void *to, uint to_size) { struct bloblist_hdr *hdr; + if (!to_size) + return 0; + if (to_size < gd->bloblist->total_size) return -ENOSPC; @@ -518,13 +521,6 @@ int bloblist_init(void) * at a fixed address. */ bool from_addr = fixed && !xpl_is_first_phase(); - /* - * If U-Boot is in the first phase that an arch custom routine should - * install the bloblist passed from previous loader to this fixed - * address. - */ - bool from_boot_arg = fixed && xpl_is_first_phase(); - if (xpl_prev_phase() == PHASE_TPL && !IS_ENABLED(CONFIG_TPL_BLOBLIST)) from_addr = false; if (fixed) @@ -532,7 +528,13 @@ int bloblist_init(void) CONFIG_BLOBLIST_ADDR); size = CONFIG_BLOBLIST_SIZE; - if (from_boot_arg) + + /* + * If the current boot stage is the first phase of U-Boot, then an + * architecture-specific routine should be used to handle the bloblist + * passed from the previous boot loader + */ + if (xpl_is_first_phase() && !IS_ENABLED(CONFIG_BLOBLIST_ALLOC)) ret = xferlist_from_boot_arg(addr, size); else if (from_addr) ret = bloblist_check(addr, size); |
