From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 3CA6A2098C8BC for ; Wed, 18 Jul 2018 23:44:13 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2018 23:44:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,373,1526367600"; d="scan'208";a="241485499" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga005.jf.intel.com with ESMTP; 18 Jul 2018 23:44:12 -0700 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Liming Gao , Star Zeng Date: Thu, 19 Jul 2018 14:44:01 +0800 Message-Id: <20180719064402.54872-1-dandan.bi@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [patch 1/2] MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 06:44:14 -0000 Add an example case for the usage of PERF_EVENT_SIGNAL_BEGIN/PERF_EVENT_SIGNAL_END Cc: Liming Gao Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi --- MdeModulePkg/Core/DxeIplPeim/DxeIpl.h | 3 ++- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 1 + MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h index 6f8e13d213..9ea88a399b 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h @@ -1,10 +1,10 @@ /** @file Master header file for DxeIpl PEIM. All source files in this module should include this file for common definitions. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 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 @@ -46,10 +46,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include #include #include +#include #define STACK_SIZE 0x20000 #define BSP_STORE_SIZE 0x4000 diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf index 7deeb8f270..302934283a 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf @@ -77,10 +77,11 @@ BaseLib PeimEntryPoint DebugLib DebugAgentLib PeiServicesTablePointerLib + PerformanceLib [LibraryClasses.ARM, LibraryClasses.AARCH64] ArmMmuLib [Ppis] diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c index d5aa0474b0..8a939b6c24 100644 --- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c @@ -318,11 +318,13 @@ HandOffToDxeCore ( PageTables = CreateIdentityMappingPageTables (BaseOfStack, STACK_SIZE); // // End of PEI phase signal // + PERF_EVENT_SIGNAL_BEGIN (gEndOfPeiSignalPpi.Guid); Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi); + PERF_EVENT_SIGNAL_END (gEndOfPeiSignalPpi.Guid); ASSERT_EFI_ERROR (Status); AsmWriteCr3 (PageTables); // @@ -435,11 +437,13 @@ HandOffToDxeCore ( } // // End of PEI phase signal // + PERF_EVENT_SIGNAL_BEGIN (gEndOfPeiSignalPpi.Guid); Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi); + PERF_EVENT_SIGNAL_END (gEndOfPeiSignalPpi.Guid); ASSERT_EFI_ERROR (Status); if (BuildPageTablesIa32Pae) { AsmWriteCr3 (PageTables); // -- 2.14.3.windows.1