]> git.proxmox.com Git - mirror_edk2.git/blob - DynamicTablesPkg/Include/Protocol/ConfigurationManagerProtocol.h
02c3d22ca7e961058c2c157e7f5a981e1418535e
[mirror_edk2.git] / DynamicTablesPkg / Include / Protocol / ConfigurationManagerProtocol.h
1 /** @file
2
3 Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.
4
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 @par Glossary:
14 - Cm or CM - Configuration Manager
15 - Obj or OBJ - Object
16 **/
17
18 #ifndef CONFIGURATION_MANAGER_PROTOCOL_H_
19 #define CONFIGURATION_MANAGER_PROTOCOL_H_
20
21 #include <ConfigurationManagerObject.h>
22
23 /** This macro defines the Configuration Manager Protocol GUID.
24
25 GUID: {D85A4835-5A82-4894-AC02-706F43D5978E}
26 */
27 #define EDKII_CONFIGURATION_MANAGER_PROTOCOL_GUID \
28 { 0xd85a4835, 0x5a82, 0x4894, \
29 { 0xac, 0x2, 0x70, 0x6f, 0x43, 0xd5, 0x97, 0x8e } \
30 };
31
32 /** This macro defines the Configuration Manager Protocol Revision.
33 */
34 #define EDKII_CONFIGURATION_MANAGER_PROTOCOL_REVISION CREATE_REVISION (1, 0)
35
36 #pragma pack(1)
37
38 /**
39 Forward declarations:
40 */
41 typedef struct ConfigurationManagerProtocol EDKII_CONFIGURATION_MANAGER_PROTOCOL;
42 typedef struct PlatformRepositoryInfo EDKII_PLATFORM_REPOSITORY_INFO;
43
44 /** The GetObject function defines the interface implemented by the
45 Configuration Manager Protocol for returning the Configuration
46 Manager Objects.
47
48 @param [in] This Pointer to the Configuration Manager Protocol.
49 @param [in] CmObjectId The Configuration Manager Object ID.
50 @param [in] Token An optional token identifying the object. If
51 unused this must be CM_NULL_TOKEN.
52 @param [out] CmObject Pointer to the Configuration Manager Object
53 descriptor describing the requested Object.
54
55 @retval EFI_SUCCESS Success.
56 @retval EFI_INVALID_PARAMETER A parameter is invalid.
57 @retval EFI_NOT_FOUND The required object information is not found.
58 @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration Manager
59 is less than the Object size for the requested
60 object.
61 **/
62 typedef
63 EFI_STATUS
64 (EFIAPI * EDKII_CONFIGURATION_MANAGER_GET_OBJECT) (
65 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This,
66 IN CONST CM_OBJECT_ID CmObjectId,
67 IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
68 IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject
69 );
70
71 /** The SetObject function defines the interface implemented by the
72 Configuration Manager Protocol for updating the Configuration
73 Manager Objects.
74
75 @param [in] This Pointer to the Configuration Manager Protocol.
76 @param [in] CmObjectId The Configuration Manager Object ID.
77 @param [in] Token An optional token identifying the object. If
78 unused this must be CM_NULL_TOKEN.
79 @param [out] CmObject Pointer to the Configuration Manager Object
80 descriptor describing the Object.
81
82 @retval EFI_SUCCESS The operation completed successfully.
83 @retval EFI_INVALID_PARAMETER A parameter is invalid.
84 @retval EFI_NOT_FOUND The required object information is not found.
85 @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration Manager
86 is less than the Object size for the requested
87 object.
88 @retval EFI_UNSUPPORTED This operation is not supported.
89 **/
90 typedef
91 EFI_STATUS
92 (EFIAPI * EDKII_CONFIGURATION_MANAGER_SET_OBJECT) (
93 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This,
94 IN CONST CM_OBJECT_ID CmObjectId,
95 IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
96 IN CM_OBJ_DESCRIPTOR * CONST CmObject
97 );
98
99 /** The EDKII_CONFIGURATION_MANAGER_PROTOCOL structure describes the
100 Configuration Manager Protocol interface.
101 */
102 typedef struct ConfigurationManagerProtocol {
103 /// The Configuration Manager Protocol revision.
104 UINT32 Revision;
105
106 /** The interface used to request information about
107 the Configuration Manager Objects.
108 */
109 EDKII_CONFIGURATION_MANAGER_GET_OBJECT GetObject;
110
111 /** The interface used to update the information stored
112 in the Configuration Manager repository.
113 */
114 EDKII_CONFIGURATION_MANAGER_SET_OBJECT SetObject;
115
116 /** Pointer to an implementation defined abstract repository
117 provisioned by the Configuration Manager.
118 */
119 EDKII_PLATFORM_REPOSITORY_INFO * PlatRepoInfo;
120 } EDKII_CONFIGURATION_MANAGER_PROTOCOL;
121
122 /** The Configuration Manager Protocol GUID.
123 */
124 extern EFI_GUID gEdkiiConfigurationManagerProtocolGuid;
125
126 #pragma pack()
127
128 #endif // CONFIGURATION_MANAGER_PROTOCOL_H_