From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=supreeth.venkatesh@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id 68A8A20945BB7 for ; Wed, 27 Sep 2017 11:56:03 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 67B471529; Wed, 27 Sep 2017 11:59:16 -0700 (PDT) Received: from u201365.usa.Arm.com (bc-c3-3-14.eu.iaas.arm.com [10.6.43.238]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 57D0A3F3E1; Wed, 27 Sep 2017 11:59:15 -0700 (PDT) From: Supreeth Venkatesh To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, Supreeth Venkatesh , Achin Gupta Date: Wed, 27 Sep 2017 19:58:58 +0100 Message-Id: <20170927185859.27833-1-supreeth.venkatesh@arm.com> X-Mailer: git-send-email 2.14.1 Subject: [PATCH v2 1/2] ArmPkg/Include: Add standard SMC function IDs for MM interface. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Sep 2017 18:56:03 -0000 This patch adds a list of function IDs that fall under the standard SMC range as defined in http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_ARM_MM_Interface_Specification.pdf. SMCs associated with Management Mode are in the range 0xC4000040 - 0xC400005f (64 bit) and 0x84000040 - 0x8400005f (32 bit). The function(s) available to the normal world: 1. Request services from the secure MM environment using MM_COMMUNICATE. It also defines MM return codes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Achin Gupta Signed-off-by: Supreeth Venkatesh --- ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h index 593a3ce729..37d0796649 100644 --- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h +++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2012-2014, ARM Limited. All rights reserved. +* Copyright (c) 2012-2017, ARM Limited. All rights reserved. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the BSD License @@ -40,6 +40,24 @@ #define ARM_SMC_STD_REVISION_MAJOR 0x0 #define ARM_SMC_STD_REVISION_MINOR 0x1 +/* + * Management Mode (MM) calls cover a subset of the Standard Service Call range. + * The list below is not exhaustive. + */ +#define ARM_SMC_ID_MM_VERSION_AARCH32 0x84000040 +#define ARM_SMC_ID_MM_VERSION_AARCH64 0xC4000040 + +// Request service from secure standalone MM environment +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH32 0x84000041 +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH64 0xC4000041 + +/* MM return error codes */ +#define ARM_SMC_MM_RET_SUCCESS 0 +#define ARM_SMC_MM_RET_NOT_SUPPORTED -1 +#define ARM_SMC_MM_RET_INVALID_PARAMS -2 +#define ARM_SMC_MM_RET_DENIED -3 +#define ARM_SMC_MM_RET_NO_MEMORY -4 + /* * Power State Coordination Interface (PSCI) calls cover a subset of the * Standard Service Call range. -- 2.14.1