summaryrefslogtreecommitdiff
path: root/DynamicTablesPkg/Include/Protocol/ConfigurationManagerProtocol.h
blob: 02c3d22ca7e961058c2c157e7f5a981e1418535e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
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 <ConfigurationManagerObject.h>

/** 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_