]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/Library/MultiPlatformLib/PlatformInfoHob.c
Vlv2TbltDevicePkg: fix ASSERT_EFI_ERROR() typos
[mirror_edk2.git] / Vlv2TbltDevicePkg / Library / MultiPlatformLib / PlatformInfoHob.c
CommitLineData
3cbfba02
DW
1/** @file\r
2 Platform Hob access interface for multiplatform.\r
3\r
4 Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
5 \r\r
6 This program and the accompanying materials are licensed and made available under\r\r
7 the terms and conditions of the BSD License that accompanies this distribution. \r\r
8 The full text of the license may be found at \r\r
9 http://opensource.org/licenses/bsd-license.php. \r\r
10 \r\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r
13 \r\r
14\r
15**/\r
16\r
17#include <MultiPlatformLib.h>\r
18\r
19/**\r
20 Returns the Platform Info of the platform from the HOB.\r
21\r
22 @param PeiServices General purpose services available to every PEIM.\r
23 @param PlatformInfoHob Pointer to the PLATFORM_INFO_HOB Pointer\r
24\r
25 @retval EFI_SUCCESS The function completed successfully.\r
26 @retval EFI_NOT_FOUND PlatformInfoHob data doesn't exist, use default instead.\r
27\r
28**/\r
29EFI_STATUS\r
30GetPlatformInfoHob (\r
31 IN CONST EFI_PEI_SERVICES **PeiServices,\r
32 OUT EFI_PLATFORM_INFO_HOB **PlatformInfoHob\r
33 )\r
34{\r
35 EFI_PEI_HOB_POINTERS GuidHob;\r
36\r
37 //\r
38 // Find the PlatformInfo HOB\r
39 //\r
40 GuidHob.Raw = GetHobList ();\r
41 if (GuidHob.Raw == NULL) {\r
42 return EFI_NOT_FOUND;\r
43 }\r
44\r
45 if ((GuidHob.Raw = GetNextGuidHob (&gEfiPlatformInfoGuid, GuidHob.Raw)) != NULL) {\r
46 *PlatformInfoHob = GET_GUID_HOB_DATA (GuidHob.Guid);\r
47 }\r
48\r
49 //\r
50 // PlatformInfo PEIM should provide this HOB data, if not ASSERT and return error.\r
51 //\r
ba53301f 52 ASSERT (*PlatformInfoHob != NULL);\r
3cbfba02
DW
53 if (!(*PlatformInfoHob)) {\r
54 return EFI_NOT_FOUND;\r
55 }\r
56\r
57 return EFI_SUCCESS;\r
58}\r
59\r