2018-12-15 11:52:30 +00:00
|
|
|
## @file
|
|
|
|
|
# dec file for Dynamic Tables Framework.
|
|
|
|
|
#
|
DynamicTablesPkg: Add SMBIOS String table helper library
The Section 6.1.3, SMBIOS specification version 3.6.0 describes the
handling of test strings in SMBIOS tables.
Text strings are added at the end of the formatted portion of the SMBIOS
structure and are referenced by index in the SMBIOS structure.
Therefore, introduce a SmbiosStringTableLib to simplify the publishing
of the string set.
SmbiosStringTableLib introduces a concept of string table which records
the references to the SMBIOS strings as they are added and returns an
string reference which is then assigned to the string field in the
formatted portion of the SMBIOS structure. Once all strings are added,
the library provides an interface to get the required size for the string
set. This allows sufficient memory to be allocated for the SMBIOS table.
The library also provides an interface to publish the string set in
accordance with the SMBIOS specification.
Example:
EFI_STATUS
BuildSmbiosType17Table () {
STRING_TABLE StrTable;
UINT8 DevLocatorRef;
UINT8 BankLocatorRef;
SMBIOS_TABLE_TYPE17 *SmbiosRecord;
CHAR8 *StringSet;
...
// Initialize string table for 7 strings
StringTableInitialize (&StrTable, 7);
StringTableAddString (&StrTable, "SIMM 3", &DevLocatorRef);
StringTableAddString (&StrTable, "Bank 0", &BankLocatorRef);
...
SmbiosRecord = AllocateZeroPool (
sizeof (SMBIOS_TABLE_TYPE17) +
StringTableGetStringSetSize (&StrTable)
);
...
SmbiosRecord->DeviceLocator = DevLocatorRef;
SmbiosRecord->BankLocator = BankLocatorRef;
...
// get the string set area
StringSet = (CHAR8*)(SmbiosRecord + 1);
// publish the string set
StringTablePublishStringSet (
&StrTable,
StringSet,
StringTableGetStringSetSize (&StrTable)
);
// free string table
StringTableFree (&StrTable);
return EFI_SUCCESS;
}
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Cc: Girish Mahadevan <gmahadevan@nvidia.com>
Cc: Jeff Brasen <jbrasen@nvidia.com>
Cc: Ashish Singhal <ashishsingha@nvidia.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
Cc: William Watson <wwatson@nvidia.com>
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
2022-09-08 18:35:50 +01:00
|
|
|
# Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.<BR>
|
2018-12-15 11:52:30 +00:00
|
|
|
#
|
2019-04-03 16:03:32 -07:00
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
2018-12-15 11:52:30 +00:00
|
|
|
#
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
[Defines]
|
|
|
|
|
DEC_SPECIFICATION = 0x00010005
|
|
|
|
|
PACKAGE_NAME = DynamicTablesPkg
|
|
|
|
|
PACKAGE_GUID = 188EB346-8ABA-460E-A105-0F9D76F7324A
|
|
|
|
|
PACKAGE_VERSION = 1.0
|
|
|
|
|
|
|
|
|
|
[Includes]
|
|
|
|
|
Include
|
2025-03-14 14:08:25 -07:00
|
|
|
Test/Mock/Include
|
2018-12-15 11:52:30 +00:00
|
|
|
|
2020-06-26 18:20:36 +01:00
|
|
|
[LibraryClasses]
|
2021-09-30 08:48:12 +01:00
|
|
|
## @libraryclass Defines a set of Acpi helper methods
|
|
|
|
|
# independent from the Dynamic Tables Framework.
|
|
|
|
|
AcpiHelperLib|Include/Library/AcpiHelperLib.h
|
|
|
|
|
|
2020-08-05 16:19:26 +01:00
|
|
|
## @libraryclass Defines a set of APIs for Dynamic AML generation.
|
|
|
|
|
AmlLib|Include/Library/AmlLib/AmlLib.h
|
|
|
|
|
|
2025-05-28 10:35:42 +02:00
|
|
|
## @libraryclass Defines a set of APIs to help CmObj handling.
|
|
|
|
|
CmObjHelperLib|Include/Library/CmObjHelperLib.h
|
|
|
|
|
|
2021-12-09 10:32:47 +01:00
|
|
|
## @libraryclass Defines a set of APIs to handle dynamically created CmObj.
|
|
|
|
|
DynamicPlatRepoLib|Include/Library/DynamicPlatRepoLib.h
|
|
|
|
|
|
2021-12-09 10:31:54 +01:00
|
|
|
## @libraryclass Defines a set of APIs to a hardware information parser.
|
|
|
|
|
HwInfoParserLib|Include/Library/HwInfoParserLib.h
|
|
|
|
|
|
2022-07-08 14:59:03 -06:00
|
|
|
## @libraryclass Defines functions for customizing the generation of _OSC and slot info.
|
|
|
|
|
SsdtPcieSupportLib|Include/Library/SsdtPcieSupportLib.h
|
|
|
|
|
|
2020-08-06 08:04:50 +01:00
|
|
|
## @libraryclass Defines a set of methods for fixing up a SSDT Serial Port.
|
|
|
|
|
SsdtSerialPortFixupLib|Include/Library/SsdtSerialPortFixupLib.h
|
|
|
|
|
|
2020-06-26 18:20:36 +01:00
|
|
|
## @libraryclass Defines a set of helper methods.
|
|
|
|
|
TableHelperLib|Include/Library/TableHelperLib.h
|
2018-12-15 12:00:04 +00:00
|
|
|
|
DynamicTablesPkg: Add SMBIOS String table helper library
The Section 6.1.3, SMBIOS specification version 3.6.0 describes the
handling of test strings in SMBIOS tables.
Text strings are added at the end of the formatted portion of the SMBIOS
structure and are referenced by index in the SMBIOS structure.
Therefore, introduce a SmbiosStringTableLib to simplify the publishing
of the string set.
SmbiosStringTableLib introduces a concept of string table which records
the references to the SMBIOS strings as they are added and returns an
string reference which is then assigned to the string field in the
formatted portion of the SMBIOS structure. Once all strings are added,
the library provides an interface to get the required size for the string
set. This allows sufficient memory to be allocated for the SMBIOS table.
The library also provides an interface to publish the string set in
accordance with the SMBIOS specification.
Example:
EFI_STATUS
BuildSmbiosType17Table () {
STRING_TABLE StrTable;
UINT8 DevLocatorRef;
UINT8 BankLocatorRef;
SMBIOS_TABLE_TYPE17 *SmbiosRecord;
CHAR8 *StringSet;
...
// Initialize string table for 7 strings
StringTableInitialize (&StrTable, 7);
StringTableAddString (&StrTable, "SIMM 3", &DevLocatorRef);
StringTableAddString (&StrTable, "Bank 0", &BankLocatorRef);
...
SmbiosRecord = AllocateZeroPool (
sizeof (SMBIOS_TABLE_TYPE17) +
StringTableGetStringSetSize (&StrTable)
);
...
SmbiosRecord->DeviceLocator = DevLocatorRef;
SmbiosRecord->BankLocator = BankLocatorRef;
...
// get the string set area
StringSet = (CHAR8*)(SmbiosRecord + 1);
// publish the string set
StringTablePublishStringSet (
&StrTable,
StringSet,
StringTableGetStringSetSize (&StrTable)
);
// free string table
StringTableFree (&StrTable);
return EFI_SUCCESS;
}
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Cc: Girish Mahadevan <gmahadevan@nvidia.com>
Cc: Jeff Brasen <jbrasen@nvidia.com>
Cc: Ashish Singhal <ashishsingha@nvidia.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
Cc: William Watson <wwatson@nvidia.com>
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
2022-09-08 18:35:50 +01:00
|
|
|
## @libraryclass Defines a set of SMBIOS string helper methods.
|
|
|
|
|
SmbiosStringTableLib|Include/Library/SmbiosStringTableLib.h
|
|
|
|
|
|
2025-04-08 14:27:21 +02:00
|
|
|
## @libraryclass Defines a set of APIs to a handle Metadata around CmObj.
|
|
|
|
|
MetadataObjLib|Include/Library/MetadataObjLib.h
|
|
|
|
|
|
2025-04-25 11:13:05 +02:00
|
|
|
## @libraryclass Defines a set of APIs to a handle Metadata generation/validation.
|
|
|
|
|
MetadataHandlerLib|Include/Library/MetadataHandlerLib.h
|
|
|
|
|
|
2025-03-18 14:15:03 +00:00
|
|
|
## @libraryclass Defines a set of methods for generating Tpm2 Device Table method.
|
|
|
|
|
Tpm2DeviceTableLib|Include/Library/Tpm2DeviceTableLib.h
|
|
|
|
|
|
2025-07-18 15:23:07 +01:00
|
|
|
## @libraryclass Defines a set of SMBIOS related SMC helper methods.
|
2025-12-23 12:20:03 +00:00
|
|
|
SmbiosSmcLib|Include/Library/SmbiosSmcLib.h
|
2025-07-18 15:23:07 +01:00
|
|
|
|
2024-01-25 16:18:48 +01:00
|
|
|
[LibraryClasses.AARCH64]
|
|
|
|
|
## @libraryclass Defines a set of APIs to populate CmObj using SCMI.
|
|
|
|
|
DynamicTablesScmiInfoLib|Include/Library/DynamicTablesScmiInfoLib.h
|
|
|
|
|
|
2020-06-26 18:20:36 +01:00
|
|
|
[Protocols]
|
2018-12-15 12:00:04 +00:00
|
|
|
# Configuration Manager Protocol GUID
|
|
|
|
|
gEdkiiConfigurationManagerProtocolGuid = { 0xd85a4835, 0x5a82, 0x4894, { 0xac, 0x2, 0x70, 0x6f, 0x43, 0xd5, 0x97, 0x8e } }
|
|
|
|
|
|
2018-12-15 12:03:40 +00:00
|
|
|
# Dynamic Table Factory Protocol GUID
|
|
|
|
|
gEdkiiDynamicTableFactoryProtocolGuid = { 0x91d1e327, 0xfe5a, 0x49b8, { 0xab, 0x65, 0xe, 0xce, 0x2d, 0xdb, 0x45, 0xec } }
|
|
|
|
|
|
2018-12-15 12:17:06 +00:00
|
|
|
[PcdsFixedAtBuild]
|
|
|
|
|
|
|
|
|
|
# Maximum number of Custom ACPI Generators
|
2021-01-22 12:51:11 +00:00
|
|
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdMaxCustomACPIGenerators|1|UINT16|0xC0000001
|
2018-12-15 12:17:06 +00:00
|
|
|
|
|
|
|
|
# Maximum number of Custom SMBIOS Generators
|
2021-01-22 12:51:11 +00:00
|
|
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdMaxCustomSMBIOSGenerators|1|UINT16|0xC0000002
|
2018-12-15 12:17:06 +00:00
|
|
|
|
|
|
|
|
# Maximum number of Custom DT Generators
|
2021-01-22 12:51:11 +00:00
|
|
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdMaxCustomDTGenerators|1|UINT16|0xC0000003
|
2018-12-15 12:17:06 +00:00
|
|
|
|
2025-03-11 10:24:25 -06:00
|
|
|
# Maximum number of Entries in the SMBIOS Handle Map
|
|
|
|
|
# Note that a larger value may degrade performance.
|
|
|
|
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdMaxSmbiosHandleMapEntries|255|UINT16|0xC0000004
|
|
|
|
|
|
2021-01-22 12:51:12 +00:00
|
|
|
# Non BSA Compliant 16550 Serial HID
|
|
|
|
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdNonBsaCompliant16550SerialHid|""|VOID*|0x40000008
|
|
|
|
|
|
2022-09-06 14:33:56 -06:00
|
|
|
# Use PCI segment numbers as UID
|
|
|
|
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdPciUseSegmentAsUid|FALSE|BOOLEAN|0x40000009
|
|
|
|
|
|
2024-01-25 16:18:49 +01:00
|
|
|
# Allow some relaxation on some specific points for the platforms that desire it.
|
|
|
|
|
# BIT0: Allow the absence of some registers in the _CPC object.
|
|
|
|
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdDevelopmentPlatformRelaxations|0|UINT64|0x4000000A
|
|
|
|
|
|
2025-03-18 14:15:03 +00:00
|
|
|
# Generate Tpm2 device table when generate TPM2 acpi table together.
|
|
|
|
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdGenTpm2DeviceTable|FALSE|BOOLEAN|0x4000000B
|
|
|
|
|
|
DynamicTablesPkg: Smbios Additional Information (Type 40)
Add a DynamicTables SMBIOS generator for the Additional Information
(Type 40) structure.
SMBIOS Type 40 provides additional information for fields in other
SMBIOS structures. Each Type 40 entry references an existing SMBIOS
record by handle and offset, provides an optional entry string, and
carries a supplemental field value.
The generator consumes one or more top-level CM objects, each referencing
a list of Additional Information entries. Each entry provides:
- the CM object token of the referenced SMBIOS structure,
- the referenced table generator ID,
- the offset of the referenced field,
- an optional entry string,
- a token to a typed Additional Information Value object.
Example platform CM object layout:
CM_ARCH_COMMON_ADDITIONAL_INFORMATION AdditionalInformation[] = {
{
REFERENCE_TOKEN (AdditionalInformation[0]),
REFERENCE_TOKEN (AdditionalInformationEntry[0])
}
};
CM_ARCH_COMMON_ADDITIONAL_INFORMATION_ENTRY
AdditionalInformationEntry[] = {
{
REFERENCE_TOKEN (MemoryDeviceInfo[0]),
CREATE_STD_SMBIOS_TABLE_GEN_ID (EStdSmbiosTableIdType17),
OFFSET_OF (SMBIOS_TABLE_TYPE17, MemoryType),
"DIMM0 memory type",
REFERENCE_TOKEN (AdditionalInformationValue[0])
}
};
CM_ARCH_COMMON_ADDITIONAL_INFORMATION_VALUE
AdditionalInformationValue[] = {
{
sizeof (UINT8),
{
MemoryTypeDram
}
}
};
The generator resolves referenced SMBIOS handles using CM object tokens
and table generator IDs. It validates the typed value objects, individual
entry lengths, and aggregate formatted record size. The maximum accepted
value length is controlled by PcdMaxAdditionalInformationValue.
Build the variable-length Type 40 formatted area and append the entry
strings to the SMBIOS string area.
Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
2026-07-09 14:20:10 +01:00
|
|
|
# Maximum number of Additional Information Value bytes used by SMBIOS Type 40.
|
|
|
|
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdMaxAdditionalInformationValue|128|UINT8|0xC0000005
|
|
|
|
|
|
2021-01-22 12:51:11 +00:00
|
|
|
[Guids]
|
|
|
|
|
gEdkiiDynamicTablesPkgTokenSpaceGuid = { 0xab226e66, 0x31d8, 0x4613, { 0x87, 0x9d, 0xd2, 0xfa, 0xb6, 0x10, 0x26, 0x3c } }
|