u-boot/arch/arm/lib/xferlist.c
Raymond Mao 6799f09069 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>
2025-02-19 18:49:36 -06:00

24 lines
442 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2023 Linaro Limited
* Author: Raymond Mao <raymond.mao@linaro.org>
*/
#include <linux/types.h>
#include <errno.h>
#include <bloblist.h>
#include "xferlist.h"
int xferlist_from_boot_arg(ulong *addr)
{
int ret;
ret = bloblist_check_reg_conv(saved_args[0], saved_args[2],
saved_args[1], saved_args[3]);
if (ret)
return ret;
*addr = bloblist_get_base();
return 0;
}