So...that means that you cannot specify in the INF file that the PcdType
should be Dynamic?
-chip


On Thu, Aug 29, 2013 at 3:07 PM, Andrew Fish <[email protected]> wrote:

>
> On Aug 29, 2013, at 2:41 PM, Chip Ueltschey <[email protected]> wrote:
>
> Thanks,
>
> I am still struggling with what the right thing is, though.
> It seems to me that if the driver is the one to use the PCD in a way that
> requires that this PCD resolve to a Dynamic type (not a FixedAtBuild type).
>
>
> The INF file needs to describe the form that is used in the code:
> FixedPcdGet8() [FixedPcd]
> PatchPcdGet8() [PatchPcd]
> PcdGet8() [Pcd]
> PcdGetEx8() [PcdEx]
>
> [Pcd] is the recommended usage as it is more flexible.
>
> And if the DEC file provided options for the PCD,
> i.e. [PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic] like is
> referenced earlier.
> Then the INF file ought to be the one to restrict the possible PcdType for
> this PCD.
>
>
> It does
>
> But in the INF file this PCD is in a [Pcd] section, which in the INF
> specification is the correct section for Dynamic types, but in this case
> the PcdType is not being resovled to PcdsDynamic but rather to
> PcdsFixedAtBuild.
>
>
> Sorry this is all my fault. Bad names, well overloaded names. The Dynamic
> form in the module does not mean Dynamic must be used. So a better name
> would have been something like PcdAuto. Dynamic in the module [Pcd] means
> the AutoGen.c/AutoGen.h get to decide the form, and this choice is made in
> the DSC file.
>
>
> In this case there was no reference to the PCD in a DSC file, but
> shouldn't the type get resolved by the INF, since it used a [Pcd] section?
>
>
> -chip
>
>
>
> On Wed, Aug 28, 2013 at 8:21 PM, Zeng, Star <[email protected]> wrote:
>
>>  Hi Chip,****
>>
>> ** **
>>
>> FixedAtBuild PCD: ****
>>
>> The value of this PCD type is determined****
>>
>> at build time and is stored in the code section of a module’s PE image.**
>> **
>>
>> ** **
>>
>> Yes, the PCD is required not to be configured as FixedAtBuild, if a
>> driver that wants to do a set on the PCD.****
>>
>> ** **
>>
>> ** **
>>
>> Thanks.****
>>
>> Star****
>>
>> *From:* Chip Ueltschey [mailto:[email protected]]
>> *Sent:* Thursday, August 29, 2013 10:42 AM
>> *To:* [email protected]
>> *Subject:* Re: [edk2] Mixed Section Types for PCD****
>>
>> ** **
>>
>> Ok, interesting, thanks.****
>>
>> ** **
>>
>> What if I have a driver that wants to do a set on the PCD.****
>>
>> The driver can't do that if the build is configured to use the PCD as
>> FixedAtBuild.****
>>
>> Is there any way to detect this in the C code, or does this driver just
>> require that the PCD not be configured as FixedAtBuild?****
>>
>> ** **
>>
>> -chip****
>>
>> ** **
>>
>> On Wed, Aug 28, 2013 at 5:51 PM, Andrew Fish <[email protected]> wrote:****
>>
>>  ** **
>>
>> ** **
>>
>> On Aug 28, 2013, at 5:31 PM, Tim Lewis <[email protected]> wrote:****
>>
>>
>>
>> ****
>>
>>  Chip –****
>>
>>  ****
>>
>> It is legal. The types that are listed in the .dec file limit the types
>> that a .dsc file can use. If none is specified in the .dsc file, then the
>> first one will be used by default. So, for example, you may want to allow a
>> .dsc file to support either Dynamic, DynamicEx or FixedAtBuild. So the .dec
>> file lists all three. But if the .dsc file tries to use Patchable, it will
>> fail.****
>>
>>  ****
>>
>> ** **
>>
>> This is the best way to think about it. Lets say I'm building for a ATM
>> that does not have setup. In my DSC file I'll set a lot of the PCDs to
>> FixedAtBuild. But some PC OEM that supports over-clockers may want to to
>> make a large number of parameters configurable in setup. The concept of PCD
>> is the driver has these generic hook points for configuration, but the
>> platform builder gets to chose what knobs get exposed. In this example the
>> CPU and Chipset drivers code does not have to change between the zero setup
>> platform and the uber setup platform. That is the concept behind allowing
>> the platform to chose the type of the PCD.  ****
>>
>>
>>
>> ****
>>
>>  So Set will not work on FixedAtBuild, right, because it is defined as
>> CONST. So you need to change the type in the .dsc file to Dynamic or
>> DynamicEx or Patchable (actually, I’m not sure if Patchable generates a
>> CONST or not)****
>>
>>  ****
>>
>> ** **
>>
>> Yes it does but Patchable is for a binary and the patching is done by a
>> build tool. ****
>>
>> ** **
>>
>> Thanks,****
>>
>> ** **
>>
>> Andrew Fish****
>>
>>
>>
>> ****
>>
>>   Tim****
>>
>>  ****
>>
>> *From:* Chip Ueltschey [mailto:[email protected]]
>> *Sent:* Wednesday, August 28, 2013 5:26 PM
>> *To:* [email protected]
>> *Subject:* [edk2] Mixed Section Types for PCD****
>>
>>  ****
>>
>> Is it legal to do this in a DEC file?****
>>
>> [PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]****
>>
>>  ****
>>
>> That seems suspect since a PcdsFixedAtBuild type will not allow set, but
>> a PcdsDynamic will allow set.****
>>
>> What is AutoGen supposed to do?****
>>
>> Currently, I have an error where the C code wants to set a PCD in this
>> section.****
>>
>>  ****
>>
>> Thanks,****
>>
>> -chip****
>>
>>
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft
>> technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk_______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel****
>>
>> ** **
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft
>> technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>> _______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel****
>>
>> ** **
>>
>>
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft
>> technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>> _______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to