StandardNameSpaceObjects.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /** @file
  2. Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. @par Glossary:
  5. - Cm or CM - Configuration Manager
  6. - Obj or OBJ - Object
  7. - Std or STD - Standard
  8. **/
  9. #ifndef STANDARD_NAMESPACE_OBJECTS_H_
  10. #define STANDARD_NAMESPACE_OBJECTS_H_
  11. #include <AcpiTableGenerator.h>
  12. #include <SmbiosTableGenerator.h>
  13. #pragma pack(1)
  14. /** A macro defining a reserved zero/NULL token value that
  15. does not identify any object.
  16. */
  17. #define CM_NULL_TOKEN 0
  18. /** A reference token that the Configuration Manager can use
  19. to identify a Configuration Manager object.
  20. This can be used to differentiate between instances of
  21. objects of the same types. The identification scheme is
  22. implementation defined and is defined by the Configuration
  23. Manager.
  24. Typically the token is used to identify a specific instance
  25. from a set of objects in a call to the GetObject()/SetObject(),
  26. implemented by the Configuration Manager protocol.
  27. Note: The token value 0 is reserved for a NULL token and does
  28. not identify any object.
  29. **/
  30. typedef UINTN CM_OBJECT_TOKEN;
  31. /** The ESTD_OBJECT_ID enum describes the Object IDs
  32. in the Standard Namespace.
  33. */
  34. typedef enum StdObjectID {
  35. EStdObjCfgMgrInfo = 0x00000000, ///< 0 - Configuration Manager Info
  36. EStdObjAcpiTableList, ///< 1 - ACPI table Info List
  37. EStdObjSmbiosTableList, ///< 2 - SMBIOS table Info List
  38. EStdObjMax
  39. } ESTD_OBJECT_ID;
  40. /** A structure that describes the Configuration Manager Information.
  41. */
  42. typedef struct CmStdObjConfigurationManagerInfo {
  43. /// The Configuration Manager Revision.
  44. UINT32 Revision;
  45. /** The OEM ID. This information is used to
  46. populate the ACPI table header information.
  47. */
  48. UINT8 OemId[6];
  49. } CM_STD_OBJ_CONFIGURATION_MANAGER_INFO;
  50. /** A structure used to describe the ACPI table generators to be invoked.
  51. The AcpiTableData member of this structure may be used to directly provide
  52. the binary ACPI table data which is required by the following standard
  53. generators:
  54. - RAW
  55. - DSDT
  56. - SSDT
  57. Providing the ACPI table data is optional and depends on the generator
  58. that is being invoked. If unused, set AcpiTableData to NULL.
  59. */
  60. typedef struct CmAStdObjAcpiTableInfo {
  61. /// The signature of the ACPI Table to be installed
  62. UINT32 AcpiTableSignature;
  63. /// The ACPI table revision
  64. UINT8 AcpiTableRevision;
  65. /// The ACPI Table Generator ID
  66. ACPI_TABLE_GENERATOR_ID TableGeneratorId;
  67. /// Optional pointer to the ACPI table data
  68. EFI_ACPI_DESCRIPTION_HEADER *AcpiTableData;
  69. /// An OEM-supplied string that the OEM uses to identify the particular
  70. /// data table. This field is particularly useful when defining a definition
  71. /// block to distinguish definition block functions. The OEM assigns each
  72. /// dissimilar table a new OEM Table ID.
  73. /// This field could be constructed using the SIGNATURE_64() macro.
  74. /// e.g. SIGNATURE_64 ('A','R','M','H','G','T','D','T')
  75. /// Note: If this field is not populated (has value of Zero), then the
  76. /// Generators shall populate this information using part of the
  77. /// CM_STD_OBJ_CONFIGURATION_MANAGER_INFO.OemId field and the
  78. /// ACPI table signature.
  79. UINT64 OemTableId;
  80. /// An OEM-supplied revision number. Larger numbers are assumed to be
  81. /// newer revisions.
  82. /// Note: If this field is not populated (has value of Zero), then the
  83. /// Generators shall populate this information using the revision of the
  84. /// Configuration Manager (CM_STD_OBJ_CONFIGURATION_MANAGER_INFO.Revision).
  85. UINT32 OemRevision;
  86. /// The minor revision of an ACPI table if required by the table.
  87. /// Note: If this field is not populated (has value of Zero), then the
  88. /// Generators shall populate this information based on the latest minor
  89. /// revision of the table that is supported by the generator.
  90. /// e.g. This field can be used to specify the minor revision to be set
  91. /// for the FADT table.
  92. UINT8 MinorRevision;
  93. } CM_STD_OBJ_ACPI_TABLE_INFO;
  94. /** A structure used to describe the SMBIOS table generators to be invoked.
  95. The SmbiosTableData member of this structure is used to provide
  96. the SMBIOS table data which is required by the following standard
  97. generator(s):
  98. - RAW
  99. Providing the SMBIOS table data is optional and depends on the
  100. generator that is being invoked. If unused, set the SmbiosTableData
  101. to NULL.
  102. */
  103. typedef struct CmStdObjSmbiosTableInfo {
  104. /// The SMBIOS Table Generator ID
  105. SMBIOS_TABLE_GENERATOR_ID TableGeneratorId;
  106. /// Optional pointer to the SMBIOS table data
  107. SMBIOS_STRUCTURE *SmbiosTableData;
  108. } CM_STD_OBJ_SMBIOS_TABLE_INFO;
  109. #pragma pack()
  110. #endif // STANDARD_NAMESPACE_OBJECTS_H_