From nobody Mon May 6 11:42:06 2024 Delivered-To: importer@patchew.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; 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 1506097099829646.0725236535993; Fri, 22 Sep 2017 09:18:19 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E7CE021E1B74A; Fri, 22 Sep 2017 09:15:08 -0700 (PDT) Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5A4AE20945B80 for ; Fri, 22 Sep 2017 09:15:07 -0700 (PDT) Received: from E111747.Emea.Arm.com (e111747.emea.arm.com [10.1.28.16]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id v8MGICfe017591; Fri, 22 Sep 2017 17:18:12 +0100 X-Original-To: edk2-devel@lists.01.org From: evan.lloyd@arm.com To: edk2-devel@lists.01.org Date: Fri, 22 Sep 2017 17:18:06 +0100 Message-Id: <20170922161807.11756-2-evan.lloyd@arm.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170922161807.11756-1-evan.lloyd@arm.com> References: <20170922161807.11756-1-evan.lloyd@arm.com> Subject: [edk2] [PATCH 1/2] ArmPlatformPkg: Store initial timer value X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "nd@arm.com"@arm.com, "ard.biesheuvel@linaro.org"@arm.com, "thomas.abraham@arm.com"@arm.com, "Arvind.Chauhan@arm.com"@arm.com, "leif.lindholm@linaro.org"@arm.com, "Daniil.Egranov@arm.com"@arm.com 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" From: Alexei Fedorov This commit adds support for storing initial timer value logged at the beginning of firmware image execution. This timer value is required for firmware basic boot performance data record referenced by Firmware Performance Data Table (FPDT). Change-Id: Ic93bd3e509053e818187bcc153de493050e794aa Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Alexei Fedorov Reviewed-by: Graeme Gregory --- ArmPlatformPkg/PrePi/PeiMPCore.inf | 3 ++- ArmPlatformPkg/PrePi/PeiUniCore.inf | 3 ++- ArmPlatformPkg/PrePi/PrePi.c | 10 +++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf b/ArmPlatformPkg/PrePi/PeiM= PCore.inf index 4ce4a52784726a89fd09228fcd52aa1e6f87c85f..636049d4f44d29092bc9748caa9= 9371d6538c554 100644 --- a/ArmPlatformPkg/PrePi/PeiMPCore.inf +++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf @@ -1,7 +1,7 @@ #/** @file # # (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
-# Copyright (c) 2011-2014, ARM Ltd. All rights reserved.
+# Copyright (c) 2011-2017, ARM Ltd. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -68,6 +68,7 @@ [Ppis] =20 [Guids] gArmMpCoreInfoGuid + gEfiFirmwarePerformanceGuid =20 [FeaturePcd] gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf b/ArmPlatformPkg/PrePi/Pei= UniCore.inf index 85114af7d1a8c37ea941a0714de697dc2bef754d..f37ddec9d13dad75882a186816b= 5ecb8856c7c86 100644 --- a/ArmPlatformPkg/PrePi/PeiUniCore.inf +++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf @@ -1,7 +1,7 @@ #/** @file # # (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
-# Copyright (c) 2011-2014, ARM Ltd. All rights reserved.
+# Copyright (c) 2011-2017, ARM Ltd. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -67,6 +67,7 @@ [Ppis] =20 [Guids] gArmMpCoreInfoGuid + gEfiFirmwarePerformanceGuid =20 [FeaturePcd] gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c index e548ccace09730b78851b987d7b902a5bb7a84c5..e5016ea45359f74e7688adb2504= 784070dde0dce 100644 --- a/ArmPlatformPkg/PrePi/PrePi.c +++ b/ArmPlatformPkg/PrePi/PrePi.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2011-2014, ARM Limited. All rights reserved. +* Copyright (c) 2011-2017, ARM Limited. All rights reserved. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the B= SD License @@ -24,6 +24,7 @@ =20 #include #include +#include #include =20 #include "PrePi.h" @@ -86,6 +87,7 @@ PrePiMain ( CHAR8 Buffer[100]; UINTN CharCount; UINTN StacksSize; + FIRMWARE_SEC_PERFORMANCE Performance; =20 // If ensure the FD is either part of the System Memory or totally outsi= de of the System Memory (XIP) ASSERT (IS_XIP() || @@ -146,6 +148,12 @@ PrePiMain ( } } =20 + // Store timer value logged at the beginning of firmware image execution + Performance.ResetEnd =3D GetTimeInNanoSecond (StartTimeStamp); + + // Build SEC Performance Data Hob + BuildGuidDataHob (&gEfiFirmwarePerformanceGuid, &Performance, sizeof (Pe= rformance)); + // Set the Boot Mode SetBootMode (ArmPlatformGetBootMode ()); =20 --=20 Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon May 6 11:42:06 2024 Delivered-To: importer@patchew.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; 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 150609710231262.99026223810813; Fri, 22 Sep 2017 09:18:22 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 321C221E1B750; Fri, 22 Sep 2017 09:15:09 -0700 (PDT) Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7DC0B21E1B743 for ; Fri, 22 Sep 2017 09:15:07 -0700 (PDT) Received: from E111747.Emea.Arm.com (e111747.emea.arm.com [10.1.28.16]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id v8MGICff017591; Fri, 22 Sep 2017 17:18:13 +0100 X-Original-To: edk2-devel@lists.01.org From: evan.lloyd@arm.com To: edk2-devel@lists.01.org Date: Fri, 22 Sep 2017 17:18:07 +0100 Message-Id: <20170922161807.11756-3-evan.lloyd@arm.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170922161807.11756-1-evan.lloyd@arm.com> References: <20170922161807.11756-1-evan.lloyd@arm.com> Subject: [edk2] [PATCH 2/2] [edk2-platforms] ARM/JunoPkg: Add support for FPDT table. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "nd@arm.com"@arm.com, "ard.biesheuvel@linaro.org"@arm.com, "thomas.abraham@arm.com"@arm.com, "Arvind.Chauhan@arm.com"@arm.com, "leif.lindholm@linaro.org"@arm.com, "Daniil.Egranov@arm.com"@arm.com 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" From: Alexei Fedorov This commmit adds support for building FPDT table with firmware basic boot performance record data. Change-Id: Ib62b7c829e7891769f88e747343d4fed846e1acb Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Alexei Fedorov Reviewed-by: Graeme Gregory --- Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 9 ++++++++- Platform/ARM/JunoPkg/ArmJuno.dsc | 9 +++++++++ Platform/ARM/JunoPkg/ArmJuno.fdf | 6 ++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VE= xpressPkg/ArmVExpress.dsc.inc index 25cdc60737b5b8e6bbc608115db6436278b8026a..8bcb84869c841e4698f2897713b= c5fc2d0af1ce0 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc @@ -153,7 +153,7 @@ [LibraryClasses.common] CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize= dDisplayLib.inf =20 - ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseRepor= tStatusCodeLibNull.inf + ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf =20 [LibraryClasses.common.SEC] ArmPlatformSecExtraActionLib|ArmPlatformPkg/Library/DebugSecExtraActionL= ib/DebugSecExtraActionLib.inf @@ -303,6 +303,11 @@ [PcdsFeatureFlag.common] =20 gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE =20 + ## Indicates if S3 performance data will be supported in ACPI FPDT table. + # TRUE - S3 performance data will be supported in ACPI FPDT table. + # FALSE - S3 performance data will not be supported in ACPI FPDT table. + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwarePerformanceDataTableS3Support|= FALSE + [PcdsFixedAtBuild.common] gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Versatile Express" !ifdef $(FIRMWARE_VER) @@ -353,6 +358,8 @@ [PcdsFixedAtBuild.common] # DEBUG_ERROR 0x80000000 // Error gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F =20 + gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07 + gEmbeddedTokenSpaceGuid.PcdEmbeddedAutomaticBootCommand|"" gEmbeddedTokenSpaceGuid.PcdEmbeddedDefaultTextColor|0x07 gEmbeddedTokenSpaceGuid.PcdEmbeddedMemVariableStoreSize|0x10000 diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJun= o.dsc index 72eab8b5be22a5516b243b2b5e70f6b919854707..df74627a65764ef3eb5488c7288= e55e58959ea57 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.dsc +++ b/Platform/ARM/JunoPkg/ArmJuno.dsc @@ -264,6 +264,15 @@ [Components.common] ArmPkg/Drivers/TimerDxe/TimerDxe.inf ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf =20 + # + # Firmware Performance Data Table (FPDT) + # + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCod= eRouterRuntimeDxe.inf + MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerf= ormanceDxe.inf { + + LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf + } + # # Semi-hosting filesystem # diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf b/Platform/ARM/JunoPkg/ArmJun= o.fdf index e67c703d0ecd112df0e13f703c3903cfb8dffbdc..527e131de5a452ded1b3cb0951d= 86903b4495cae 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.fdf +++ b/Platform/ARM/JunoPkg/ArmJuno.fdf @@ -89,6 +89,12 @@ [FV.FvMain] INF MdeModulePkg/Core/Dxe/DxeMain.inf INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf =20 + # + # Firmware Performance Data Table (FPDT) + # + INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatu= sCodeRouterRuntimeDxe.inf + INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firmware= PerformanceDxe.inf + # # PI DXE Drivers producing Architectural Protocols (EFI Services) # --=20 Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel