blob: f9c5d88bd47d4c3463904e94685ad60ba235e129 [file] [log] [blame]
Raymond Maob579a692024-02-03 08:36:25 -08001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2023 Linaro Limited
4 * Author: Raymond Mao <raymond.mao@linaro.org>
5 */
6#include <linux/types.h>
7#include <errno.h>
8#include <bloblist.h>
9#include "xferlist.h"
10
11int xferlist_from_boot_arg(ulong addr, ulong size)
12{
13 int ret;
14
15 ret = bloblist_check(saved_args[3], size);
16 if (ret)
17 return ret;
18
19 ret = bloblist_check_reg_conv(saved_args[0], saved_args[2],
20 saved_args[1]);
21 if (ret)
22 return ret;
23
24 return bloblist_reloc((void *)addr, size);
25}