Raymond Mao | b579a69 | 2024-02-03 08:36:25 -0800 | [diff] [blame] | 1 | // 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 | |
| 11 | int 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 | } |