]> git.proxmox.com Git - mirror_edk2.git/commitdiff
DynamicTablesPkg: Configuration Manager Protocol
authorSami Mujawar <sami.mujawar@arm.com>
Sat, 15 Dec 2018 12:00:04 +0000 (12:00 +0000)
committerSami Mujawar <sami.mujawar@arm.com>
Tue, 19 Feb 2019 10:37:29 +0000 (10:37 +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 <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
DynamicTablesPkg/DynamicTablesPkg.dec
DynamicTablesPkg/Include/Protocol/ConfigurationManagerProtocol.h [new file with mode: 0644]

index b1a6c64948d01426fc95b8599fc17adaa8c35f3d..e5e731085a721f5f2a0129b4678dedbb0c7b985a 100644 (file)
@@ -22,3 +22,8 @@
 [Includes]\r
   Include\r
 \r
+[Protocols]\r
+\r
+  # Configuration Manager Protocol GUID\r
+  gEdkiiConfigurationManagerProtocolGuid = { 0xd85a4835, 0x5a82, 0x4894, { 0xac, 0x2, 0x70, 0x6f, 0x43, 0xd5, 0x97, 0x8e } }\r
+\r
diff --git a/DynamicTablesPkg/Include/Protocol/ConfigurationManagerProtocol.h b/DynamicTablesPkg/Include/Protocol/ConfigurationManagerProtocol.h
new file mode 100644 (file)
index 0000000..02c3d22
--- /dev/null
@@ -0,0 +1,128 @@
+/** @file\r
+\r
+  Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.\r
+\r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+  @par Glossary:\r
+    - Cm or CM   - Configuration Manager\r
+    - Obj or OBJ - Object\r
+**/\r
+\r
+#ifndef CONFIGURATION_MANAGER_PROTOCOL_H_\r
+#define CONFIGURATION_MANAGER_PROTOCOL_H_\r
+\r
+#include <ConfigurationManagerObject.h>\r
+\r
+/** This macro defines the Configuration Manager Protocol GUID.\r
+\r
+  GUID: {D85A4835-5A82-4894-AC02-706F43D5978E}\r
+*/\r
+#define EDKII_CONFIGURATION_MANAGER_PROTOCOL_GUID       \\r
+  { 0xd85a4835, 0x5a82, 0x4894,                         \\r
+    { 0xac, 0x2, 0x70, 0x6f, 0x43, 0xd5, 0x97, 0x8e }   \\r
+  };\r
+\r
+/** This macro defines the Configuration Manager Protocol Revision.\r
+*/\r
+#define EDKII_CONFIGURATION_MANAGER_PROTOCOL_REVISION  CREATE_REVISION (1, 0)\r
+\r
+#pragma pack(1)\r
+\r
+/**\r
+  Forward declarations:\r
+*/\r
+typedef struct ConfigurationManagerProtocol EDKII_CONFIGURATION_MANAGER_PROTOCOL;\r
+typedef struct PlatformRepositoryInfo       EDKII_PLATFORM_REPOSITORY_INFO;\r
+\r
+/** The GetObject function defines the interface implemented by the\r
+    Configuration Manager Protocol for returning the Configuration\r
+    Manager Objects.\r
+\r
+  @param [in]  This        Pointer to the Configuration Manager Protocol.\r
+  @param [in]  CmObjectId  The Configuration Manager Object ID.\r
+  @param [in]  Token       An optional token identifying the object. If\r
+                           unused this must be CM_NULL_TOKEN.\r
+  @param [out] CmObject    Pointer to the Configuration Manager Object\r
+                           descriptor describing the requested Object.\r
+\r
+  @retval EFI_SUCCESS           Success.\r
+  @retval EFI_INVALID_PARAMETER A parameter is invalid.\r
+  @retval EFI_NOT_FOUND         The required object information is not found.\r
+  @retval EFI_BAD_BUFFER_SIZE   The size returned by the Configuration Manager\r
+                                is less than the Object size for the requested\r
+                                object.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI * EDKII_CONFIGURATION_MANAGER_GET_OBJECT) (\r
+  IN  CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  * CONST This,\r
+  IN  CONST CM_OBJECT_ID                                  CmObjectId,\r
+  IN  CONST CM_OBJECT_TOKEN                               Token OPTIONAL,\r
+  IN  OUT   CM_OBJ_DESCRIPTOR                     * CONST CmObject\r
+  );\r
+\r
+/** The SetObject function defines the interface implemented by the\r
+    Configuration Manager Protocol for updating the Configuration\r
+    Manager Objects.\r
+\r
+  @param [in]  This        Pointer to the Configuration Manager Protocol.\r
+  @param [in]  CmObjectId  The Configuration Manager Object ID.\r
+  @param [in]  Token       An optional token identifying the object. If\r
+                           unused this must be CM_NULL_TOKEN.\r
+  @param [out] CmObject    Pointer to the Configuration Manager Object\r
+                           descriptor describing the Object.\r
+\r
+  @retval EFI_SUCCESS           The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER A parameter is invalid.\r
+  @retval EFI_NOT_FOUND         The required object information is not found.\r
+  @retval EFI_BAD_BUFFER_SIZE   The size returned by the Configuration Manager\r
+                                is less than the Object size for the requested\r
+                                object.\r
+  @retval EFI_UNSUPPORTED       This operation is not supported.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI * EDKII_CONFIGURATION_MANAGER_SET_OBJECT) (\r
+  IN  CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  * CONST This,\r
+  IN  CONST CM_OBJECT_ID                                  CmObjectId,\r
+  IN  CONST CM_OBJECT_TOKEN                               Token OPTIONAL,\r
+  IN        CM_OBJ_DESCRIPTOR                     * CONST CmObject\r
+  );\r
+\r
+/** The EDKII_CONFIGURATION_MANAGER_PROTOCOL structure describes the\r
+    Configuration Manager Protocol interface.\r
+*/\r
+typedef struct ConfigurationManagerProtocol {\r
+  /// The Configuration Manager Protocol revision.\r
+  UINT32                                  Revision;\r
+\r
+  /** The interface used to request information about\r
+      the Configuration Manager Objects.\r
+  */\r
+  EDKII_CONFIGURATION_MANAGER_GET_OBJECT  GetObject;\r
+\r
+  /** The interface used to update the information stored\r
+      in the Configuration Manager repository.\r
+  */\r
+  EDKII_CONFIGURATION_MANAGER_SET_OBJECT  SetObject;\r
+\r
+  /** Pointer to an implementation defined abstract repository\r
+      provisioned by the Configuration Manager.\r
+  */\r
+  EDKII_PLATFORM_REPOSITORY_INFO        * PlatRepoInfo;\r
+} EDKII_CONFIGURATION_MANAGER_PROTOCOL;\r
+\r
+/** The Configuration Manager Protocol GUID.\r
+*/\r
+extern EFI_GUID gEdkiiConfigurationManagerProtocolGuid;\r
+\r
+#pragma pack()\r
+\r
+#endif // CONFIGURATION_MANAGER_PROTOCOL_H_\r