EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiHobLib.h

Go to the documentation of this file.
00001 /*++
00002 
00003 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
00004 This program and the accompanying materials                          
00005 are licensed and made available under the terms and conditions of the BSD License         
00006 which accompanies this distribution.  The full text of the license may be found at        
00007 http://opensource.org/licenses/bsd-license.php                                            
00008                                                                                           
00009 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
00010 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
00011 
00012 Module Name:
00013   
00014     EfiHobLib.h
00015 
00016 Abstract:
00017 
00018  
00019 --*/
00020 
00021 #ifndef _EFI_HOB_LIB_H_
00022 #define _EFI_HOB_LIB_H_
00023 
00024 #include "PeiHob.h"
00025 
00026 VOID  *
00027 GetHob (
00028   IN UINT16  Type,
00029   IN VOID    *HobStart
00030   )
00031 /*++
00032 
00033 Routine Description:
00034 
00035   This function returns the first instance of a HOB type in a HOB list.
00036   
00037 Arguments:
00038 
00039   Type          The HOB type to return.
00040   HobStart      The first HOB in the HOB list.
00041     
00042 Returns:
00043 
00044   HobStart      There were no HOBs found with the requested type.
00045   else          Returns the first HOB with the matching type.
00046 
00047 --*/
00048 ;
00049 
00050 UINTN
00051 GetHobListSize (
00052   IN VOID  *HobStart
00053   )
00054 /*++
00055 
00056 Routine Description:
00057 
00058   Get size of hob list.
00059 
00060 Arguments:
00061 
00062   HobStart      - Start pointer of hob list
00063 
00064 Returns:
00065 
00066   Size of hob list.
00067 
00068 --*/
00069 ;
00070 
00071 UINT32
00072 GetHobVersion (
00073   IN VOID  *HobStart
00074   )
00075 /*++
00076 
00077 Routine Description:
00078 
00079   Get hob version.
00080 
00081 Arguments:
00082 
00083   HobStart      - Start pointer of hob list
00084 
00085 Returns:
00086 
00087   Hob version.
00088 
00089 --*/
00090 ;
00091 
00092 EFI_STATUS
00093 GetHobBootMode (
00094   IN  VOID           *HobStart,
00095   OUT EFI_BOOT_MODE  *BootMode
00096   )
00097 /*++
00098 
00099 Routine Description:
00100 
00101   Get current boot mode.
00102 
00103 Arguments:
00104 
00105   HobStart      - Start pointer of hob list
00106   
00107   BootMode      - Current boot mode recorded in PHIT hob
00108 
00109 Returns:
00110 
00111   EFI_NOT_FOUND     - Invalid hob header
00112   
00113   EFI_SUCCESS       - Boot mode found
00114 
00115 --*/
00116 ;
00117 
00118 EFI_STATUS
00119 GetCpuHobInfo (
00120   IN  VOID   *HobStart,
00121   OUT UINT8  *SizeOfMemorySpace,
00122   OUT UINT8  *SizeOfIoSpace
00123   )
00124 /*++
00125 
00126 Routine Description:
00127 
00128   Get information recorded in CPU hob (Memory space size, Io space size)
00129 
00130 Arguments:
00131 
00132   HobStart            - Start pointer of hob list
00133   
00134   SizeOfMemorySpace   - Size of memory size
00135   
00136   SizeOfIoSpace       - Size of IO size
00137 
00138 Returns:
00139 
00140   EFI_NOT_FOUND     - CPU hob not found
00141   
00142   EFI_SUCCESS       - CPU hob found and information got.
00143 
00144 --*/
00145 ;
00146 
00147 EFI_STATUS
00148 GetDxeCoreHobInfo (
00149   IN  VOID                  *HobStart,
00150   OUT EFI_PHYSICAL_ADDRESS  *BaseAddress,
00151   OUT UINT64                *Length,
00152   OUT VOID                  **EntryPoint,
00153   OUT EFI_GUID              **FileName
00154   )
00155 /*++
00156 
00157 Routine Description:
00158 
00159   Get memory allocation hob created for DXE core and extract its information
00160 
00161 Arguments:
00162 
00163   HobStart        - Start pointer of the hob list
00164   
00165   BaseAddress     - Start address of memory allocated for DXE core
00166   
00167   Length          - Length of memory allocated for DXE core
00168   
00169   EntryPoint      - DXE core file name
00170 
00171   FileName        - FileName  
00172 
00173 Returns:
00174 
00175   EFI_NOT_FOUND   - DxeCoreHob not found
00176   
00177   EFI_SUCCESS     - DxeCoreHob found and information got
00178 
00179 --*/
00180 ;
00181 
00182 EFI_STATUS
00183 GetNextFirmwareVolumeHob (
00184   IN OUT VOID                  **HobStart,
00185   OUT    EFI_PHYSICAL_ADDRESS  *BaseAddress,
00186   OUT    UINT64                *Length
00187   )
00188 /*++
00189 
00190 Routine Description:
00191 
00192   Get next firmware volume hob from HobStart
00193 
00194 Arguments:
00195 
00196   HobStart        - Start pointer of hob list
00197   
00198   BaseAddress     - Start address of next firmware volume
00199   
00200   Length          - Length of next firmware volume
00201 
00202 Returns:
00203 
00204   EFI_NOT_FOUND   - Next firmware volume not found
00205   
00206   EFI_SUCCESS     - Next firmware volume found with address information
00207 
00208 --*/
00209 ;
00210 
00211 #if (PI_SPECIFICATION_VERSION >= 0x00010000)
00212 EFI_STATUS
00213 GetNextFirmwareVolume2Hob (
00214   IN OUT VOID                  **HobStart,
00215   OUT    EFI_PHYSICAL_ADDRESS  *BaseAddress,
00216   OUT    UINT64                *Length,
00217   OUT    EFI_GUID              *FileName
00218   );
00219 #endif
00220 
00221 EFI_STATUS
00222 GetNextGuidHob (
00223   IN OUT VOID      **HobStart,
00224   IN     EFI_GUID  * Guid,
00225   OUT    VOID      **Buffer,
00226   OUT    UINTN     *BufferSize OPTIONAL
00227   )
00228 /*++
00229 
00230 Routine Description:
00231   Get the next guid hob.
00232   
00233 Arguments:
00234   HobStart        A pointer to the start hob.
00235   Guid            A pointer to a guid.
00236   Buffer          A pointer to the buffer.
00237   BufferSize      Buffer size.
00238   
00239 Returns:
00240   Status code.
00241   
00242   EFI_NOT_FOUND       - Next Guid hob not found
00243   
00244   EFI_SUCCESS         - Next Guid hob found and data for this Guid got
00245 
00246 --*/
00247 ;
00248 
00249 EFI_STATUS
00250 GetPalEntryHobInfo (
00251   IN  VOID                  *HobStart,
00252   OUT EFI_PHYSICAL_ADDRESS  *PalEntry
00253   )
00254 /*++
00255 
00256 Routine Description:
00257 
00258   Get PAL entry from PalEntryHob
00259 
00260 Arguments:
00261 
00262   HobStart      - Start pointer of hob list
00263   
00264   PalEntry      - Pointer to PAL entry
00265 
00266 Returns:
00267 
00268   Status code.
00269 
00270 --*/
00271 ;
00272 
00273 EFI_STATUS
00274 GetIoPortSpaceAddressHobInfo (
00275   IN  VOID                  *HobStart,
00276   OUT EFI_PHYSICAL_ADDRESS  *IoPortSpaceAddress
00277   )
00278 /*++
00279 
00280 Routine Description:
00281 
00282   Get IO port space address from IoBaseHob.
00283 
00284 Arguments:
00285 
00286   HobStart              - Start pointer of hob list
00287   
00288   IoPortSpaceAddress    - IO port space address
00289 
00290 Returns:
00291 
00292   Status code
00293 
00294 --*/
00295 ;
00296 
00297 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines