From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.28812.1620635186520839859 for ; Mon, 10 May 2021 01:26:26 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8D1C4106F; Mon, 10 May 2021 01:26:23 -0700 (PDT) Received: from e120189.arm.com (unknown [10.57.33.207]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 493533F718; Mon, 10 May 2021 01:26:22 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, sami.mujawar@arm.com, leif@nuviainc.com, ardb+tianocore@kernel.org, Nicola.Mazzucato@arm.com Subject: [PATCH RESEND v1 1/1] ArmPkg: Update SCMI Base Protocol version to 0x20000 Date: Mon, 10 May 2021 09:26:16 +0100 Message-Id: <20210510082616.21372-1-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 From: Nicola Mazzucato The SCP-firmware has moved to full support for SCMIv2 which means that the base protocol can be either compliant with SCMI v1 or v2. Allow any version between SCMI v1.0 and SCMI v2.0 to be compatible with the current implementation. Signed-off-by: Nicola Mazzucato Signed-off-by: Pierre Gondois --- The changes can be seen at: https://github.com/PierreARM/edk2/tree/1732_Update_SCMI_version_v1 ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c | 10 ++++++---- ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c b/ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c index d5890a7633a2..fb4e79aa3610 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c @@ -4,9 +4,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent - System Control and Management Interface V1.0 - http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/ - DEN0056A_System_Control_and_Management_Interface.pdf + @par Specification Reference: + - Arm System Control and Management Interface - Platform Design Document + (https://developer.arm.com/documentation/den0056/) **/ #include @@ -86,7 +86,9 @@ ArmScmiDxeEntryPoint ( return Status; } - if (Version != BASE_PROTOCOL_VERSION) { + // Accept any version between SCMI v1.0 and SCMI v2.0 + if ((Version < BASE_PROTOCOL_VERSION_V1) || + (Version > BASE_PROTOCOL_VERSION_V2)) { ASSERT (FALSE); return EFI_UNSUPPORTED; } diff --git a/ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h b/ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h index 73ad3e32a2f5..c4b81c0f56d3 100644 --- a/ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h +++ b/ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h @@ -4,9 +4,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent - System Control and Management Interface V1.0 - http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/ - DEN0056A_System_Control_and_Management_Interface.pdf + @par Specification Reference: + - Arm System Control and Management Interface - Platform Design Document + (https://developer.arm.com/documentation/den0056/) **/ #ifndef ARM_SCMI_BASE_PROTOCOL_H_ @@ -14,7 +14,8 @@ #include -#define BASE_PROTOCOL_VERSION 0x10000 +#define BASE_PROTOCOL_VERSION_V1 0x10000 +#define BASE_PROTOCOL_VERSION_V2 0x20000 #define NUM_PROTOCOL_MASK 0xFFU #define NUM_AGENT_MASK 0xFFU @@ -165,4 +166,3 @@ typedef enum { } SCMI_MESSAGE_ID_BASE; #endif /* ARM_SCMI_BASE_PROTOCOL_H_ */ - -- 2.17.1