From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Evan Lloyd <Evan.Lloyd@arm.com>,
Sami Mujawar <Sami.Mujawar@arm.com>,
Girish Pathak <Girish.Pathak@arm.com>,
Mitch Ishihara <Mitch.Ishihara@arm.com>,
Matteo Carlini <Matteo.Carlini@arm.com>
Subject: Re: [PATCH edk2-platforms 1/3] Platform/ARM: drop unused EmbeddedPkg Pcds
Date: Thu, 8 Feb 2018 17:57:56 +0000 [thread overview]
Message-ID: <CAKv+Gu-B7LNB4XDbNDFhKObfbpYRhq-AjTdKHbWqzL0s_aCSrQ@mail.gmail.com> (raw)
In-Reply-To: <20180208174536.fz3teftgsvk7m35h@bivouac.eciton.net>
On 8 February 2018 at 17:45, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Thu, Feb 08, 2018 at 03:08:19PM +0000, Alexei Fedorov wrote:
>> This patch causes Juno and other ARM platforms to raise an assert during MMU initialisation in ArmConfigureMmu()
>
> Huh...
>
>> (edk2\ArmPkg\Library\ArmMmuLib\AArch64\ArmMmuLibCore.c):
>>
>>
>> ASSERT (TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK ||
>> TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_WRITE_BACK);
>>
>>
>> see debug output:
>>
>> UEFI firmware (version built at 12:01:21 on Feb 8 2018)
>> add-symbol-file n:\edk2\Build\ArmJuno\DEBUG_GCC5\AARCH64\ArmPlatformPkg\PrePi\PeiUniCore\DEBUG\ArmPlatformPrePiUniCore.dll 0xE0000800
>> ASSERT [ArmPlatformPrePiUniCore] n:\edk2\ArmPkg\Library\ArmMmuLib\AArch64\ArmMmuLibCore.c(744): TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK || TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_WRITE_BACK
>>
>> because removal of
>> - gEmbeddedTokenSpaceGuid.PcdCacheEnable|TRUE
>> from ArmVExpress.dsc.inc now makes ArmPlatformGetVirtualMemoryMap () function in
>> \edk2-platforms\Platform\ARM\JunoPkg\Library\ArmJunoLib\ArmJunoMem.c
>>
>> use default FALSE value defined in EmbeddedPkg.dec:
>>
>>
>> [PcdsFeatureFlag.common]
>> gEmbeddedTokenSpaceGuid.PcdCacheEnable|FALSE|BOOLEAN|0x00000042
>>
>>
>> & set CacheAttributes to DDR_ATTRIBUTES_UNCACHED:
>>
>> if (FeaturePcdGet(PcdCacheEnable) == TRUE) {
>> CacheAttributes = DDR_ATTRIBUTES_CACHED;
>> } else {
>> CacheAttributes = DDR_ATTRIBUTES_UNCACHED;
>> }
>
> So. I spent a while scratching my head here over how i didn't spot
> this when I did my final test build before generating the patches.
>
> Turns out, somewhere amongst my rebasing,
> gEmbeddedTokenSpaceGuid.PcdCacheEnable managed to reintroduce itself
> into EmbeddedPkg.dec (I explicitly deleted it).
>
> Since I _knew_ I'd deleted it, and all the platforms still built, I
> didn't bother grepping for it through all of edk2-platforms.
>
> Ho hum.
>
> Well, the fix is trivial - just excise it from all platforms, and turn
> all conditional statements into the unconditional execution of the
> TRUE path. There is no code in public trees that actually does
> anything different initialisation-wise depending on the value of this
> Pcd.
>
> Scream if you disagree.
>
My vote would be to get rid of it entirely. These days, uncached means
non-coherent, which breaks all sorts of assumptions in UEFI itself but
also in Trusted Firmware.
prev parent reply other threads:[~2018-02-08 17:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 17:12 [PATCH edk2-platforms 1/3] Platform/ARM: drop unused EmbeddedPkg Pcds Leif Lindholm
2018-02-06 17:12 ` [PATCH edk2-platforms 2/3] <Platform|Silicon>/Hisilicon: " Leif Lindholm
2018-02-06 17:12 ` [PATCH edk2-platforms 3/3] Silicon/Marvell: " Leif Lindholm
2018-02-06 17:24 ` Ard Biesheuvel
2018-02-06 18:05 ` Leif Lindholm
2018-02-08 15:08 ` [PATCH edk2-platforms 1/3] Platform/ARM: " Alexei Fedorov
2018-02-08 17:45 ` Leif Lindholm
2018-02-08 17:57 ` Ard Biesheuvel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKv+Gu-B7LNB4XDbNDFhKObfbpYRhq-AjTdKHbWqzL0s_aCSrQ@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox