From nobody Fri May 3 01:53:17 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 1525105755586951.5578092192231; Mon, 30 Apr 2018 09:29:15 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5CC22203B8C1E; Mon, 30 Apr 2018 09:29:14 -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 1808C203B8BFE for ; Mon, 30 Apr 2018 09:29:12 -0700 (PDT) Received: from E107992.Emea.Arm.com (e107992.emea.arm.com [10.1.211.7]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id w3UGT5hU020997; Mon, 30 Apr 2018 17:29:05 +0100 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=217.140.96.140; helo=cam-smtp0.cambridge.arm.com; envelope-from=alexei.fedorov@arm.com; receiver=edk2-devel@lists.01.org From: Alexei Fedorov To: edk2-devel@lists.01.org Date: Mon, 30 Apr 2018 17:29:05 +0100 Message-Id: <1525105745-12780-1-git-send-email-alexei.fedorov@arm.com> X-Mailer: git-send-email 2.7.1.windows.1 Subject: [edk2] [PATCH edk2-platforms v1] Platform/ARM: Map Platform Boot Timeout PCD to global NV variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd@arm.com, Arvind Chauhan , Ard.Biesheuvel@linaro.org, Leif.Lindholm@linaro.org, Stephanie.Hughes-Fitt@arm.com, Michael.d.kinney@intel.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 Table 13 of UEFI Specification 2.7A describes Timeout global variable as NV (non-volatile), however gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut is defined in [PcdsFixedAtBuild.common] section of edk2-platforms\Platform\ARM\VExpressPkg\ArmVExpress.dsc.inc. This prevents Timeout value from being persistent across resets and power cycles, see BdsEntry() code in MdeModulePkg\Universal\BdsDxe\BdsEntry.c: // // Initialize L"Timeout" EFI global variable. // BootTimeOut =3D PcdGet16 (PcdPlatformBootTimeOut); This patch fixes the above issue by mapping PcdPlatformBootTimeOut to global NV variable "Timeout": [PcdsDynamicHii.common.DEFAULT] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVari= ableGuid|0x0|10 Change-Id: I8ab8854c0789da206bf821391c67007259e48361 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Alexei Fedorov Reviewed-by: Evan Lloyd Reviewed-by: Ard Biesheuvel --- All the changes can be reviewed at: https://github.com/AlexeiFedorov/edk2-platforms/tree/202_timeout_value_v1 Notes: v1: - Map PcdPlatformBootTimeOut to global NV Timeout variable [Alexei] Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VE= xpressPkg/ArmVExpress.dsc.inc index 7cb47937329efa1944ec4c156e2be995a755ce6f..de201b0c81d020e1e06ee320cf0= f14f186723657 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc @@ -1,5 +1,5 @@ # -# Copyright (c) 2011-2015, ARM Limited. All rights reserved. +# Copyright (c) 2011-2018, 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 @@ -353,8 +353,6 @@ [PcdsFixedAtBuild.common] # List of Device Paths that support BootMonFs gArmBootMonFsTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L"VenHw(E72= 23039-5836-41E1-B542-D7EC736C5E59);VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A72= 4A)" =20 - gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|10 - # RunAxf support via Dynamic Shell Command protocol # We want to use the Shell Libraries but don't want it to initialise # automatically. We initialise the libraries when the command is called = by the @@ -399,6 +397,9 @@ [PcdsFixedAtBuild.common] # gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE =20 +[PcdsDynamicHii.common.DEFAULT] + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVar= iableGuid|0x0|10 + [Components.common] MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel