blob: 6425936d354181365db5d78144c8f682cb6b6dc0 [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
Raymond Maoba72dd12025-02-19 16:02:19 -080011int xferlist_from_boot_arg(ulong *addr)
Raymond Maob579a692024-02-03 08:36:25 -080012{
13 int ret;
14
Raymond Maob579a692024-02-03 08:36:25 -080015 ret = bloblist_check_reg_conv(saved_args[0], saved_args[2],
Raymond Maoba72dd12025-02-19 16:02:19 -080016 saved_args[1], saved_args[3]);
Raymond Maob579a692024-02-03 08:36:25 -080017 if (ret)
18 return ret;
19
Raymond Maoba72dd12025-02-19 16:02:19 -080020 *addr = bloblist_get_base();
21
22 return 0;
Raymond Maob579a692024-02-03 08:36:25 -080023}