From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::241; helo=mail-io0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 849102035D6C8 for ; Tue, 1 May 2018 04:49:00 -0700 (PDT) Received: by mail-io0-x241.google.com with SMTP id f21-v6so13357791iob.13 for ; Tue, 01 May 2018 04:49:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=U8CyYX0n+ltvgJFkws5d7Gccf3rFcdiwqmN15f/yRxs=; b=N1Ogk5UqdAWyM7PSik7G7oOUTIfMWgZPdDB3P3tsTHJ70OL9OfXYHWHwP5awS4Mf+7 BSfhAssTQIbzx6rTGmLDPcyfbj+ujQO/aR85CpEPx9BR3HtjxroGP9oa50l+1jbAW/GD +eSULAstcf8Ams/o31Yd+GFp0sm/yS1GonjK0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=U8CyYX0n+ltvgJFkws5d7Gccf3rFcdiwqmN15f/yRxs=; b=Zb9yG21qZZ9rEKMEUdasLMspkP7XIBi9rqR/7GdfE3KXkCp5TyfDtY5ex7q0jAnKPg M+6Pv0PHukIL0ik43CUHEYcyRVLjt0CZZLmirBqD48CGiqzdKmsQZqSRQq0FpMbM0nvR k5/d0mwsJ/G6qb9amaMGEpj0ikjwsncF1s21z72s1cJUZoNlIT4N0H8WwwRsEu9jsOHM yAQm7fpuCPaAvmvSdweX0d8kkG37bCmjt5E+QZLkMlW7s9dyiUARvqCpA8mk2GPsPLsq 5Gz2+XKJXvN7/TwUDhLN6aICqGAxwhW9dnPOhC6ZI2H9krEZ52UxfJyPqJuwGrOETkzt Wd3w== X-Gm-Message-State: ALQs6tBjkeWF+mm48gpTydX1X6ls4uOi3ZTvtxwre4AsqUaTbfQhPoLs ag26EShaF8nbelF5Wjl2iMd9gnKURfa+VINmONXISQ== X-Google-Smtp-Source: AB8JxZpHygOIC6NAqVmhAXTLzlr0p0rqr5VEN9PxKWRWbRSi/gNFvNRNwhNcjEbZzt0qNiCYEZnspVsTUSBVQBPOhAs= X-Received: by 2002:a6b:545:: with SMTP id 66-v6mr16032235iof.173.1525175338917; Tue, 01 May 2018 04:48:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.187.134 with HTTP; Tue, 1 May 2018 04:48:58 -0700 (PDT) In-Reply-To: <1525105745-12780-1-git-send-email-alexei.fedorov@arm.com> References: <1525105745-12780-1-git-send-email-alexei.fedorov@arm.com> From: Ard Biesheuvel Date: Tue, 1 May 2018 13:48:58 +0200 Message-ID: To: Alexei Fedorov Cc: "edk2-devel@lists.01.org" , Arvind Chauhan , Daniil Egranov , Thomas Panakamattam Abraham , Leif Lindholm , "Kinney, Michael D" , Matteo Carlini , Stephanie Hughes-Fitt , nd , Evan Lloyd , Sami Mujawar Subject: Re: [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: , X-List-Received-Date: Tue, 01 May 2018 11:49:00 -0000 Content-Type: text/plain; charset="UTF-8" On 30 April 2018 at 18:29, Alexei Fedorov wrote: > 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 = PcdGet16 (PcdPlatformBootTimeOut); > > This patch fixes the above issue by mapping PcdPlatformBootTimeOut > to global NV variable "Timeout": > [PcdsDynamicHii.common.DEFAULT] > gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|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 Pushed as ada17bc975be79620c126ae9a856e45c866f5701 Thanks! > --- > 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/VExpressPkg/ArmVExpress.dsc.inc > index 7cb47937329efa1944ec4c156e2be995a755ce6f..de201b0c81d020e1e06ee320cf0f14f186723657 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 BSD License > @@ -353,8 +353,6 @@ [PcdsFixedAtBuild.common] > # List of Device Paths that support BootMonFs > gArmBootMonFsTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59);VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)" > > - 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 > > +[PcdsDynamicHii.common.DEFAULT] > + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|10 > + > [Components.common] > MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { > > -- > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' > >