IntelFrameworkModulePkg/BdsDxe: Remove the useless Perf codes

Our new performance infrastructure (edk2 trunk commit hash value:
SHA-1: 73fef64f14 ~
SHA-1: 115eae650b) 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>
This commit is contained in:
Dandan Bi 2018-01-31 10:35:17 +08:00 committed by Star Zeng
parent 3a039a567a
commit 46433d44a9
3 changed files with 3 additions and 60 deletions

View File

@ -1,7 +1,7 @@
/** @file
Head file for BDS Architectural Protocol implementation
Copyright (c) 2004 - 2014, 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
@ -36,7 +36,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/LegacyDevOrder.h>
#include <Guid/BdsHii.h>
#include <Guid/ConnectConInEvent.h>
#include <Guid/Performance.h>
#include <Guid/FmpCapsule.h>
#include <Protocol/GenericMemoryTest.h>
#include <Protocol/FormBrowser2.h>

View File

@ -14,7 +14,7 @@
# BDSDxe also maintain the UI for "Boot Manager, Boot Maintaince Manager, Device Manager" which
# is used for user to configure boot option or maintain hardware device.
#
# Copyright (c) 2008 - 2015, 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
@ -157,7 +157,6 @@
gEfiFmpCapsuleGuid ## SOMETIMES_CONSUMES ## GUID # FMP Capsule
gEdkiiStatusCodeDataTypeVariableGuid ## SOMETIMES_CONSUMES ## GUID
gEfiUartDevicePathGuid ## SOMETIMES_CONSUMES ## GUID (Identify the device path for UARD device)
gPerformanceProtocolGuid ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)
[Protocols]
gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES

View File

@ -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>
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
@ -443,57 +443,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.
//
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);
}
}
}
/**
Service routine for BdsInstance->Entry(). Devices are connected, the
@ -523,10 +472,6 @@ BdsEntry (
PERF_END (NULL, "DXE", NULL, 0);
PERF_START (NULL, "BDS", NULL, 0);
PERF_CODE (
BdsAllocateMemoryForPerformanceData ();
);
//
// Initialize the global system boot option and driver option
//