ConfigurationManager.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /** @file
  2. Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. @par Glossary:
  5. - Cm or CM - Configuration Manager
  6. - Obj or OBJ - Object
  7. **/
  8. #ifndef CONFIGURATION_MANAGER_H_
  9. #define CONFIGURATION_MANAGER_H_
  10. ///
  11. /// C array containing the compiled AML template.
  12. /// This symbol is defined in the auto generated C file
  13. /// containing the AML bytecode array.
  14. ///
  15. extern CHAR8 dsdt_aml_code[];
  16. ///
  17. /// The configuration manager version.
  18. ///
  19. #define CONFIGURATION_MANAGER_REVISION CREATE_REVISION (1, 0)
  20. ///
  21. /// The OEM ID
  22. ///
  23. #define CFG_MGR_OEM_ID { 'A', 'R', 'M', 'L', 'T', 'D' }
  24. ///
  25. /// Memory address size limit. Assume the whole address space.
  26. ///
  27. #define MEMORY_ADDRESS_SIZE_LIMIT 64
  28. /** A function that prepares Configuration Manager Objects for returning.
  29. @param [in] This Pointer to the Configuration Manager Protocol.
  30. @param [in] CmObjectId The Configuration Manager Object ID.
  31. @param [in] Token A token for identifying the object.
  32. @param [out] CmObject Pointer to the Configuration Manager Object
  33. descriptor describing the requested Object.
  34. @retval EFI_SUCCESS Success.
  35. @retval EFI_INVALID_PARAMETER A parameter is invalid.
  36. @retval EFI_NOT_FOUND The required object information is not found.
  37. **/
  38. typedef EFI_STATUS (*CM_OBJECT_HANDLER_PROC) (
  39. IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This,
  40. IN CONST CM_OBJECT_ID CmObjectId,
  41. IN CONST CM_OBJECT_TOKEN Token,
  42. IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject
  43. );
  44. ///
  45. /// A helper macro for mapping a reference token.
  46. ///
  47. #define REFERENCE_TOKEN(Field) \
  48. (CM_OBJECT_TOKEN)((UINT8*)&mKvmtoolPlatRepositoryInfo + \
  49. OFFSET_OF (EDKII_PLATFORM_REPOSITORY_INFO, Field))
  50. ///
  51. /// The number of ACPI tables to install
  52. ///
  53. #define PLAT_ACPI_TABLE_COUNT 10
  54. ///
  55. /// A structure describing the platform configuration
  56. /// manager repository information
  57. ///
  58. typedef struct PlatformRepositoryInfo {
  59. ///
  60. /// Configuration Manager Information.
  61. ///
  62. CM_STD_OBJ_CONFIGURATION_MANAGER_INFO CmInfo;
  63. ///
  64. /// List of ACPI tables
  65. ///
  66. CM_STD_OBJ_ACPI_TABLE_INFO CmAcpiTableList[PLAT_ACPI_TABLE_COUNT];
  67. ///
  68. /// Power management profile information
  69. ///
  70. CM_ARM_POWER_MANAGEMENT_PROFILE_INFO PmProfileInfo;
  71. ///
  72. /// ITS Group node
  73. ///
  74. CM_ARM_ITS_GROUP_NODE ItsGroupInfo;
  75. ///
  76. /// ITS Identifier array
  77. ///
  78. CM_ARM_ITS_IDENTIFIER ItsIdentifierArray[1];
  79. ///
  80. /// PCI Root complex node
  81. ///
  82. CM_ARM_ROOT_COMPLEX_NODE RootComplexInfo;
  83. ///
  84. /// Array of DeviceID mapping
  85. ///
  86. CM_ARM_ID_MAPPING DeviceIdMapping[1];
  87. ///
  88. /// Dynamic platform repository.
  89. /// CmObj created by parsing the Kvmtool device tree are stored here.
  90. ///
  91. DYNAMIC_PLATFORM_REPOSITORY_INFO *DynamicPlatformRepo;
  92. ///
  93. /// Base address of the FDT.
  94. ///
  95. VOID *FdtBase;
  96. ///
  97. /// A handle to the FDT HwInfoParser.
  98. ///
  99. HW_INFO_PARSER_HANDLE FdtParserHandle;
  100. } EDKII_PLATFORM_REPOSITORY_INFO;
  101. #endif // CONFIGURATION_MANAGER_H_