]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
24e25d11 | 2 | Public include file for the HOB Library\r |
878ddf1f | 3 | \r |
24e25d11 | 4 | Copyright (c) 2006, Intel Corporation \r |
5 | All rights reserved. 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 | |
878ddf1f | 9 | \r |
24e25d11 | 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 | |
878ddf1f | 12 | \r |
24e25d11 | 13 | Module Name: HobLib.h\r |
878ddf1f | 14 | \r |
15 | **/\r | |
16 | \r | |
17 | #ifndef __HOB_LIB_H__\r | |
18 | #define __HOB_LIB_H__\r | |
19 | \r | |
20 | /**\r | |
5f10fa01 | 21 | Returns the pointer to the HOB list.\r |
878ddf1f | 22 | \r |
5f10fa01 | 23 | This function returns the pointer to first HOB in the list.\r |
24 | \r | |
25 | @return The pointer to the HOB list.\r | |
878ddf1f | 26 | \r |
27 | **/\r | |
28 | VOID *\r | |
29 | EFIAPI\r | |
30 | GetHobList (\r | |
31 | VOID\r | |
32 | )\r | |
33 | ;\r | |
34 | \r | |
35 | /**\r | |
5f10fa01 | 36 | Returns the next instance of a HOB type from the starting HOB.\r |
37 | \r | |
38 | This function searches the first instance of a HOB type from the starting HOB pointer. \r | |
39 | If there does not exist such HOB type from the starting HOB pointer, it will return NULL.\r | |
40 | In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer\r | |
41 | unconditionally: it returns HobStart back if HobStart itself meets the requirement;\r | |
42 | caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.\r | |
43 | If HobStart is NULL, then ASSERT().\r | |
878ddf1f | 44 | \r |
5f10fa01 | 45 | @param Type The HOB type to return.\r |
46 | @param HobStart The starting HOB pointer to search from.\r | |
878ddf1f | 47 | \r |
5f10fa01 | 48 | @return The next instance of a HOB type from the starting HOB.\r |
878ddf1f | 49 | \r |
50 | **/\r | |
51 | VOID *\r | |
52 | EFIAPI\r | |
53 | GetNextHob (\r | |
54 | IN UINT16 Type,\r | |
55 | IN CONST VOID *HobStart\r | |
56 | )\r | |
57 | ;\r | |
58 | \r | |
59 | /**\r | |
5f10fa01 | 60 | Returns the first instance of a HOB type among the whole HOB list.\r |
878ddf1f | 61 | \r |
5f10fa01 | 62 | This function searches the first instance of a HOB type among the whole HOB list. \r |
63 | If there does not exist such HOB type in the HOB list, it will return NULL. \r | |
878ddf1f | 64 | \r |
5f10fa01 | 65 | @param Type The HOB type to return.\r |
66 | \r | |
67 | @return The next instance of a HOB type from the starting HOB.\r | |
878ddf1f | 68 | \r |
69 | **/\r | |
70 | VOID *\r | |
71 | EFIAPI\r | |
72 | GetFirstHob (\r | |
73 | IN UINT16 Type\r | |
74 | )\r | |
75 | ;\r | |
76 | \r | |
77 | /**\r | |
5f10fa01 | 78 | This function searches the first instance of a HOB from the starting HOB pointer. \r |
79 | Such HOB should satisfy two conditions: \r | |
80 | its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid. \r | |
81 | If there does not exist such HOB from the starting HOB pointer, it will return NULL. \r | |
82 | Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()\r | |
83 | to extract the data section and its size info respectively.\r | |
84 | In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer\r | |
85 | unconditionally: it returns HobStart back if HobStart itself meets the requirement;\r | |
86 | caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.\r | |
87 | If Guid is NULL, then ASSERT().\r | |
88 | If HobStart is NULL, then ASSERT().\r | |
89 | \r | |
90 | @param Guid The GUID to match with in the HOB list.\r | |
91 | @param HobStart A pointer to a Guid.\r | |
92 | \r | |
93 | @return The next instance of the matched GUID HOB from the starting HOB.\r | |
878ddf1f | 94 | \r |
95 | **/\r | |
96 | VOID *\r | |
97 | EFIAPI\r | |
98 | GetNextGuidHob (\r | |
99 | IN CONST EFI_GUID *Guid,\r | |
100 | IN CONST VOID *HobStart\r | |
101 | )\r | |
102 | ;\r | |
103 | \r | |
104 | /**\r | |
5f10fa01 | 105 | This function searches the first instance of a HOB among the whole HOB list. \r |
106 | Such HOB should satisfy two conditions:\r | |
107 | its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.\r | |
108 | If there does not exist such HOB from the starting HOB pointer, it will return NULL.\r | |
109 | Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()\r | |
110 | to extract the data section and its size info respectively.\r | |
111 | If Guid is NULL, then ASSERT().\r | |
878ddf1f | 112 | \r |
5f10fa01 | 113 | @param Guid The GUID to match with in the HOB list.\r |
878ddf1f | 114 | \r |
5f10fa01 | 115 | @return The first instance of the matched GUID HOB among the whole HOB list.\r |
878ddf1f | 116 | \r |
117 | **/\r | |
118 | VOID *\r | |
119 | EFIAPI\r | |
120 | GetFirstGuidHob (\r | |
121 | IN CONST EFI_GUID *Guid\r | |
122 | )\r | |
123 | ;\r | |
124 | \r | |
125 | /**\r | |
5f10fa01 | 126 | Builds a HOB for a loaded PE32 module.\r |
127 | \r | |
128 | This function builds a HOB for a loaded PE32 module.\r | |
129 | It can only be invoked during PEI phase;\r | |
130 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
131 | If ModuleName is NULL, then ASSERT().\r | |
132 | If there is no additional space for HOB creation, then ASSERT().\r | |
878ddf1f | 133 | \r |
5f10fa01 | 134 | @param ModuleName The GUID File Name of the module.\r |
135 | @param MemoryAllocationModule The 64 bit physical address of the module.\r | |
136 | @param ModuleLength The length of the module in bytes.\r | |
137 | Content-type: text/html ]>