(PS: Repository location: https://github.com/varadgautam/edk2/tree/BeagleBoneBlack/TexasInstrumentsPkg...)
On Wed, Jul 23, 2014 at 5:04 PM, Varad Gautam varadgautam@gmail.com wrote:
Hi, I am working on the BeagleBoneBlack port for EDK2 and am facing an issue with PcdGet(): it always returns `0` no matter what the PCD is set to. However, FixedPcdGet() works fine (I've had to patch edk2 to replace all PcdGet calls with FixedPcdGet to get PrePi working which is a bad idea).
The build report too shows the PCDs being set to their proper values, and so do the AutoGen.i file macros like `const UINT32 _gPcd_FixedAtBuild_PcdFvBaseAddress = 0x80008000U;`
I've come up with two reasons to this,
- Is there a build flag I'm missing to enable PcdGet support?
- `_gPcd_FixedAtBuild_PcdFvBaseAddress` is declared with
`GLOBAL_REMOVE_IF_UNREFERENCED` in AutoGen.c and gets removed before I can use it. This also explains why FixedPcdGet would work, since `_PCD_VALUE_PcdFvBaseAddress` is correctly #defined to be 0x80008000U.
This happens for all fixed-at-build type PCDs. Also, I'm linked to PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf for the buid. What could I try to fix it?
Thanks, Varad