TianoCore EDK2 master
Loading...
Searching...
No Matches
ConfigurationManager.c File Reference

Go to the source code of this file.

Functions

STATIC EFI_STATUS EFIAPI HandleCmObject (IN CONST CM_OBJECT_ID CmObjectId, IN VOID *Object, IN CONST UINTN ObjectSize, IN CONST UINTN ObjectCount, IN OUT CM_OBJ_DESCRIPTOR *CONST CmObjectDesc)
 
STATIC EFI_STATUS EFIAPI HandleCmObjectRefByToken (IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN VOID *Object, IN CONST UINTN ObjectSize, IN CONST UINTN ObjectCount, IN CONST CM_OBJECT_TOKEN Token, IN CONST CM_OBJECT_HANDLER_PROC HandlerProc, IN OUT CM_OBJ_DESCRIPTOR *CONST CmObjectDesc)
 
EFI_STATUS EFIAPI GetItsIdentifierArray (IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token, OUT CM_OBJ_DESCRIPTOR *CONST CmObject)
 
EFI_STATUS EFIAPI GetDeviceIdMappingArray (IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token, OUT CM_OBJ_DESCRIPTOR *CONST CmObject)
 
STATIC EFI_STATUS EFIAPI HwInfoAdd (IN HW_INFO_PARSER_HANDLE ParserHandle, IN VOID *Context, IN CONST CM_OBJ_DESCRIPTOR *CmObjDesc, OUT CM_OBJECT_TOKEN *Token OPTIONAL)
 
STATIC EFI_STATUS EFIAPI CleanupPlatformRepository (IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This)
 
STATIC EFI_STATUS EFIAPI InitializePlatformRepository (IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This)
 
EFI_STATUS EFIAPI GetStandardNameSpaceObject (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)
 
EFI_STATUS EFIAPI GetArchCommonNameSpaceObject (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)
 
EFI_STATUS EFIAPI GetArmNameSpaceObject (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)
 
EFI_STATUS EFIAPI GetOemNameSpaceObject (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)
 
EFI_STATUS EFIAPI ArmKvmtoolPlatformGetObject (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)
 
EFI_STATUS EFIAPI ArmKvmtoolPlatformSetObject (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)
 
EFI_STATUS EFIAPI ConfigurationManagerDxeInitialize (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI ConfigurationManagerDxeUnloadImage (IN EFI_HANDLE ImageHandle)
 

Variables

STATIC EDKII_PLATFORM_REPOSITORY_INFO mKvmtoolPlatRepositoryInfo
 
STATIC CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL mKvmtoolPlatformConfigManagerProtocol
 

Detailed Description

Configuration Manager Dxe

Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Glossary:
  • Cm or CM - Configuration Manager
  • Obj or OBJ - Object

Definition in file ConfigurationManager.c.

Function Documentation

◆ ArmKvmtoolPlatformGetObject()

EFI_STATUS EFIAPI ArmKvmtoolPlatformGetObject ( 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 GetObject function defines the interface implemented by the Configuration Manager Protocol for returning the Configuration Manager Objects.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
[in]CmObjectIdThe Configuration Manager Object ID.
[in]TokenAn optional token identifying the object. If unused this must be CM_NULL_TOKEN.
[in,out]CmObjectPointer to the Configuration Manager Object descriptor describing the requested Object.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object information is not found.

Definition at line 982 of file ConfigurationManager.c.

◆ ArmKvmtoolPlatformSetObject()

EFI_STATUS EFIAPI ArmKvmtoolPlatformSetObject ( 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 SetObject function defines the interface implemented by the Configuration Manager Protocol for updating the Configuration Manager Objects.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
[in]CmObjectIdThe Configuration Manager Object ID.
[in]TokenAn optional token identifying the object. If unused this must be CM_NULL_TOKEN.
[in]CmObjectPointer to the Configuration Manager Object descriptor describing the Object.
Return values
EFI_UNSUPPORTEDThis operation is not supported.

Definition at line 1041 of file ConfigurationManager.c.

◆ CleanupPlatformRepository()

STATIC EFI_STATUS EFIAPI CleanupPlatformRepository ( IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  This)

Cleanup the platform configuration repository.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
Return values
EFI_SUCCESSSuccess
EFI_INVALID_PARAMETERA parameter is invalid.

Definition at line 498 of file ConfigurationManager.c.

◆ ConfigurationManagerDxeInitialize()

EFI_STATUS EFIAPI ConfigurationManagerDxeInitialize ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Entrypoint of Configuration Manager Dxe.

Parameters
ImageHandle
SystemTable
Return values
EFI_SUCCESS
EFI_LOAD_ERROR
EFI_OUT_OF_RESOURCES

Definition at line 1075 of file ConfigurationManager.c.

◆ ConfigurationManagerDxeUnloadImage()

EFI_STATUS EFIAPI ConfigurationManagerDxeUnloadImage ( IN EFI_HANDLE  ImageHandle)

Unload function for this image.

Parameters
ImageHandleHandle for the image of this driver.
Return values
EFI_SUCCESSDriver unloaded successfully.
otherDriver can not unloaded.

Definition at line 1132 of file ConfigurationManager.c.

◆ GetArchCommonNameSpaceObject()

EFI_STATUS EFIAPI GetArchCommonNameSpaceObject ( 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 
)

Return an ArchCommon namespace object.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
[in]CmObjectIdThe Configuration Manager Object ID.
[in]TokenAn optional token identifying the object. If unused this must be CM_NULL_TOKEN.
[in,out]CmObjectPointer to the Configuration Manager Object descriptor describing the requested Object.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object information is not found.

Definition at line 743 of file ConfigurationManager.c.

◆ GetArmNameSpaceObject()

EFI_STATUS EFIAPI GetArmNameSpaceObject ( 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 
)

Return an ARM namespace object.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
[in]CmObjectIdThe Configuration Manager Object ID.
[in]TokenAn optional token identifying the object. If unused this must be CM_NULL_TOKEN.
[in,out]CmObjectPointer to the Configuration Manager Object descriptor describing the requested Object.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object information is not found.

Definition at line 820 of file ConfigurationManager.c.

◆ GetDeviceIdMappingArray()

EFI_STATUS EFIAPI GetDeviceIdMappingArray ( IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  This,
IN CONST CM_OBJECT_ID  CmObjectId,
IN CONST CM_OBJECT_TOKEN  Token,
OUT CM_OBJ_DESCRIPTOR *CONST  CmObject 
)

Return a device Id mapping array.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
[in]CmObjectIdThe Configuration Manager Object ID.
[in]TokenA token for identifying the object
[out]CmObjectPointer to the Configuration Manager Object descriptor describing the requested Object.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object information is not found.

Definition at line 397 of file ConfigurationManager.c.

◆ GetItsIdentifierArray()

EFI_STATUS EFIAPI GetItsIdentifierArray ( IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  This,
IN CONST CM_OBJECT_ID  CmObjectId,
IN CONST CM_OBJECT_TOKEN  Token,
OUT CM_OBJ_DESCRIPTOR *CONST  CmObject 
)

Return an ITS identifier array.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
[in]CmObjectIdThe Configuration Manager Object ID.
[in]TokenA token for identifying the object
[out]CmObjectPointer to the Configuration Manager Object descriptor describing the requested Object.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object information is not found.

Definition at line 354 of file ConfigurationManager.c.

◆ GetOemNameSpaceObject()

EFI_STATUS EFIAPI GetOemNameSpaceObject ( 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 
)

Return an OEM namespace object.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
[in]CmObjectIdThe Configuration Manager Object ID.
[in]TokenAn optional token identifying the object. If unused this must be CM_NULL_TOKEN.
[in,out]CmObjectPointer to the Configuration Manager Object descriptor describing the requested Object.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object information is not found.

Definition at line 933 of file ConfigurationManager.c.

◆ GetStandardNameSpaceObject()

EFI_STATUS EFIAPI GetStandardNameSpaceObject ( 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 
)

Return a standard namespace object.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
[in]CmObjectIdThe Configuration Manager Object ID.
[in]TokenAn optional token identifying the object. If unused this must be CM_NULL_TOKEN.
[in,out]CmObjectPointer to the Configuration Manager Object descriptor describing the requested Object.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object information is not found.

Definition at line 625 of file ConfigurationManager.c.

◆ HandleCmObject()

STATIC EFI_STATUS EFIAPI HandleCmObject ( IN CONST CM_OBJECT_ID  CmObjectId,
IN VOID *  Object,
IN CONST UINTN  ObjectSize,
IN CONST UINTN  ObjectCount,
IN OUT CM_OBJ_DESCRIPTOR *CONST  CmObjectDesc 
)

A helper function for returning the Configuration Manager Objects.

Parameters
[in]CmObjectIdThe Configuration Manager Object ID.
[in]ObjectPointer to the Object(s).
[in]ObjectSizeTotal size of the Object(s).
[in]ObjectCountNumber of Objects.
[in,out]CmObjectDescPointer to the Configuration Manager Object descriptor describing the requested Object.
Return values
EFI_SUCCESSSuccess.

Definition at line 257 of file ConfigurationManager.c.

◆ HandleCmObjectRefByToken()

STATIC EFI_STATUS EFIAPI HandleCmObjectRefByToken ( IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  This,
IN CONST CM_OBJECT_ID  CmObjectId,
IN VOID *  Object,
IN CONST UINTN  ObjectSize,
IN CONST UINTN  ObjectCount,
IN CONST CM_OBJECT_TOKEN  Token,
IN CONST CM_OBJECT_HANDLER_PROC  HandlerProc,
IN OUT CM_OBJ_DESCRIPTOR *CONST  CmObjectDesc 
)

A helper function for returning the Configuration Manager Objects that match the token.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
[in]CmObjectIdThe Configuration Manager Object ID.
[in]ObjectPointer to the Object(s).
[in]ObjectSizeTotal size of the Object(s).
[in]ObjectCountNumber of Objects.
[in]TokenA token identifying the object.
[in]HandlerProcA handler function to search the object referenced by the token.
[in,out]CmObjectDescPointer to the Configuration Manager Object descriptor describing the requested Object.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object information is not found.

Definition at line 303 of file ConfigurationManager.c.

◆ HwInfoAdd()

STATIC EFI_STATUS EFIAPI HwInfoAdd ( IN HW_INFO_PARSER_HANDLE  ParserHandle,
IN VOID *  Context,
IN CONST CM_OBJ_DESCRIPTOR CmObjDesc,
OUT CM_OBJECT_TOKEN *Token  OPTIONAL 
)

Function pointer called by the parser to add information.

Callback function that the parser can use to add new CmObj. This function must copy the CmObj data and not rely on the parser preserving the CmObj memory. This function is responsible of the Token allocation.

Parameters
[in]ParserHandleA handle to the parser instance.
[in]ContextA pointer to the caller's context provided in HwInfoParserInit ().
[in]CmObjDescCM_OBJ_DESCRIPTOR containing the CmObj(s) to add.
[out]TokenIf provided and success, contain the token generated for the CmObj.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 446 of file ConfigurationManager.c.

◆ InitializePlatformRepository()

STATIC EFI_STATUS EFIAPI InitializePlatformRepository ( IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  This)

Initialize the platform configuration repository.

Parameters
[in]ThisPointer to the Configuration Manager Protocol.
Return values
EFI_SUCCESSSuccess
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_OUT_OF_RESOURCESAn allocation has failed.

Definition at line 544 of file ConfigurationManager.c.

Variable Documentation

◆ mKvmtoolPlatformConfigManagerProtocol

STATIC CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL mKvmtoolPlatformConfigManagerProtocol
Initial value:
= {
&mKvmtoolPlatRepositoryInfo
}
EFI_STATUS EFIAPI ArmKvmtoolPlatformGetObject(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)
EFI_STATUS EFIAPI ArmKvmtoolPlatformSetObject(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)
#define CREATE_REVISION(Major, Minor)

Definition at line 1056 of file ConfigurationManager.c.

◆ mKvmtoolPlatRepositoryInfo

STATIC EDKII_PLATFORM_REPOSITORY_INFO mKvmtoolPlatRepositoryInfo

Definition at line 35 of file ConfigurationManager.c.