]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointer.c
ArmPlatformPkg: Introduce ArmPlatformGlobalVariableLib
[mirror_edk2.git] / ArmPlatformPkg / Library / PrePiHobListPointerLib / PrePiHobListPointer.c
CommitLineData
3c4b742c 1/** @file\r
2*\r
3* Copyright (c) 2011, ARM Limited. All rights reserved.\r
4* \r
5* This program and the accompanying materials \r
6* are licensed and made available under the terms and conditions of the BSD License \r
7* which accompanies this distribution. The full text of the license may be found at \r
8* http://opensource.org/licenses/bsd-license.php \r
9*\r
10* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12*\r
13**/\r
14\r
15#include <PiPei.h>\r
8fc38a3f 16#include <Library/ArmPlatformGlobalVariableLib.h>\r
3c4b742c 17#include <Library/PrePiHobListPointerLib.h>\r
18#include <Library/DebugLib.h>\r
19#include <Library/PcdLib.h>\r
20\r
3c4b742c 21/**\r
22 Returns the pointer to the HOB list.\r
23\r
24 This function returns the pointer to first HOB in the list.\r
25\r
26 @return The pointer to the HOB list.\r
27\r
28**/\r
29VOID *\r
30EFIAPI\r
31PrePeiGetHobList (\r
32 VOID\r
33 )\r
34{\r
8fc38a3f 35 VOID* HobList;\r
36\r
37 ArmPlatformGetGlobalVariable (PcdGet32 (PcdHobListPtrGlobalOffset), sizeof(VOID*), &HobList);\r
38\r
39 return HobList;\r
3c4b742c 40}\r
41\r
42\r
43\r
44/**\r
45 Updates the pointer to the HOB list.\r
46\r
47 @param HobList Hob list pointer to store\r
48 \r
49**/\r
50EFI_STATUS\r
51EFIAPI\r
52PrePeiSetHobList (\r
53 IN VOID *HobList\r
54 )\r
55{\r
8fc38a3f 56 ArmPlatformSetGlobalVariable (PcdGet32 (PcdHobListPtrGlobalOffset), sizeof(VOID*), &HobList);\r
e1808603 57\r
58 return EFI_SUCCESS;\r
3c4b742c 59}\r
e1808603 60\r