]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFrameworkModulePkg/BdsDxe: Remove the useless Perf codes
authorDandan Bi <dandan.bi@intel.com>
Wed, 31 Jan 2018 02:35:17 +0000 (10:35 +0800)
committerStar Zeng <star.zeng@intel.com>
Mon, 12 Feb 2018 03:36:14 +0000 (11:36 +0800)
Our new performance infrastructure (edk2 trunk commit hash value:
SHA-1: 73fef64f14d1b97ae9bd4705df3becc022391eba ~
SHA-1: 115eae650bfd2be2c2bc37360f4a755065e774c4) can support to
dump performance date form ACPI table in OS. So we can remove
the old perf code to write performance data to OS.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c

index 93bafd2dd8ec25c598358cdd4759ccc20068c048..beb9226180bd6308d90f0a089d769738ab51ec29 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Head file for BDS Architectural Protocol implementation\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, 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
@@ -36,7 +36,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Guid/LegacyDevOrder.h>\r
 #include <Guid/BdsHii.h>\r
 #include <Guid/ConnectConInEvent.h>\r
-#include <Guid/Performance.h>\r
 #include <Guid/FmpCapsule.h>\r
 #include <Protocol/GenericMemoryTest.h>\r
 #include <Protocol/FormBrowser2.h>\r
index 95a707c48b9a7c3a53e48acff73ae47192150bdf..92a473769a31bdbb5fd3f4d910a200024ce4b092 100644 (file)
@@ -14,7 +14,7 @@
 #  BDSDxe also maintain the UI for "Boot Manager, Boot Maintaince Manager, Device Manager" which\r
 #  is used for user to configure boot option or maintain hardware device.\r
 #  \r
-#  Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2008 - 2018, 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
   gEfiFmpCapsuleGuid                            ## SOMETIMES_CONSUMES ## GUID # FMP Capsule\r
   gEdkiiStatusCodeDataTypeVariableGuid          ## SOMETIMES_CONSUMES ## GUID\r
   gEfiUartDevicePathGuid                        ## SOMETIMES_CONSUMES ## GUID (Identify the device path for UARD device)\r
-  gPerformanceProtocolGuid                      ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)\r
 \r
 [Protocols]\r
   gEfiSimpleFileSystemProtocolGuid              ## SOMETIMES_CONSUMES\r
index 6e3e5b05f91bf79e538ac8024cc3e8fe24737ad9..9c5a91b22d81af2b414eef549366aff23489664b 100644 (file)
@@ -5,7 +5,7 @@
   After DxeCore finish DXE phase, gEfiBdsArchProtocolGuid->BdsEntry will be invoked\r
   to enter BDS phase.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, 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
@@ -443,57 +443,6 @@ BdsFormalizeEfiGlobalVariable (
 \r
 }\r
 \r
-/**\r
-\r
-  Allocate a block of memory that will contain performance data to OS.\r
-\r
-**/\r
-VOID\r
-BdsAllocateMemoryForPerformanceData (\r
-  VOID\r
-  )\r
-{\r
-  EFI_STATUS                    Status;\r
-  EFI_PHYSICAL_ADDRESS          AcpiLowMemoryBase;\r
-  EDKII_VARIABLE_LOCK_PROTOCOL  *VariableLock;\r
-\r
-  AcpiLowMemoryBase = 0x0FFFFFFFFULL;\r
-\r
-  //\r
-  // Allocate a block of memory that will contain performance data to OS.\r
-  //\r
-  Status = gBS->AllocatePages (\r
-                  AllocateMaxAddress,\r
-                  EfiReservedMemoryType,\r
-                  EFI_SIZE_TO_PAGES (PERF_DATA_MAX_LENGTH),\r
-                  &AcpiLowMemoryBase\r
-                  );\r
-  if (!EFI_ERROR (Status)) {\r
-    //\r
-    // Save the pointer to variable for use in S3 resume.\r
-    //\r
-    BdsDxeSetVariableAndReportStatusCodeOnError (\r
-      L"PerfDataMemAddr",\r
-      &gPerformanceProtocolGuid,\r
-      EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
-      sizeof (EFI_PHYSICAL_ADDRESS),\r
-      &AcpiLowMemoryBase\r
-      );\r
-    if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "[Bds] PerfDataMemAddr (%08x) cannot be saved to NV storage.\n", AcpiLowMemoryBase));\r
-    }\r
-    //\r
-    // Mark L"PerfDataMemAddr" variable to read-only if the Variable Lock protocol exists\r
-    // Still lock it even the variable cannot be saved to prevent it's set by 3rd party code.\r
-    //\r
-    Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock);\r
-    if (!EFI_ERROR (Status)) {\r
-      Status = VariableLock->RequestToLock (VariableLock, L"PerfDataMemAddr", &gPerformanceProtocolGuid);\r
-      ASSERT_EFI_ERROR (Status);\r
-    }\r
-  }\r
-}\r
-\r
 /**\r
 \r
   Service routine for BdsInstance->Entry(). Devices are connected, the\r
@@ -523,10 +472,6 @@ BdsEntry (
   PERF_END (NULL, "DXE", NULL, 0);\r
   PERF_START (NULL, "BDS", NULL, 0);\r
 \r
-  PERF_CODE (\r
-    BdsAllocateMemoryForPerformanceData ();\r
-  );\r
-\r
   //\r
   // Initialize the global system boot option and driver option\r
   //\r