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

EmbeddedPkg/Library/PrePiHobListPointerLib/PrePiHobListPointer.c

Go to the documentation of this file.
00001 
00015 #include <PiPei.h>
00016 #include <Library/PrePiHobListPointerLib.h>
00017 #include <Library/DebugLib.h>
00018 #include <Library/PcdLib.h>
00019 
00020 //
00021 // Have to use build system to set the original value in case we are running
00022 // from FLASH and globals don't work. So if you do a GetHobList() and gHobList
00023 // and gHobList is NULL the PCD default values are used.
00024 //
00025 VOID *gHobList = NULL;
00026 
00027 
00036 VOID *
00037 EFIAPI
00038 PrePeiGetHobList (
00039   VOID
00040   )
00041 {
00042   if (gHobList == NULL) {
00043     return (VOID *)*(UINTN*)PcdGet32 (PcdPrePiHobBase);
00044   } else {
00045     return gHobList;
00046   }
00047 }
00048 
00049 
00050 
00057 EFI_STATUS
00058 EFIAPI
00059 PrePeiSetHobList (
00060   IN  VOID      *HobList
00061   )
00062 {
00063   gHobList = HobList;
00064   
00065   //
00066   // If this code is running from ROM this could fail
00067   //
00068   return (gHobList == HobList) ? EFI_SUCCESS: EFI_UNSUPPORTED;
00069 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines