On Jul 23, 2014, at 12:07 PM, Varad Gautam <varadgautam@gmail.com> wrote:

On Thu, Jul 24, 2014 at 12:20 AM, Andrew Fish <afish@apple.com> wrote:

Sorry so I’m confused. What is the issue you are seeing? Why is PcdGet32() returning 0 and not the fixed PCD value?

Thanks,

Andrew Fish

The problem is that even though the PCDs are set to right value in the
AutoGen.h files
and in the Build Report, PcdGet always returns 0 whereas FixedPcdGet works.


Is it the same in the global area and under the driver? 

What is the value for _PCD_GET_MODE_32_##TokenName in the autogen of the module where the 0 is returned? Is it calling LibPcdGet32() or does it point to the global? 

#define PcdGet32(TokenName)                 _PCD_GET_MODE_32_##TokenName

It could be due to what Laszlo suggested earlier, but I already am
building for DEBUG.
ASSERT() acts as a no-op for me because PcdGet at [1] simply returns 0 and
DebugAssertEnabled always fails!


I don’t understand how that statement matches this statement you made: “The execution never comes to calling LibPcdGet32(), for either BasePcdLibNull
or PcdLib.”



[1] https://github.com/tianocore/edk2/blob/master/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c#L200

Thanks,
Varad