Nevermind, I re-read through the FDF spec and I found the answer:  A PCD's 
value is positional in the FDF file.  Last one set should be the value.



2.2.7 PCD Names

Unique PCDs are identified using the format to identify the named PCD:

The PCD's Name (PcdName) is defined as PCD Token Space Guid C name and the PCD 
C name - separated by a period "." character. PCD C names are used in C code 
and must follow the C variable name rules.
A PCD's values are positional with in the FDF file, and may be set by either 
the automatic setting grammar defined in this specification, or through SET 
statements. Once the PCD's value has been defined, it may be used anywhere 
within the FDF file; they are not limited to sections that they are defined in. 
PCD values may be absolute, values defined by macros, or expressions. 
PcdTokenSpaceGuidCName.PcdCName

Garrett Kirkendall   [Description: Description: Description: purple]
SMTS Firmware Engineer | AMD Technology & Engineering
7171 Southwest Parkway, Austin, TX 78735 USA
[Description: Description: Description: image004]   
facebook<https://www.facebook.com/AMD>  |  amd.com<http://www.amd.com/>

From: Kirkendall, Garrett
Sent: Tuesday, April 01, 2014 10:46 AM
To: edk2-devel@lists.sourceforge.net; 
edk2-buildtools-de...@lists.sourceforge.net
Subject: Crazy FDF file PCD question.

I'm trying to contemplate what happens if I have multiple [FD] sections in my 
FDF file and they both assign the same Fixed PCD.  What value gets built into 
the code.  I haven't studied through the build tools code, but I assume one of 
them finally makes it into an AutoGen.c/AutoGen.h.  This would make one of the 
FD sections have the correct address, and one will have the wrong address.

Example:
[FD.MAIN1]
  BaseAddress = 0x00000000|gSomeTokenSpaceGuid.PcdFixedSomeFdBaseAddress
...

[FD.MAIN2]
  BaseAddress = 0x00100000|gSomeTokenSpaceGuid.PcdFixedSomeFdBaseAddress
...

Garrett Kirkendall   [Description: Description: Description: purple]
SMTS Firmware Engineer | AMD Technology & Engineering
7171 Southwest Parkway, Austin, TX 78735 USA
[Description: Description: Description: image004]   
facebook<https://www.facebook.com/AMD>  |  amd.com<http://www.amd.com/>

<<inline: image003.png>>

<<inline: image004.png>>

<<inline: image005.png>>

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to