From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 17A132122BE44 for ; Wed, 13 Jun 2018 03:00:58 -0700 (PDT) Received: by mail-wm0-x243.google.com with SMTP id v131-v6so4194056wma.1 for ; Wed, 13 Jun 2018 03:00:58 -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:user-agent; bh=kLdmLtFavuU386+z15fn63x+QwjcQt629o2toccNw1w=; b=EsQykw46Xbk6+42Ry84j9YYRYKmPSkHHGKi4BNSc3YW2rKRwgvKOj2ZwgUEsMIJmV2 I8VLLgZ5Nw4lim4bNKxrs+h4nlgJ9uqfhCOuOcqBVTTJKRBMEJBgLZMDbl7rVRdmGufX 5ea6LLr8TwgVn45eFDCZA1bNgzNUoBZU8UD6I= 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:user-agent; bh=kLdmLtFavuU386+z15fn63x+QwjcQt629o2toccNw1w=; b=ja3pVNBVy80JroGsOpN5ayR/hnqX9AgPWzufyvRsyW1EAl6XecHTRy+YmH6zh8G+HT lcCpnVKlktCCMmvOyPk3sKCuqStbaBSa/dROvNs1AqaUDDp1j4rFKG2t2rKWyNpjcIDL x8WhTq3MsiGmQ3Ll+6KT90u21dj8InMWWx/hs1QXgqpNtW57l21R1a8b8tnzcRNhtv4F 8L5HHWJLHAfS5AKlROaDAPF+3vZUfBAlEY25BcVUieSlbSzMHy/2PP+f6ubulVcv3Zr4 QzbStToe6McHdEslb5OpDnk4ORYnimAy3p5mnPYYioSRjphwuGeuHovraslT7zZAB4r+ cylw== X-Gm-Message-State: APt69E2UJfCWMnk0FF7eLwo0/1Cak2yfbZfx5efDqBs6bVGB0uJcC5Qm Z/pjOlZAbkE8sJp9bxz0qoObxg== X-Google-Smtp-Source: ADUXVKKJU1Nf79QLWKmGHXu4usMR+eVbA4d7suOmKb1kjNk9RNW0mmZ8r7WCZyJiQIJpm4D0ioZHog== X-Received: by 2002:a50:a624:: with SMTP id d33-v6mr1918561edc.8.1528884057353; Wed, 13 Jun 2018 03:00:57 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id r10-v6sm1082897edo.77.2018.06.13.03.00.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jun 2018 03:00:56 -0700 (PDT) Date: Wed, 13 Jun 2018 11:00:54 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: "edk2-devel@lists.01.org" Message-ID: <20180613100054.hbevqbfp6myyia5t@bivouac.eciton.net> References: <20180607150818.14393-1-ard.biesheuvel@linaro.org> <20180607150818.14393-3-ard.biesheuvel@linaro.org> <20180612225919.kroissnk2tusdw76@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms 2/2] Silicon/NorFlashSynQuacerLib: describe entire firmware region as FV 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: Wed, 13 Jun 2018 10:00:59 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 13, 2018 at 09:19:01AM +0200, Ard Biesheuvel wrote: > On 13 June 2018 at 00:59, Leif Lindholm wrote: > > On Thu, Jun 07, 2018 at 05:08:18PM +0200, Ard Biesheuvel wrote: > >> In order to allow for more flexibility when updating parts of the > >> firmware via capsule update, expand the description of the code FV > >> to cover the entire 4 MB region at the base of the NOR flash. > >> > >> Contributed-under: TianoCore Contribution Agreement 1.1 > >> Signed-off-by: Ard Biesheuvel > >> --- > >> Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c | 5 +++-- > >> 1 file changed, 3 insertions(+), 2 deletions(-) > >> > >> diff --git a/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c b/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c > >> index 816d8ba33f8c..357082c3d903 100644 > >> --- a/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c > >> +++ b/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c > >> @@ -23,8 +23,9 @@ STATIC NOR_FLASH_DESCRIPTION mNorFlashDevices[] = { > >> { > >> // UEFI code region > >> SYNQUACER_SPI_NOR_BASE, // device base > >> - FixedPcdGet64 (PcdFdBaseAddress), // region base > >> - FixedPcdGet32 (PcdFdSize), // region size > >> + SYNQUACER_SPI_NOR_BASE, // region base > >> + FixedPcdGet32 (PcdFlashNvStorageVariableBase) - > >> + SYNQUACER_SPI_NOR_BASE, // region size > > > > Could you define the size as a macro in Platform/MemoryMap.h? > > > > The memory map currently only contains constant macros. I can add this > expression > > FixedPcdGet32 (PcdFlashNvStorageVariableBase) - SYNQUACER_SPI_NOR_BASE > > somewhere as a #define but I would prefer it to be elsewhere, given > that it is not a SoC constant set in stone. I'm OK with that, but will just throw in the argument that the fact that it being a FixedPcdGet32 of PcdFlashNvStorageVariableBase is kind of set in stone. (And doesn't the Fixed bit make it constant?) Either way, my main interest is in making this struct definition not break my reading flow, so I'm perfectly happy with the #define elsewhere. / Leif