From nobody Mon Dec 23 13:54:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1518163572907380.11146832239785; Fri, 9 Feb 2018 00:06:12 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DBEA922361E45; Fri, 9 Feb 2018 00:00:23 -0800 (PST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DFBC3223DB780 for ; Fri, 9 Feb 2018 00:00:22 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Feb 2018 00:06:08 -0800 Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by fmsmga005.fm.intel.com with ESMTP; 09 Feb 2018 00:06:08 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,482,1511856000"; d="scan'208";a="202604626" From: Dandan Bi To: edk2-devel@lists.01.org Date: Fri, 9 Feb 2018 16:05:20 +0800 Message-Id: <1518163522-23144-6-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1518163522-23144-1-git-send-email-dandan.bi@intel.com> References: <1518163522-23144-1-git-send-email-dandan.bi@intel.com> Subject: [edk2] [PATCH v2 5/7] IntelFrameworkModulePkg/BdsDxe: Remove the useless Perf codes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Star Zeng , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi --- 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/IntelFramewor= kModulePkg/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 =20 -Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
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 =20 @@ -34,11 +34,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITH= ER EXPRESS OR IMPLIED. #include #include #include #include #include -#include #include #include #include #include #include diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf b/IntelFra= meworkModulePkg/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 contr= ol 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. # =20 -# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License # which accompanies this distribution. The full text of the license may = be found at # http://opensource.org/licenses/bsd-license.php # =20 @@ -155,11 +155,10 @@ ## SOMETIMES_CONSUMES ## Event gConnectConInEventGuid gEfiFmpCapsuleGuid ## SOMETIMES_CONSUMES ## G= UID # FMP Capsule gEdkiiStatusCodeDataTypeVariableGuid ## SOMETIMES_CONSUMES ## G= UID gEfiUartDevicePathGuid ## SOMETIMES_CONSUMES ## G= UID (Identify the device path for UARD device) - gPerformanceProtocolGuid ## SOMETIMES_PRODUCES ## V= ariable:L"PerfDataMemAddr" (The ACPI address of performance data) =20 [Protocols] gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES gEfiLoadFileProtocolGuid ## SOMETIMES_CONSUMES gEfiBdsArchProtocolGuid ## PRODUCES diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c b/IntelFra= meworkModulePkg/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 b= e invoked to enter BDS phase. =20 -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
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 =20 @@ -443,61 +443,10 @@ BdsFormalizeEfiGlobalVariable ( =20 } =20 /** =20 - 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 =3D 0x0FFFFFFFFULL; - - // - // Allocate a block of memory that will contain performance data to OS. - // - Status =3D 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_VA= RIABLE_RUNTIME_ACCESS, - sizeof (EFI_PHYSICAL_ADDRESS), - &AcpiLowMemoryBase - ); - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[Bds] PerfDataMemAddr (%08x) cannot be saved t= o 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 =3D gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL,= (VOID **) &VariableLock); - if (!EFI_ERROR (Status)) { - Status =3D VariableLock->RequestToLock (VariableLock, L"PerfDataMemA= ddr", &gPerformanceProtocolGuid); - ASSERT_EFI_ERROR (Status); - } - } -} - -/** - Service routine for BdsInstance->Entry(). Devices are connected, the consoles are initialized, and the boot options are tried. =20 @param This Protocol Instance structure. =20 @@ -521,14 +470,10 @@ BdsEntry ( // Insert the performance probe // PERF_END (NULL, "DXE", NULL, 0); PERF_START (NULL, "BDS", NULL, 0); =20 - PERF_CODE ( - BdsAllocateMemoryForPerformanceData (); - ); - // // Initialize the global system boot option and driver option // InitializeListHead (&DriverOptionList); InitializeListHead (&BootOptionList); --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel