From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.106.52; helo=cam-smtp0.cambridge.arm.com; envelope-from=sami.mujawar@arm.com; receiver=edk2-devel@lists.01.org Received: from cam-smtp0.cambridge.arm.com (unknown [217.140.106.52]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 16C472194D3B9 for ; Thu, 24 Jan 2019 07:44:47 -0800 (PST) Received: from E107187.Arm.com (E107187.Arm.com [10.1.195.55]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id x0OFifCY013695; Thu, 24 Jan 2019 15:44:45 GMT From: Sami Mujawar To: edk2-devel@lists.01.org Cc: alexei.fedorov@arm.com, leif.lindholm@linaro.org, Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com Date: Thu, 24 Jan 2019 15:44:23 +0000 Message-Id: <20190124154436.21996-10-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20190124154436.21996-1-sami.mujawar@arm.com> References: <20190124154436.21996-1-sami.mujawar@arm.com> Subject: [PATCH v2 09/22] DynamicTablesPkg: Configuration Manager Protocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 X-List-Received-Date: Thu, 24 Jan 2019 15:44:48 -0000 Introduce configuration manager protocol interface that is used by the dynamic tables framework core to communicate with configuration manager. Configuration manager is a platform specific module that implements the configuration manager protocol. Table generators use this interface to retrieve the hardware information from the configuration manager. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- DynamicTablesPkg/DynamicTablesPkg.dec | 5 + DynamicTablesPkg/Include/Protocol/ConfigurationManagerProtocol.h | 128 ++++++++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/DynamicTablesPkg/DynamicTablesPkg.dec b/DynamicTablesPkg/DynamicTablesPkg.dec index b1a6c64948d01426fc95b8599fc17adaa8c35f3d..e5e731085a721f5f2a0129b4678dedbb0c7b985a 100644 --- a/DynamicTablesPkg/DynamicTablesPkg.dec +++ b/DynamicTablesPkg/DynamicTablesPkg.dec @@ -22,3 +22,8 @@ [Defines] [Includes] Include +[Protocols] + + # Configuration Manager Protocol GUID + gEdkiiConfigurationManagerProtocolGuid = { 0xd85a4835, 0x5a82, 0x4894, { 0xac, 0x2, 0x70, 0x6f, 0x43, 0xd5, 0x97, 0x8e } } + diff --git a/DynamicTablesPkg/Include/Protocol/ConfigurationManagerProtocol.h b/DynamicTablesPkg/Include/Protocol/ConfigurationManagerProtocol.h new file mode 100644 index 0000000000000000000000000000000000000000..02c3d22ca7e961058c2c157e7f5a981e1418535e --- /dev/null +++ b/DynamicTablesPkg/Include/Protocol/ConfigurationManagerProtocol.h @@ -0,0 +1,128 @@ +/** @file + + Copyright (c) 2017 - 2018, 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 + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + @par Glossary: + - Cm or CM - Configuration Manager + - Obj or OBJ - Object +**/ + +#ifndef CONFIGURATION_MANAGER_PROTOCOL_H_ +#define CONFIGURATION_MANAGER_PROTOCOL_H_ + +#include + +/** This macro defines the Configuration Manager Protocol GUID. + + GUID: {D85A4835-5A82-4894-AC02-706F43D5978E} +*/ +#define EDKII_CONFIGURATION_MANAGER_PROTOCOL_GUID \ + { 0xd85a4835, 0x5a82, 0x4894, \ + { 0xac, 0x2, 0x70, 0x6f, 0x43, 0xd5, 0x97, 0x8e } \ + }; + +/** This macro defines the Configuration Manager Protocol Revision. +*/ +#define EDKII_CONFIGURATION_MANAGER_PROTOCOL_REVISION CREATE_REVISION (1, 0) + +#pragma pack(1) + +/** + Forward declarations: +*/ +typedef struct ConfigurationManagerProtocol EDKII_CONFIGURATION_MANAGER_PROTOCOL; +typedef struct PlatformRepositoryInfo EDKII_PLATFORM_REPOSITORY_INFO; + +/** The GetObject function defines the interface implemented by the + Configuration Manager Protocol for returning the Configuration + Manager Objects. + + @param [in] This Pointer to the Configuration Manager Protocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object. If + unused this must be CM_NULL_TOKEN. + @param [out] CmObject Pointer to the Configuration Manager Object + descriptor describing the requested Object. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not found. + @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration Manager + is less than the Object size for the requested + object. +**/ +typedef +EFI_STATUS +(EFIAPI * EDKII_CONFIGURATION_MANAGER_GET_OBJECT) ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ); + +/** The SetObject function defines the interface implemented by the + Configuration Manager Protocol for updating the Configuration + Manager Objects. + + @param [in] This Pointer to the Configuration Manager Protocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object. If + unused this must be CM_NULL_TOKEN. + @param [out] CmObject Pointer to the Configuration Manager Object + descriptor describing the Object. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not found. + @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration Manager + is less than the Object size for the requested + object. + @retval EFI_UNSUPPORTED This operation is not supported. +**/ +typedef +EFI_STATUS +(EFIAPI * EDKII_CONFIGURATION_MANAGER_SET_OBJECT) ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN CM_OBJ_DESCRIPTOR * CONST CmObject + ); + +/** The EDKII_CONFIGURATION_MANAGER_PROTOCOL structure describes the + Configuration Manager Protocol interface. +*/ +typedef struct ConfigurationManagerProtocol { + /// The Configuration Manager Protocol revision. + UINT32 Revision; + + /** The interface used to request information about + the Configuration Manager Objects. + */ + EDKII_CONFIGURATION_MANAGER_GET_OBJECT GetObject; + + /** The interface used to update the information stored + in the Configuration Manager repository. + */ + EDKII_CONFIGURATION_MANAGER_SET_OBJECT SetObject; + + /** Pointer to an implementation defined abstract repository + provisioned by the Configuration Manager. + */ + EDKII_PLATFORM_REPOSITORY_INFO * PlatRepoInfo; +} EDKII_CONFIGURATION_MANAGER_PROTOCOL; + +/** The Configuration Manager Protocol GUID. +*/ +extern EFI_GUID gEdkiiConfigurationManagerProtocolGuid; + +#pragma pack() + +#endif // CONFIGURATION_MANAGER_PROTOCOL_H_ -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'