24#define WSMT_PROTECTION_VALID_FLAGS \
25 (EFI_WSMT_PROTECTION_FLAGS_FIXED_COMM_BUFFERS | \
26 EFI_WSMT_PROTECTION_FLAGS_COMM_BUFFER_NESTED_PTR_PROTECTION | \
27 EFI_WSMT_PROTECTION_FLAGS_SYSTEM_RESOURCE_PROTECTION)
43 EFI_ACPI_WINDOWS_SMM_SECURITY_MITIGATION_TABLE_SIGNATURE,
45 EFI_WSMT_TABLE_REVISION
74 ASSERT (CfgMgrProtocol !=
NULL);
77 Status = GetEX64ObjWsmtFlagsInfo (
83 if (EFI_ERROR (Status)) {
86 "ERROR: WSMT: Failed to get WSMT protection flag information." \
95 "WSMT: Protection flags = 0x%x\n",
96 WsmtFlagInfo->ProtectionFlags
100 if ((WsmtFlagInfo->ProtectionFlags & ~WSMT_PROTECTION_VALID_FLAGS) != 0) {
103 "ERROR: WSMT: Invalid protection flags = 0x%x\n",
104 WsmtFlagInfo->ProtectionFlags
106 return EFI_UNSUPPORTED;
109 if ((WsmtFlagInfo->ProtectionFlags & EFI_WSMT_PROTECTION_FLAGS_COMM_BUFFER_NESTED_PTR_PROTECTION) != 0) {
110 if ((WsmtFlagInfo->ProtectionFlags & EFI_WSMT_PROTECTION_FLAGS_FIXED_COMM_BUFFERS) == 0) {
113 "ERROR: WSMT: Invalid protection flags. EFI_WSMT_PROTECTION_FLAGS_FIXED_COMM_BUFFERS not set.\n"
115 return EFI_UNSUPPORTED;
119 AcpiWsmt.ProtectionFlags = WsmtFlagInfo->ProtectionFlags;
156 ASSERT (This !=
NULL);
157 ASSERT (AcpiTableInfo !=
NULL);
158 ASSERT (CfgMgrProtocol !=
NULL);
159 ASSERT (Table !=
NULL);
160 ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID);
161 ASSERT (AcpiTableInfo->AcpiTableSignature == This->AcpiTableSignature);
163 if ((AcpiTableInfo->AcpiTableRevision < This->MinAcpiTableRevision) ||
164 (AcpiTableInfo->AcpiTableRevision > This->AcpiTableRevision))
168 "ERROR: WSMT: Requested table revision = %d, is not supported."
169 "Supported table revision: Minimum = %d, Maximum = %d\n",
170 AcpiTableInfo->AcpiTableRevision,
171 This->MinAcpiTableRevision,
172 This->AcpiTableRevision
174 return EFI_INVALID_PARAMETER;
186 if (EFI_ERROR (Status)) {
189 "ERROR: WSMT: Failed to add ACPI header. Status = %r\n",
197 if (EFI_ERROR (Status)) {
208#define WSMT_GENERATOR_REVISION CREATE_REVISION (1, 0)
218 L
"ACPI.STD.WSMT.GENERATOR",
220 EFI_ACPI_WINDOWS_SMM_SECURITY_MITIGATION_TABLE_SIGNATURE,
222 EFI_WSMT_TABLE_REVISION,
224 EFI_WSMT_TABLE_REVISION,
261 DEBUG ((DEBUG_INFO,
"WSMT: Register Generator. Status = %r\n", Status));
285 DEBUG ((DEBUG_INFO,
"WSMT: Deregister Generator. Status = %r\n", Status));
EFI_STATUS EFIAPI RegisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
EFI_STATUS EFIAPI DeregisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
#define CREATE_STD_ACPI_TABLE_GEN_ID(TableId)
#define TABLE_GENERATOR_CREATOR_ID
@ EStdAcpiTableIdWsmt
WSMT Generator.
#define ACPI_HEADER(Signature, Type, Revision)
#define GET_OBJECT_LIST(CmObjectNameSpace, CmObjectId, Type)
@ EObjNameSpaceX64
X64 Objects Namespace.
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
EFI_STATUS EFIAPI AddAcpiHeader(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST ACPI_TABLE_GENERATOR *CONST Generator, IN OUT EFI_ACPI_DESCRIPTION_HEADER *CONST AcpiHeader, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST UINT32 Length)
STATIC EFI_STATUS EFIAPI WsmtAddProtectionFlagsInfo(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol)
EFI_STATUS EFIAPI AcpiWsmtLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
STATIC CONST ACPI_TABLE_GENERATOR WsmtGenerator
STATIC EFI_ACPI_WSMT_TABLE AcpiWsmt
#define WSMT_GENERATOR_REVISION
EFI_STATUS EFIAPI AcpiWsmtLibDestructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
STATIC EFI_STATUS EFIAPI BuildWsmtTable(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table)
@ EX64ObjWsmtFlagsInfo
10 - WSMT protection flags info