]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/BdsDxe: Remove useless perf Code
authorDandan Bi <dandan.bi@intel.com>
Wed, 24 Jan 2018 05:27:09 +0000 (13:27 +0800)
committerStar Zeng <star.zeng@intel.com>
Mon, 12 Feb 2018 03:36:14 +0000 (11:36 +0800)
V2: Just update the commit message to reference the hash value of
new performance infrastructure.

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: Ruiyu Ni <ruiyu.ni@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: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Universal/BdsDxe/Bds.h
MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
MdeModulePkg/Universal/BdsDxe/BdsEntry.c

index 5658e61beeb7ac82b564a2d2f733805902163fc7..63d961fd2017885880a2cc6fb3c11a5e2e72f9b5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Head file for BDS Architectural Protocol implementation\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
@@ -18,7 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Uefi.h>\r
 #include <Guid/GlobalVariable.h>\r
 #include <Guid/ConnectConInEvent.h>\r
-#include <Guid/Performance.h>\r
 #include <Guid/StatusCodeDataTypeVariable.h>\r
 #include <Guid/EventGroup.h>\r
 \r
index a00b44276d56d35f36ae59bacc2559b25c6155b8..b8c5aa979527a5424b7eaedf2df07d9c35f613e7 100644 (file)
@@ -5,7 +5,7 @@
 #  gEfiBdsArchProtocolGuid. After DxeCore finish dispatching, DxeCore will invoke Entry\r
 #  interface of protocol gEfiBdsArchProtocolGuid, then BDS phase is entered.\r
 #  \r
-#  Copyright (c) 2008 - 2016, 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
@@ -78,7 +78,6 @@
                                                 ## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)\r
   gConnectConInEventGuid                        ## SOMETIMES_CONSUMES ## Event\r
   gEdkiiStatusCodeDataTypeVariableGuid          ## SOMETIMES_CONSUMES ## GUID\r
-  gPerformanceProtocolGuid                      ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)\r
   gEfiEventReadyToBootGuid                      ## CONSUMES           ## Event\r
 \r
 [Protocols]\r
index 2b24755ac368696f7fd57c7917dcd64614d225ac..3191a986304b2aa2752ecff696b8736c8943fd3b 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
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
 This program and the accompanying materials\r
@@ -634,57 +634,6 @@ BdsFormalizeEfiGlobalVariable (
   BdsFormalizeOSIndicationVariable ();\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
-    Status = 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
   Enter an infinite loop of calling the Boot Manager Menu.\r
 \r
@@ -780,10 +729,6 @@ BdsEntry (
   PERF_START (NULL, "BDS", NULL, 0);\r
   DEBUG ((EFI_D_INFO, "[Bds] Entry...\n"));\r
 \r
-  PERF_CODE (\r
-    BdsAllocateMemoryForPerformanceData ();\r
-  );\r
-\r
   //\r
   // Fill in FirmwareVendor and FirmwareRevision from PCDs\r
   //\r