mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-15 03:36:59 +02:00
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>
24 lines
442 B
C
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;
|
|
}
|