On 11/24/15 00:25, Andrew Fish wrote:
> 
>> On Nov 23, 2015, at 2:03 PM, Narinder Dhillon <ndhillo...@gmail.com> wrote:
>>
>> Hi Andrew,
>>
>> I looked at the ArmVirtPkg and did the same before I sent the previous
>> email. I am missing some step that is causing the null package to be
>> picked up. Here are my changes, I think I covered most but still
>> missing something.
> 
> The last [LibraryClasses] statement that best matches you module type
> should win. You could double check you don't have more than one
> entry. The < LibraryClasses > overrides on a per driver basis.
> 
> You can add a flag to the build command to look at a log of the
> build. So add -y build.log (or --report-file=build.log). It will show
> what library instances got picked for the driver and what PCD values
> that the driver is using.

The report file is a powerful tool; I think --report-file=... should be
part of everyone's build scripts.

Thanks
Laszlo


> 
> Thanks,
> 
> Andrew Fish
> 
>> Thanks for your help,
>>
>> ----------------------------------------------------------------------------------------------
>> in *.dsc.inc file:
>>
>>  #
>>  # Support dynamic PCD
>>  #
>>  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
>>
>> [LibraryClasses.common.SEC]
>>  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
>>
>> [LibraryClasses.common.PEI_CORE]
>>  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
>>
>> [LibraryClasses.common.PEIM]
>>  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
>>
>> ------------------------------------------------------------------------------------------------------
>> in *.dsc
>>
>>  ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf {
>>    <LibraryClasses>
>>      
>> ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Pei/PeiArmPlatformGlobalVariableLib.inf
>>  }
>>  MdeModulePkg/Core/Pei/PeiMain.inf
>>  MdeModulePkg/Universal/PCD/Pei/Pcd.inf
>>
>>
>>  MdeModulePkg/Core/Dxe/DxeMain.inf {
>>    <LibraryClasses>
>>      
>> NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
>>  }
>>  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>
>> ------------------------------------------------------------------------------------------------------------
>> in *.fdf
>>
>>  APRIORI PEI {
>>    INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
>>  }
>>
>> !if $(EDK2_SKIP_PEICORE) == 1
>>  INF ArmPlatformPkg/PrePi/PeiMPCore.inf
>> !else
>>  INF ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
>>  INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
>>
>>
>>  APRIORI DXE {
>>    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>  }
>>
>>  INF MdeModulePkg/Core/Dxe/DxeMain.inf
>>  INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>
>>
>>
>> On Fri, Nov 20, 2015 at 5:27 PM, Andrew Fish <af...@apple.com> wrote:
>>>
>>>> On Nov 20, 2015, at 4:52 PM, Narinder Dhillon <ndhillo...@gmail.com> wrote:
>>>>
>>>> Hi All,
>>>>
>>>> Is it possible to set a dynamic PCD variable in PEI phase and get it
>>>> in DXE phase ?
>>>>
>>>
>>> Yes.
>>>
>>>> I am having trouble setting it. Log below.
>>>>
>>>> Thanx,
>>>>
>>>> add-symbol-file
>>>> /projects/cps-sw-ext1/ndhillon/uefi_cleanup/firmware/uefi/Build/DEBUG_GCC49/AARCH64/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore/DEBUG/ArmPlatformPrePeiCore.dll
>>>> 0xC0001800
>>>> add-symbol-file
>>>> /projects/cps-sw-ext1/ndhillon/uefi_cleanup/firmware/uefi/Build/DEBUG_GCC49/AARCH64/MdeModulePkg/Core/Pei/PeiMain/DEBUG/PeiCore.dll
>>>> 0xC0016A90
>>>> Platform: Nodes:0 Cores:176 Threads:1
>>>> ASSERT 
>>>> /projects/cps-sw-ext1/ndhillon/uefi_cleanup/firmware/uefi/MdePkg/Library/BasePcdLibNull/PcdLib.c(470):
>>>> ((BOOLEAN)(0==1))
>>>
>>> You are using the wrong PcdLib instance.
>>>
>>> The BasePcdLibNull instance will ASSERT on any calls.
>>>
>>> You want to use the instances of the library that call the PPI/Protocol.
>>>
>>> https://github.com/tianocore/edk2/tree/master/MdePkg/Library/PeiPcdLib
>>> https://github.com/tianocore/edk2/tree/master/MdePkg/Library/DxePcdLib
>>>
>>> Thanks,
>>>
>>> Andrew Fish
>>>
>>>> _______________________________________________
>>>> edk2-devel mailing list
>>>> edk2-devel@lists.01.org
>>>> https://lists.01.org/mailman/listinfo/edk2-devel
>>>
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to