mirror of
https://xff.cz/git/u-boot/
synced 2025-09-22 19:12:18 +02:00
arm64: smccc: add support for SMCCCv1.2 x0-x17 registers
add support for x0-x17 registers used by the SMC calls In SMCCC v1.2 [1] arguments are passed in registers x1-x17. Results are returned in x0-x17. This work is inspired from the following kernel commit: arm64: smccc: Add support for SMCCCv1.2 extended input/output registers [1]: https://documentation-service.arm.com/static/5f8edaeff86e16515cdbe4c6?token= Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
This commit is contained in:
committed by
Tom Rini
parent
c07ad9520c
commit
096d471a76
@@ -1,6 +1,10 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2015, Linaro Limited
|
||||
* Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
|
||||
*
|
||||
* Authors:
|
||||
* Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
|
||||
*/
|
||||
#ifndef __LINUX_ARM_SMCCC_H
|
||||
#define __LINUX_ARM_SMCCC_H
|
||||
@@ -70,6 +74,47 @@ struct arm_smccc_res {
|
||||
unsigned long a3;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARM64
|
||||
/**
|
||||
* struct arm_smccc_1_2_regs - Arguments for or Results from SMC call
|
||||
* @a0-a17 argument values from registers 0 to 17
|
||||
*/
|
||||
struct arm_smccc_1_2_regs {
|
||||
unsigned long a0;
|
||||
unsigned long a1;
|
||||
unsigned long a2;
|
||||
unsigned long a3;
|
||||
unsigned long a4;
|
||||
unsigned long a5;
|
||||
unsigned long a6;
|
||||
unsigned long a7;
|
||||
unsigned long a8;
|
||||
unsigned long a9;
|
||||
unsigned long a10;
|
||||
unsigned long a11;
|
||||
unsigned long a12;
|
||||
unsigned long a13;
|
||||
unsigned long a14;
|
||||
unsigned long a15;
|
||||
unsigned long a16;
|
||||
unsigned long a17;
|
||||
};
|
||||
|
||||
/**
|
||||
* arm_smccc_1_2_smc() - make SMC calls
|
||||
* @args: arguments passed via struct arm_smccc_1_2_regs
|
||||
* @res: result values via struct arm_smccc_1_2_regs
|
||||
*
|
||||
* This function is used to make SMC calls following SMC Calling Convention
|
||||
* v1.2 or above. The content of the supplied param are copied from the
|
||||
* structure to registers prior to the SMC instruction. The return values
|
||||
* are updated with the content from registers on return from the SMC
|
||||
* instruction.
|
||||
*/
|
||||
asmlinkage void arm_smccc_1_2_smc(const struct arm_smccc_1_2_regs *args,
|
||||
struct arm_smccc_1_2_regs *res);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct arm_smccc_quirk - Contains quirk information
|
||||
* @id: quirk identification
|
||||
|
Reference in New Issue
Block a user