summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/BdsDxe
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2018-01-24 13:27:09 +0800
committerStar Zeng <star.zeng@intel.com>2018-02-12 11:36:14 +0800
commit9f0d7651b3a786b4177a3a07a731592746136dd2 (patch)
tree226e57f85869444c293e6d65d3c9db0fb2ab2bad /MdeModulePkg/Universal/BdsDxe
parent93fe14c2f7e62d8635679193249d251fce83a9f7 (diff)
downloadedk2-9f0d7651b3a786b4177a3a07a731592746136dd2.tar.gz
edk2-9f0d7651b3a786b4177a3a07a731592746136dd2.tar.bz2
edk2-9f0d7651b3a786b4177a3a07a731592746136dd2.zip
MdeModulePkg/BdsDxe: Remove useless perf Code
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>
Diffstat (limited to 'MdeModulePkg/Universal/BdsDxe')
-rw-r--r--MdeModulePkg/Universal/BdsDxe/Bds.h3
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BdsDxe.inf3
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BdsEntry.c57
3 files changed, 3 insertions, 60 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/Bds.h b/MdeModulePkg/Universal/BdsDxe/Bds.h
index 5658e61bee..63d961fd20 100644
--- a/MdeModulePkg/Universal/BdsDxe/Bds.h
+++ b/MdeModulePkg/Universal/BdsDxe/Bds.h
@@ -1,7 +1,7 @@
/** @file
Head file for BDS Architectural Protocol implementation
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, 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
which accompanies this distribution. The full text of the license may be found at
@@ -18,7 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Uefi.h>
#include <Guid/GlobalVariable.h>
#include <Guid/ConnectConInEvent.h>
-#include <Guid/Performance.h>
#include <Guid/StatusCodeDataTypeVariable.h>
#include <Guid/EventGroup.h>
diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
index a00b44276d..b8c5aa9795 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+++ b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
@@ -5,7 +5,7 @@
# gEfiBdsArchProtocolGuid. After DxeCore finish dispatching, DxeCore will invoke Entry
# interface of protocol gEfiBdsArchProtocolGuid, then BDS phase is entered.
#
-# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2018, 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
# which accompanies this distribution. The full text of the license may be found at
@@ -78,7 +78,6 @@
## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)
gConnectConInEventGuid ## SOMETIMES_CONSUMES ## Event
gEdkiiStatusCodeDataTypeVariableGuid ## SOMETIMES_CONSUMES ## GUID
- gPerformanceProtocolGuid ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)
gEfiEventReadyToBootGuid ## CONSUMES ## Event
[Protocols]
diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
index 2b24755ac3..3191a98630 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -5,7 +5,7 @@
After DxeCore finish DXE phase, gEfiBdsArchProtocolGuid->BdsEntry will be invoked
to enter BDS phase.
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
This program and the accompanying materials
@@ -635,57 +635,6 @@ BdsFormalizeEfiGlobalVariable (
}
/**
-
- Allocate a block of memory that will contain performance data to OS.
-
-**/
-VOID
-BdsAllocateMemoryForPerformanceData (
- VOID
- )
-{
- EFI_STATUS Status;
- EFI_PHYSICAL_ADDRESS AcpiLowMemoryBase;
- EDKII_VARIABLE_LOCK_PROTOCOL *VariableLock;
-
- AcpiLowMemoryBase = 0x0FFFFFFFFULL;
-
- //
- // Allocate a block of memory that will contain performance data to OS.
- //
- Status = gBS->AllocatePages (
- AllocateMaxAddress,
- EfiReservedMemoryType,
- EFI_SIZE_TO_PAGES (PERF_DATA_MAX_LENGTH),
- &AcpiLowMemoryBase
- );
- if (!EFI_ERROR (Status)) {
- //
- // Save the pointer to variable for use in S3 resume.
- //
- Status = BdsDxeSetVariableAndReportStatusCodeOnError (
- L"PerfDataMemAddr",
- &gPerformanceProtocolGuid,
- EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
- sizeof (EFI_PHYSICAL_ADDRESS),
- &AcpiLowMemoryBase
- );
- if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "[Bds] PerfDataMemAddr (%08x) cannot be saved to NV storage.\n", AcpiLowMemoryBase));
- }
- //
- // Mark L"PerfDataMemAddr" variable to read-only if the Variable Lock protocol exists
- // Still lock it even the variable cannot be saved to prevent it's set by 3rd party code.
- //
- Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock);
- if (!EFI_ERROR (Status)) {
- Status = VariableLock->RequestToLock (VariableLock, L"PerfDataMemAddr", &gPerformanceProtocolGuid);
- ASSERT_EFI_ERROR (Status);
- }
- }
-}
-
-/**
Enter an infinite loop of calling the Boot Manager Menu.
This is a last resort alternative to BdsEntry() giving up for good. This
@@ -780,10 +729,6 @@ BdsEntry (
PERF_START (NULL, "BDS", NULL, 0);
DEBUG ((EFI_D_INFO, "[Bds] Entry...\n"));
- PERF_CODE (
- BdsAllocateMemoryForPerformanceData ();
- );
-
//
// Fill in FirmwareVendor and FirmwareRevision from PCDs
//