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: 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: 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>
(cherry picked from commit 9f0d7651b3)
This commit is contained in:
Dandan Bi
2018-01-24 13:27:09 +08:00
committed by Star Zeng
parent d1e9cbacb8
commit 6c5ffada1f
3 changed files with 3 additions and 60 deletions

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>
(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
@@ -634,57 +634,6 @@ BdsFormalizeEfiGlobalVariable (
BdsFormalizeOSIndicationVariable ();
}
/**
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.
@@ -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
//