The same problem appears when I build BeagleBoardPkg:
AutoGen.* contains proper PCDs, so does the build report. Yet, objdump
shows PcdGet calls to return 0.
-objdump snippets-
ArmPlatformPrePiUnicore.lib:
FixedPcdGet32 (PcdFdBaseAddress);
  5e:    f04f 2080     mov.w    r0, #2147516416    ; 0x80008000
  62:    f7ff fffe     bl    0 <PrePiMain>

...
 StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize);
  bc:    4b6e          ldr    r3, [pc, #440]    ; (278 <PrePiMain+0x278>)
  be:    681b          ldr    r3, [r3, #0]
  c0:    9325          str    r3, [sp, #148]    ; 0x94


I have tried using a different toolchain :). What else is possible? I am looking into
the BaseTools build process. Could someone please verify this for BeagleBoardPkg?


Thanks,
Varad


On Fri, Jul 25, 2014 at 2:24 PM, Varad Gautam <varadgautam@gmail.com> wrote:
On Thu, Jul 24, 2014 at 9:50 PM, Andrew Fish <afish@apple.com> wrote:
> AutoGen.i? Is this code assembly? If so you should look at the *.iii as that
> is the post processed version that gets sent to assembler. There is a tool
> to trim out code that is not compatible with the assembler, so it  would be
> good to check that something is not going on in that step.

Yeah, AutoGen.i contains assembly. The .iii files too point to the global.

> Are the globals in the image? What value do they have? You should be able to
> dump PE/COFF or ELF on your build system and find out.

This is interesting, the objdump contains 0 for PcdGet at all places.

On Thu, Jul 24, 2014 at 10:06 PM, Laszlo Ersek <lersek@redhat.com> wrote:
> (Maybe side issue, maybe relevant:)
>
> Interesting. I tried to use fixed PCDs in ASL source code, *after*
> BaseTools had reportedly grown support for that. Unfortunately, my
> attempt failed, and I got no effective advice after I reported it.
>
> http://thread.gmane.org/gmane.comp.bios.tianocore.devel/7416/focus=7587
>
> Perhaps this is a basetools problem then?
>
> Thanks
> Laszlo

The AutoGen.h contains the correct PCD values, so basetools is able to parse
and append PCDs properly. I'll try to dig deeper into it.

Does `PcdPeiGlobalVariableSize` play any role during build?

Thanks,
Varad