From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web12.2524.1592379555178876894 for ; Wed, 17 Jun 2020 00:39:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=p10jpYwO; spf=pass (domain: linaro.org, ip: 209.85.221.66, mailfrom: graeme.gregory@linaro.org) Received: by mail-wr1-f66.google.com with SMTP id r7so1218985wro.1 for ; Wed, 17 Jun 2020 00:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dz75zkUHc+M3HBp+n6rN5ZNLwZNdBhWcXJiUTSKpY6U=; b=p10jpYwOw8bSaQfRptTJrZA7r6FraFVPv5hKn5knMyCQbHTF47wweTVa4pccHr1boR msEmnT8hjLZSB9Y7xkYIqaSrrNKX4HDCnFqGTcTb5lnUAz1CWfavRtrwjKnps23g5S59 tt1FEEtGZwHBwgnDfyI+G6xbyvAk575y6AxOAxwR4HO5yVXIugvz1QBSowATeENnlZO0 ueHzsLXa3xJHUjmHrEHRBszy3Jsd8CKrZzwTiZFqN6xSExTpEZH0asnC9jUakq0G8jv6 lGns79gH0y+b+SsOzpPfSxb32ezeKME72lfknBNk97/2IhWdRxaDib41h1G/h2xI95FH zomg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dz75zkUHc+M3HBp+n6rN5ZNLwZNdBhWcXJiUTSKpY6U=; b=f/yAZqaiC0v6DiRDKqv1ZoXx15dH64WnPbIriD6RX0MU9qReBtBPkXKyxGd19G01co lvOtCqQeUKf8JzC4DeYixfnuzQFTIBwQiLScdsyL7kdd/QeTa5StWe2+TePZj7AOLUyJ Qc/9wzNZBQo70xbJGJIvJbzC3H99SY+jPJbB7U7J/36gFx3JdWGnJ+z5bq/4LdmDVK3S Sfg9vJkbijDj3eCYD2KifHf27VoHcFa7mx5zpWxnTp428NfaqFgKnrGCmuG4W63aBox1 bmRCg1OvtvIL4XgI0LtHORXVcHhJ14KljwC9iRHg+d/JkbtRzZq/vUSknjdJ8sGhTBSN HbKw== X-Gm-Message-State: AOAM532Hx0nBI8KE/Vrw38HcJy8n1quzN35tkBmQZrzO+a9amIo0jC5M soRUHVUvLzKGf+vutoOFSyzRDw== X-Google-Smtp-Source: ABdhPJxZVmkYG57YXkFWskCE85EEMiUzJrzrDFtsE5dN6HkIW8hXkGJ2ZKPm/ufOSQdqo+TysmW63Q== X-Received: by 2002:adf:eacc:: with SMTP id o12mr7264944wrn.139.1592379553580; Wed, 17 Jun 2020 00:39:13 -0700 (PDT) Return-Path: Received: from localhost ([2a02:8010:64d6::1c56]) by smtp.gmail.com with ESMTPSA id w17sm33766882wra.71.2020.06.17.00.39.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 00:39:12 -0700 (PDT) Date: Wed, 17 Jun 2020 08:39:11 +0100 From: "Graeme Gregory" To: Tanmay Jagdale Cc: leif@nuviainc.com, ard.biesheuvel@arm.com, devel@edk2.groups.io, rad@semihalf.com Subject: Re: Silicon/SbsaQemu: Fix NOR flash RegionBaseAddress Message-ID: <20200617073911.GD7491@xora-acepc> References: <20200616192913.56882-1-tanmay.jagdale@linaro.org> MIME-Version: 1.0 In-Reply-To: <20200616192913.56882-1-tanmay.jagdale@linaro.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 17, 2020 at 12:59:13AM +0530, Tanmay Jagdale wrote: > The EFI_FIMRWARE_VOLUME_HEADER is present at an offset in the > NOR flash of Sbsa QEMU model. Use the right RegionBaseAddress > so that the EFI firmware volume header can be found correctly. > > Signed-off-by: Tanmay Jagdale This fixes the problem for me, I have tested setting variables from efi shell and from debian guest OS and they persist correctly now. Tested-by: Graeme Gregory > --- > .../SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c | 2 +- > .../Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c > index e7bb626596..0946327cb5 100644 > --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c > +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c > @@ -23,7 +23,7 @@ NorFlashPlatformInitialization ( > NOR_FLASH_DESCRIPTION mNorFlashDevice = > { > FixedPcdGet64(PcdFdBaseAddress), > - FixedPcdGet64(PcdFdBaseAddress), > + FixedPcdGet64(PcdFlashNvStorageVariableBase), > FixedPcdGet32(PcdFdSize), > QEMU_NOR_BLOCK_SIZE > }; > diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf > index 82712c8901..f2ba41e1df 100644 > --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf > +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf > @@ -23,7 +23,9 @@ > ArmPlatformPkg/ArmPlatformPkg.dec > ArmPkg/ArmPkg.dec > MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > > [FixedPcd] > gArmTokenSpaceGuid.PcdFdBaseAddress > gArmTokenSpaceGuid.PcdFdSize > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase > -- > 2.27.0 >