2 Platform Hob access interface for multiplatform.
4 Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <MultiPlatformLib.h>
20 Returns the Platform Info of the platform from the HOB.
22 @param PeiServices General purpose services available to every PEIM.
23 @param PlatformInfoHob Pointer to the PLATFORM_INFO_HOB Pointer
25 @retval EFI_SUCCESS The function completed successfully.
26 @retval EFI_NOT_FOUND PlatformInfoHob data doesn't exist, use default instead.
31 IN CONST EFI_PEI_SERVICES
**PeiServices
,
32 OUT EFI_PLATFORM_INFO_HOB
**PlatformInfoHob
35 EFI_PEI_HOB_POINTERS GuidHob
;
38 // Find the PlatformInfo HOB
40 GuidHob
.Raw
= GetHobList ();
41 if (GuidHob
.Raw
== NULL
) {
45 if ((GuidHob
.Raw
= GetNextGuidHob (&gEfiPlatformInfoGuid
, GuidHob
.Raw
)) != NULL
) {
46 *PlatformInfoHob
= GET_GUID_HOB_DATA (GuidHob
.Guid
);
50 // PlatformInfo PEIM should provide this HOB data, if not ASSERT and return error.
52 ASSERT (*PlatformInfoHob
!= NULL
);
53 if (!(*PlatformInfoHob
)) {