public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Michael Zimmermann <sigmaepsilon92@gmail.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@ml01.01.org>,
	Laszlo Ersek <lersek@redhat.com>,
	Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: visibility pf PcdSet
Date: Tue, 21 Mar 2017 02:23:02 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6F2EE7@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <CAKv+Gu8ZD6UQQ8R_yjyRWMZYiCqv=FVh+RqyK=Lr6xHt+n=SvQ@mail.gmail.com>

Yes. Feature, FixedAtBuild and PatchableInModule PCD are module level; Dyanmic and DynamicEx are platform level. 
If you have case to share the data between the different modules, you can configure PCD as Dynamic PCD. 

Ard: do you meet with the issue on SetPcd() with dynamic PCD?  

Thanks
>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard
>Biesheuvel
>Sent: Tuesday, March 21, 2017 2:20 AM
>To: Michael Zimmermann <sigmaepsilon92@gmail.com>
>Cc: edk2-devel@lists.01.org <edk2-devel@ml01.01.org>; Gao, Liming
><liming.gao@intel.com>; Laszlo Ersek <lersek@redhat.com>; Leif Lindholm
><leif.lindholm@linaro.org>
>Subject: Re: [edk2] visibility pf PcdSet
>
>On 20 March 2017 at 16:06, Michael Zimmermann
><sigmaepsilon92@gmail.com> wrote:
>> Do I understand correctly, that a PcdSet on a 'PcdsPatchableInModule'
>> is only visible to the current module?(SEC, driver, application, ...)
>
>Yes.
>
>> Because I've tested this and a PcdSet on
>> gArmTokenSpaceGuid.PcdSystemMemoryBase inisde PrePi is not visible
>> inside a DXE_DRIVER - which means that for everyone else the value is
>> still 0x0.
>>
>
>Indeed. The relocatable PrePi needs a patchable PCD because it assigns
>the value really early, in assembly code. But PrePi is a bit peculiar
>as well, and I am pretty use SetPcd() on dynamic PCDs would not work
>there either.
>
>> If this is the case and I don't have some platform bug, then there is
>> probably a bug in ArmVirtPkg's HighMemDxe where this Pcd is used in a
>> DXE_DRIVER:
>>
>https://github.com/tianocore/edk2/blob/76874be3d411bf8daac051718e20932
>e0bf97d70/ArmVirtPkg/HighMemDxe/HighMemDxe.c#L70
>> It doesn't cause anything bad but it would show 'Failed to add System
>> RAM @ START - END (Access Denied)' after calling AddMemorySpace for
>> memory which has already been registered.
>>
>
>Ah yes, well spotted. To be honest, PrePi is a bit of a hack, and I
>actually recommend against it for new ports. However, for a self
>relocating image (which I think you need for your application), PrePi
>is really the only way to go.
>
>So the best way to pass information from PrePi to DXE is using HOBs.
>Actually, it might be best for you to clone HighmemDxe if you need it,
>and use a HOB instead.
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel


  parent reply	other threads:[~2017-03-21  2:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 16:06 visibility pf PcdSet Michael Zimmermann
2017-03-20 16:17 ` Laszlo Ersek
2017-03-20 18:19 ` Ard Biesheuvel
2017-03-20 18:37   ` Michael Zimmermann
2017-03-21  2:23   ` Gao, Liming [this message]
2017-03-21  7:09     ` Ard Biesheuvel

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=4A89E2EF3DFEDB4C8BFDE51014F606A14D6F2EE7@shsmsx102.ccr.corp.intel.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