From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>, Star Zeng <star.zeng@intel.com>
Subject: [PATCH v2 5/7] IntelFrameworkModulePkg/BdsDxe: Remove the useless Perf codes
Date: Fri, 9 Feb 2018 16:05:20 +0800 [thread overview]
Message-ID: <1518163522-23144-6-git-send-email-dandan.bi@intel.com> (raw)
In-Reply-To: <1518163522-23144-1-git-send-email-dandan.bi@intel.com>
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 pref 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>
---
IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h | 3 +-
.../Universal/BdsDxe/BdsDxe.inf | 3 +-
.../Universal/BdsDxe/BdsEntry.c | 57 +---------------------
3 files changed, 3 insertions(+), 60 deletions(-)
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
index 93bafd2..beb9226 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
@@ -1,9 +1,9 @@
/** @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
http://opensource.org/licenses/bsd-license.php
@@ -34,11 +34,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/CapsuleVendor.h>
#include <Guid/StatusCodeDataTypeId.h>
#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>
#include <Protocol/HiiConfigAccess.h>
#include <Protocol/GraphicsOutput.h>
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
index 95a707c..92a4737 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
@@ -12,11 +12,11 @@
# EFI\BOOT\BOOTIA64.EFI file from selected boot device and transfer control to boot loader.
#
# 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
# http://opensource.org/licenses/bsd-license.php
#
@@ -155,11 +155,10 @@
## SOMETIMES_CONSUMES ## Event
gConnectConInEventGuid
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
gEfiLoadFileProtocolGuid ## SOMETIMES_CONSUMES
gEfiBdsArchProtocolGuid ## PRODUCES
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
index 6e3e5b0..9c5a91b 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -3,11 +3,11 @@
When this module was dispatched by DxeCore, gEfiBdsArchProtocolGuid will be installed
which contains interface of BdsEntry.
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
http://opensource.org/licenses/bsd-license.php
@@ -443,61 +443,10 @@ 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
consoles are initialized, and the boot options are tried.
@param This Protocol Instance structure.
@@ -521,14 +470,10 @@ BdsEntry (
// Insert the performance probe
//
PERF_END (NULL, "DXE", NULL, 0);
PERF_START (NULL, "BDS", NULL, 0);
- PERF_CODE (
- BdsAllocateMemoryForPerformanceData ();
- );
-
//
// Initialize the global system boot option and driver option
//
InitializeListHead (&DriverOptionList);
InitializeListHead (&BootOptionList);
--
1.9.5.msysgit.1
next prev parent reply other threads:[~2018-02-09 8:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-09 8:05 [PATCH v2 0/7] Remove the useless pref codes Dandan Bi
2018-02-09 8:05 ` [PATCH v2 1/7] MdeModulePkg/Performance.h: Remove the useless definition Dandan Bi
2018-02-09 8:05 ` [PATCH v2 2/7] UefiCpuPkg/S3Resume: Remove useless pref code Dandan Bi
2018-02-09 8:05 ` [PATCH v2 3/7] MdeModulePkg/BdsDxe: Remove useless Pref Code Dandan Bi
2018-02-09 8:05 ` [PATCH v2 4/7] MdeModulePkg/UefiBootManagerLib: Remove the useless pref codes Dandan Bi
2018-02-09 8:05 ` Dandan Bi [this message]
2018-02-09 8:05 ` [PATCH v2 6/7] IntelFrameworkModulePkg/GenericBdsLib: Remove the useless Perf codes Dandan Bi
2018-02-09 8:05 ` [PATCH v2 7/7] Vlv2TbltDevicePkg/Override/GenericBdsLib:Remove useless Perf code Dandan Bi
[not found] ` <0C09AFA07DD0434D9E2A0C6AEB0483103BA3E142@shsmsx102.ccr.corp.intel.com>
2018-02-09 8:43 ` [PATCH v2 0/7] Remove the useless pref codes Bi, Dandan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1518163522-23144-6-git-send-email-dandan.bi@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox