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