bloblist: refactor xferlist and bloblist

Refactor the xferlist to remove the relocating when bloblist passed
from the boot args.
Refactor bloblist init to use incoming standard passage by default
if a valid transfer list exists in the boot args.
For bloblist relocation, use the actual total size if it has a smaller
BLOBLIST_SIZE_RELOC.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
Raymond Mao
2025-02-19 16:02:19 -08:00
committed by Tom Rini
parent 42aebf0f98
commit 6799f09069
4 changed files with 66 additions and 54 deletions

View File

@@ -483,19 +483,18 @@ static inline int bloblist_maybe_init(void)
* @rfdt: Register that holds the FDT base address.
* @rzero: Register that must be zero.
* @rsig: Register that holds signature and register conventions version.
* @xlist: Register that holds the transfer list.
* Return: 0 if OK, -EIO if the bloblist is not compliant to the register
* conventions.
*/
int bloblist_check_reg_conv(ulong rfdt, ulong rzero, ulong rsig);
int bloblist_check_reg_conv(ulong rfdt, ulong rzero, ulong rsig, ulong xlist);
/**
* xferlist_from_boot_arg() - Get bloblist from the boot args and relocate it
* to the specified address.
* xferlist_from_boot_arg() - Get bloblist from the boot args.
*
* @addr: Address for the bloblist
* @size: Size of space reserved for the bloblist
* @addr: Address of the bloblist
* Return: 0 if OK, else on error
*/
int xferlist_from_boot_arg(ulong addr, ulong size);
int xferlist_from_boot_arg(ulong *addr);
#endif /* __BLOBLIST_H */