]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
Update Code to pass EBC compiler.
[mirror_edk2.git] / MdeModulePkg / Universal / Acpi / FirmwarePerformanceDataTableDxe / FirmwarePerformanceDxe.c
index ce17e4f928b6376765ab7b2f38611ae6529515e6..dae12a4869004a63e2f55f5159fc850a5bc1ea56 100644 (file)
@@ -5,7 +5,7 @@
   for Firmware Basic Boot Performance Record and other boot performance records, \r
   and install FPDT to ACPI table.\r
 \r
-  Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -238,7 +238,7 @@ InstallFirmwarePerformanceDataTable (
   EFI_ACPI_TABLE_PROTOCOL       *AcpiTableProtocol;\r
   EFI_PHYSICAL_ADDRESS          Address;\r
   UINTN                         Size;\r
-  UINT8                         SmmBootRecordCommBuffer[SMM_BOOT_RECORD_COMM_SIZE];\r
+  UINT8                         *SmmBootRecordCommBuffer;\r
   EFI_SMM_COMMUNICATE_HEADER    *SmmCommBufferHeader;\r
   SMM_BOOT_RECORD_COMMUNICATE   *SmmCommData;\r
   UINTN                         CommSize;\r
@@ -259,6 +259,8 @@ InstallFirmwarePerformanceDataTable (
   //\r
   // Collect boot records from SMM drivers.\r
   //\r
+  SmmBootRecordCommBuffer = AllocateZeroPool (SMM_BOOT_RECORD_COMM_SIZE);\r
+  ASSERT (SmmBootRecordCommBuffer != NULL);\r
   SmmCommData = NULL;\r
   Status = gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL, (VOID **) &Communication);\r
   if (!EFI_ERROR (Status)) {\r
@@ -294,6 +296,7 @@ InstallFirmwarePerformanceDataTable (
       ASSERT_EFI_ERROR(SmmCommData->ReturnStatus);\r
     }\r
   }\r
+  FreePool (SmmBootRecordCommBuffer);\r
 \r
   //\r
   // Prepare memory for runtime Performance Record. \r