mirror of https://github.com/acidanthera/audk.git
Vlv2DeviceRefCodePkg&Vlv2DevicePkg:Add sample WSMT table.
This is an sample WSMT table, which we only update BIT0 and BIT1 of Protections flags fields. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex <shifeix.a.lu@intel.com> Reviewed-by: David Wei <david.wei@intel.com>
This commit is contained in:
parent
b52e697b2a
commit
2c855d3aaf
|
@ -5,7 +5,7 @@
|
||||||
# All .asi files tagged with "ToolCode="DUMMY"" in following file list are device description and are included
|
# All .asi files tagged with "ToolCode="DUMMY"" in following file list are device description and are included
|
||||||
# by top level ASL file which will be dealed with by asl.exe application.
|
# by top level ASL file which will be dealed with by asl.exe application.
|
||||||
#
|
#
|
||||||
# Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved
|
# Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials are licensed and made available under
|
# This program and the accompanying materials are licensed and made available under
|
||||||
# the terms and conditions of the BSD License that accompanies this distribution.
|
# the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
|
@ -37,6 +37,7 @@
|
||||||
Mcfg/Mcfg.aslc
|
Mcfg/Mcfg.aslc
|
||||||
Hpet/Hpet.aslc
|
Hpet/Hpet.aslc
|
||||||
Lpit/Lpit.aslc
|
Lpit/Lpit.aslc
|
||||||
|
Wsmt/Wsmt.aslc
|
||||||
|
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
/*++
|
||||||
|
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
|
This program and the accompanying materials are licensed and made available under
|
||||||
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
|
The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Module Name:
|
||||||
|
|
||||||
|
Wsmt.c
|
||||||
|
|
||||||
|
Abstract:
|
||||||
|
|
||||||
|
This file contains a structure definition for the Windows SMM Security
|
||||||
|
Mitigations Table (WSMT).
|
||||||
|
|
||||||
|
++*/
|
||||||
|
|
||||||
|
//
|
||||||
|
// Statements that include other files
|
||||||
|
//
|
||||||
|
#include "AcpiTablePlatform.h"
|
||||||
|
#include <IndustryStandard/WindowsSmmSecurityMitigationTable.h>
|
||||||
|
|
||||||
|
//
|
||||||
|
// WSMT Table definition
|
||||||
|
//
|
||||||
|
EFI_ACPI_WSMT_TABLE WSMT = {
|
||||||
|
EFI_ACPI_WINDOWS_SMM_SECURITY_MITIGATION_TABLE_SIGNATURE,
|
||||||
|
sizeof (EFI_ACPI_WSMT_TABLE),
|
||||||
|
EFI_WSMT_TABLE_REVISION,
|
||||||
|
//
|
||||||
|
// Checksum will be updated at runtime
|
||||||
|
//
|
||||||
|
0,
|
||||||
|
EFI_ACPI_OEM_ID, // OEMID is a 6 bytes long field
|
||||||
|
EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)
|
||||||
|
EFI_ACPI_OEM_REVISION, // OEM revision
|
||||||
|
EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID
|
||||||
|
EFI_ACPI_CREATOR_REVISION, // ASL compiler revision number
|
||||||
|
0x00000000, // Protection flag
|
||||||
|
};
|
||||||
|
|
||||||
|
VOID*
|
||||||
|
ReferenceAcpiTable (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Reference the table being generated to prevent the optimizer from
|
||||||
|
// removing the data structure from the executable
|
||||||
|
//
|
||||||
|
return (VOID*)&WSMT;
|
||||||
|
}
|
|
@ -58,6 +58,7 @@ Abstract:
|
||||||
#include <PchAccess.h>
|
#include <PchAccess.h>
|
||||||
#include <Guid/Vlv2Variable.h>
|
#include <Guid/Vlv2Variable.h>
|
||||||
#include <Guid/PlatformCpuInfo.h>
|
#include <Guid/PlatformCpuInfo.h>
|
||||||
|
#include <IndustryStandard/WindowsSmmSecurityMitigationTable.h>
|
||||||
|
|
||||||
|
|
||||||
CHAR16 EfiPlatformCpuInfoVariable[] = L"PlatformCpuInfo";
|
CHAR16 EfiPlatformCpuInfoVariable[] = L"PlatformCpuInfo";
|
||||||
|
@ -238,6 +239,7 @@ PlatformUpdateTables (
|
||||||
UINT8 TempVal;
|
UINT8 TempVal;
|
||||||
EFI_ACPI_3_0_IO_APIC_STRUCTURE *IOApicType;
|
EFI_ACPI_3_0_IO_APIC_STRUCTURE *IOApicType;
|
||||||
EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER *APICTableHeader;
|
EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER *APICTableHeader;
|
||||||
|
EFI_ACPI_WSMT_TABLE *WsmtTable;
|
||||||
|
|
||||||
CurrPtr = NULL;
|
CurrPtr = NULL;
|
||||||
EndPtr = NULL;
|
EndPtr = NULL;
|
||||||
|
@ -599,6 +601,17 @@ PlatformUpdateTables (
|
||||||
gBS->FreePool (OcurModelStringBuffer);
|
gBS->FreePool (OcurModelStringBuffer);
|
||||||
gBS->FreePool (OcurRefDataBlockBuffer);
|
gBS->FreePool (OcurRefDataBlockBuffer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case EFI_ACPI_WINDOWS_SMM_SECURITY_MITIGATION_TABLE_SIGNATURE:
|
||||||
|
WsmtTable = (EFI_ACPI_WSMT_TABLE *) Table;
|
||||||
|
//
|
||||||
|
// Update Microsoft WSMT table Protections flags.
|
||||||
|
//
|
||||||
|
WsmtTable->ProtectionFlags = ((WsmtTable->ProtectionFlags) | (EFI_WSMT_PROTECTION_FLAGS_FIXED_COMM_BUFFERS | EFI_WSMT_PROTECTION_FLAGS_COMM_BUFFER_NESTED_PTR_PROTECTION ));
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue