(I cannot condemn RELEASE builds
enough.) Namely, you call
UINT32
EFIAPI
LibPcdGet32 (
IN UINTN TokenNumber
)
{
ASSERT (FALSE);
return 0;
}
from "MdePkg/Library/BasePcdLibNull/PcdLib.c", and since you build for
RELEASE, the ASSERT() is a no-op. In a DEBUG build you'd have caught
this immediately with a failed assertion: the Null implementation of
PcdLib doesn't allow you to actually access PCDs.
Library instances that usably resolve the PcdLib library class are:
$ git grep -l 'LIBRARY_CLASS *= *PcdLib' -- '*.inf'
EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf
MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
MdePkg/Library/DxePcdLib/DxePcdLib.inf
MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
In PEIMs, you need the fourth; in DXE & UEFI drivers, you need the third.
However, this is not the entire picture yet, because these libraries
delegate the work to a PPI (in PEI) and to a protocol (in DXE) that are
provided by dedicated drivers, respectively:
- MdeModulePkg/Universal/PCD/Pei/Pcd.inf
- MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
You should add these drivers to the corresponding (ie. PEI vs. DXE)
APRIORI files of the firmware volumes that your FDF file defines, so
that any driver loaded / dispatched later can use their PCD services
(through the above-mentioned library instances). Refer to
OvmfPkg/OvmfPkgX64.fdf for examples.
Thanks
Laszlo
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel