]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
Vlv2TbltDevicePkg/AcpiPlatform: Remove unused variables
[mirror_edk2.git] / Vlv2TbltDevicePkg / AcpiPlatform / AcpiPlatform.c
index 2ff14ec6bb5daf5251da3a743adbfef8f879af86..f533d742a4d37ff144e80fcd1c6293c0dde20ca4 100644 (file)
@@ -1,23 +1,23 @@
 /** @file\r
 \r
-  Copyright (c) 2004  - 2015, Intel Corporation. All rights reserved.<BR>\r
-                                                                                   \r
+  Copyright (c) 2004  - 2016, Intel Corporation. All rights reserved.<BR>\r
+\r
 \r
   This program and the accompanying materials are licensed and made available under\r
 \r
-  the terms and conditions of the BSD License that accompanies this distribution.  \r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+\r
+  The full text of the license may be found at\r
+\r
+  http://opensource.org/licenses/bsd-license.php.\r
 \r
-  The full text of the license may be found at                                     \r
 \r
-  http://opensource.org/licenses/bsd-license.php.                                  \r
 \r
-                                                                                   \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,            \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.    \r
 \r
-                                                                                   \r
 \r
 \r
 \r
@@ -31,7 +31,7 @@ Abstract:
   ACPI Platform Driver\r
 \r
 \r
---*/\r
+**/\r
 \r
 #include <PiDxe.h>\r
 #include <Protocol/TcgService.h>\r
@@ -58,6 +58,7 @@ Abstract:
 #include <PchAccess.h>\r
 #include <Guid/Vlv2Variable.h>\r
 #include <Guid/PlatformCpuInfo.h>\r
+#include <IndustryStandard/WindowsSmmSecurityMitigationTable.h>\r
 \r
 \r
 CHAR16    EfiPlatformCpuInfoVariable[] = L"PlatformCpuInfo";\r
@@ -210,8 +211,6 @@ PlatformUpdateTables (
   EFI_MP_SERVICES_PROTOCOL                                    *MpService;\r
   UINTN                                                       MaximumNumberOfCPUs;\r
   UINTN                                                       NumberOfEnabledCPUs;\r
-  UINTN                                                       BufferSize;\r
-  ACPI_APIC_STRUCTURE_PTR                                     *ProcessorLocalApicEntry;\r
   UINTN                                                       BspIndex;\r
   EFI_ACPI_1_0_ASF_DESCRIPTION_TABLE                          *AsfEntry;\r
   EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_HEADER            *HpetTbl;\r
@@ -233,18 +232,16 @@ PlatformUpdateTables (
   UINT16                                                      NumberOfHpets;\r
   UINT16                                                      HpetCapIdValue;\r
   UINT32                                                      HpetBlockID;\r
-  UINTN                                                       LocalApicCounter;\r
   EFI_PROCESSOR_INFORMATION                                   ProcessorInfoBuffer;\r
   UINT8                                                       TempVal;\r
   EFI_ACPI_3_0_IO_APIC_STRUCTURE                              *IOApicType;\r
   EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER         *APICTableHeader;\r
+  EFI_ACPI_WSMT_TABLE                                         *WsmtTable;\r
 \r
   CurrPtr                 = NULL;\r
   EndPtr                  = NULL;\r
   ApicPtr                 = NULL;\r
-  LocalApicCounter        = 0;\r
   CurrProcessor           = 0;\r
-  ProcessorLocalApicEntry = NULL;\r
 \r
 \r
  if (Table->Signature != EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) {\r
@@ -372,7 +369,6 @@ PlatformUpdateTables (
               ApicPtr->AcpiLocalApic.AcpiProcessorId = (UINT8)MaximumNumberOfCPUs;\r
             }\r
 \r
-            BufferSize                    = 0;\r
             ApicPtr->AcpiLocalApic.Flags  = 0;\r
 \r
             for (CurrProcessor = 0; CurrProcessor < MaximumNumberOfCPUs; CurrProcessor++) {\r
@@ -599,6 +595,17 @@ PlatformUpdateTables (
       gBS->FreePool (OcurModelStringBuffer);\r
       gBS->FreePool (OcurRefDataBlockBuffer);\r
       break;\r
+\r
+\r
+    case EFI_ACPI_WINDOWS_SMM_SECURITY_MITIGATION_TABLE_SIGNATURE:\r
+      WsmtTable = (EFI_ACPI_WSMT_TABLE *) Table;\r
+       //\r
+       // Update Microsoft WSMT table Protections flags.\r
+       //\r
+      WsmtTable->ProtectionFlags = ((WsmtTable->ProtectionFlags) | (EFI_WSMT_PROTECTION_FLAGS_FIXED_COMM_BUFFERS | EFI_WSMT_PROTECTION_FLAGS_COMM_BUFFER_NESTED_PTR_PROTECTION ));\r
+      break;\r
+\r
+\r
     default:\r
       break;\r
   }\r
@@ -708,7 +715,7 @@ OnReadyToBoot (
               &SetupVarBuffer\r
               );\r
     ASSERT_EFI_ERROR (Status);\r
-  }    \r
+  }\r
 \r
   //\r
   // Find the AcpiSupport protocol.\r
@@ -794,7 +801,6 @@ AcpiPlatformEntryPoint (
   EFI_MP_SERVICES_PROTOCOL      *MpService;\r
   UINTN                         MaximumNumberOfCPUs;\r
   UINTN                         NumberOfEnabledCPUs;\r
-  UINT32                        Data32;\r
   PCH_STEPPING                  pchStepping;\r
 \r
   mFirstNotify      = FALSE;\r
@@ -803,7 +809,6 @@ AcpiPlatformEntryPoint (
   Instance          = 0;\r
   CurrentTable      = NULL;\r
   TableHandle       = 0;\r
-  Data32            = 0;\r
 \r
   //\r
   // Update HOB variable for PCI resource information.\r
@@ -1051,6 +1056,7 @@ AcpiPlatformEntryPoint (
   mGlobalNvsArea.Area->BatteryChargingSolution          = GLOBAL_NVS_DEVICE_DISABLE;\r
   mGlobalNvsArea.Area->ISPDevSel                        = mSystemConfiguration.ISPDevSel;\r
   mGlobalNvsArea.Area->LpeEnable                        = mSystemConfiguration.Lpe;\r
+  mGlobalNvsArea.Area->LpeAudioReportedByDSDT           = mSystemConfiguration.LpeAudioReportedByDSDT;\r
 \r
   if (mSystemConfiguration.ISPEn == 0) {\r
     mGlobalNvsArea.Area->ISPDevSel                      = GLOBAL_NVS_DEVICE_DISABLE;\r
@@ -1130,7 +1136,7 @@ AcpiPlatformEntryPoint (
   }\r
 \r
   mGlobalNvsArea.Area->SdCardRemovable = mSystemConfiguration.SdCardRemovable;\r
-  \r
+\r
   //\r
   // Microsoft IOT\r
   //\r
@@ -1143,7 +1149,7 @@ AcpiPlatformEntryPoint (
     mGlobalNvsArea.Area->MicrosoftIoT = GLOBAL_NVS_DEVICE_DISABLE;\r
     DEBUG ((EFI_D_ERROR, "JP1 is not set to be MSFT IOT configuration.\n"));\r
   }\r
-  \r
+\r
   //\r
   // SIO related option.\r
   //\r