Skip to content
Snippets Groups Projects
Commit fc61de3f authored by Raymond Mao's avatar Raymond Mao Committed by Tom Rini
Browse files

arm: Get bloblist from boot arguments


Add arch custom function to get bloblist from boot arguments.
Check whether boot arguments aligns with the register conventions
defined in FW Handoff spec v0.9.

Signed-off-by: default avatarRaymond Mao <raymond.mao@linaro.org>
parent 11f31712
No related branches found
No related tags found
No related merge requests found
...@@ -85,6 +85,8 @@ obj-y += psci-dt.o ...@@ -85,6 +85,8 @@ obj-y += psci-dt.o
obj-$(CONFIG_DEBUG_LL) += debug.o obj-$(CONFIG_DEBUG_LL) += debug.o
obj-$(CONFIG_BLOBLIST) += xferlist.o
# For EABI conformant tool chains, provide eabi_compat() # For EABI conformant tool chains, provide eabi_compat()
ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
extra-y += eabi_compat.o extra-y += eabi_compat.o
......
// 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, ulong size)
{
int ret;
ret = bloblist_check(saved_args[3], size);
if (ret)
return ret;
ret = bloblist_check_reg_conv(saved_args[0], saved_args[2],
saved_args[1]);
if (ret)
return ret;
return bloblist_reloc((void *)addr, size);
}
/* SPDX-License-Identifier: GPL-2.0+ BSD-3-Clause */
/*
* Copyright (C) 2023 Linaro Limited
* Author: Raymond Mao <raymond.mao@linaro.org>
*/
#ifndef _XFERLIST_H_
#define _XFERLIST_H_
/*
* Boot parameters saved from start.S
* saved_args[0]: FDT base address
* saved_args[1]: Bloblist signature
* saved_args[2]: must be 0
* saved_args[3]: Bloblist base address
*/
extern unsigned long saved_args[];
#endif /* _XFERLIST_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment