]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: Add ARM SMC Architecture functions to ArmStdSmc.h
authorRebecca Cran <rebecca@nuviainc.com>
Mon, 8 Feb 2021 00:52:34 +0000 (17:52 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 8 Feb 2021 19:35:23 +0000 (19:35 +0000)
The ARM SMC Architecture functions were missing from ArmStdSmc.h.
Add them, based on the SMC Calling Convention version 1.2 specification.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
ArmPkg/Include/IndustryStandard/ArmStdSmc.h

index 3509eb680f183a8f2ea2a54cf5f6bf5cbfa682bf..9e0a3a3960d5361c839c3b27953dee2891ebaa86 100644 (file)
@@ -1,9 +1,13 @@
 /** @file\r
 *\r
+*  Copyright (c) 2020, NUVIA Inc. All rights reserved.<BR>\r
 *  Copyright (c) 2012-2017, ARM Limited. All rights reserved.\r
 *\r
 *  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 *\r
+* @par Revision Reference:\r
+*  - SMC Calling Convention version 1.2\r
+*    (https://developer.arm.com/documentation/den0028/c/?lang=en)\r
 **/\r
 \r
 #ifndef __ARM_STD_SMC_H__\r
 #define ARM_SMC_MM_RET_DENIED              -3\r
 #define ARM_SMC_MM_RET_NO_MEMORY           -4\r
 \r
+// ARM Architecture Calls\r
+#define SMCCC_VERSION           0x80000000\r
+#define SMCCC_ARCH_FEATURES     0x80000001\r
+#define SMCCC_ARCH_SOC_ID       0x80000002\r
+#define SMCCC_ARCH_WORKAROUND_1 0x80008000\r
+#define SMCCC_ARCH_WORKAROUND_2 0x80007FFF\r
+\r
+#define SMC_ARCH_CALL_SUCCESS            0\r
+#define SMC_ARCH_CALL_NOT_SUPPORTED     -1\r
+#define SMC_ARCH_CALL_NOT_REQUIRED      -2\r
+#define SMC_ARCH_CALL_INVALID_PARAMETER -3\r
+\r
 /*\r
  * Power State Coordination Interface (PSCI) calls cover a subset of the\r
  * Standard Service Call range.\r