2 Platform Hob access interface for multiplatform.
4 Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #include <MultiPlatformLib.h>
15 Returns the Platform Info of the platform from the HOB.
17 @param PeiServices General purpose services available to every PEIM.
18 @param PlatformInfoHob Pointer to the PLATFORM_INFO_HOB Pointer
20 @retval EFI_SUCCESS The function completed successfully.
21 @retval EFI_NOT_FOUND PlatformInfoHob data doesn't exist, use default instead.
26 IN CONST EFI_PEI_SERVICES
**PeiServices
,
27 OUT EFI_PLATFORM_INFO_HOB
**PlatformInfoHob
30 EFI_PEI_HOB_POINTERS GuidHob
;
33 // Find the PlatformInfo HOB
35 GuidHob
.Raw
= GetHobList ();
36 if (GuidHob
.Raw
== NULL
) {
40 if ((GuidHob
.Raw
= GetNextGuidHob (&gEfiPlatformInfoGuid
, GuidHob
.Raw
)) != NULL
) {
41 *PlatformInfoHob
= GET_GUID_HOB_DATA (GuidHob
.Guid
);
45 // PlatformInfo PEIM should provide this HOB data, if not ASSERT and return error.
47 ASSERT (*PlatformInfoHob
!= NULL
);
48 if (!(*PlatformInfoHob
)) {