Laszlo:

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Laszlo 
> Ersek
> Sent: Friday, August 16, 2019 11:18 PM
> To: Gao, Liming <liming....@intel.com>; devel@edk2.groups.io; Kinney, Michael 
> D <michael.d.kin...@intel.com>
> Cc: Mike Turner <mike...@microsoft.com>; Wang, Jian J 
> <jian.j.w...@intel.com>; Wu, Hao A <hao.a...@intel.com>; Bi, Dandan
> <dandan...@intel.com>
> Subject: Re: [edk2-devel] [Patch] MdeModulePkg DxeCore: Fix for missing MAT 
> update
> 
> On 08/14/19 17:55, Gao, Liming wrote:
> 
> > If Platform PEIM doesn't build HOB, DxeIpl will not build HOB,
> 
> My reading of the code is the opposite. If the platform PEIM does not build 
> the HOB, then the DXE IPL PEIM will attempt to build the HOB,
> from the UEFI variable.
> 
> At commit caa7d3a896f6, in file "MdeModulePkg/Core/DxeIplPeim/DxeLoad.c", 
> function DxeLoadCore(), we have:
> 
>    363    if (GetFirstGuidHob ((CONST EFI_GUID 
> *)&gEfiMemoryTypeInformationGuid) == NULL) {
>    364      //
>    365      // Don't build GuidHob if GuidHob has been installed.
>    366      //
>    367      Status = PeiServicesLocatePpi (
>    368                 &gEfiPeiReadOnlyVariable2PpiGuid,
>    369                 0,
>    370                 NULL,
>    371                 (VOID **)&Variable
>    372                 );
>    373      if (!EFI_ERROR (Status)) {
>    374        DataSize = sizeof (MemoryData);
>    375        Status = Variable->GetVariable (
>    376                             Variable,
>    377                             EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,
>    378                             &gEfiMemoryTypeInformationGuid,
>    379                             NULL,
>    380                             &DataSize,
>    381                             &MemoryData
>    382                             );
>    383        if (!EFI_ERROR (Status) && 
> ValidateMemoryTypeInfoVariable(MemoryData, DataSize)) {

Only when this variable exists, Hob will be built. But, if no PEIM builds Hob, 
BDS will not set the variable. 
So, there is still no HOB.

Thanks
Liming
>    384          //
>    385          // Build the GUID'd HOB for DXE
>    386          //
>    387          BuildGuidDataHob (
>    388            &gEfiMemoryTypeInformationGuid,
>    389            MemoryData,
>    390            DataSize
>    391            );
>    392        }
>    393      }
>    394    }
> 
> Thanks
> Laszlo
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45821): https://edk2.groups.io/g/devel/message/45821
Mute This Topic: https://groups.io/mt/32821535/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to