1 /** @file 2 Library that helps implement monolithic PEI (i.e. PEI part of SEC) 3 4 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> 5 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 14 **/ 15 16 #ifndef _PI_PEI_H_ 17 #define _PI_PEI_H_ 18 19 #include <PiPei.h> 20 21 #include <Library/BaseLib.h> 22 #include <Library/PrePiLib.h> 23 #include <Library/PcdLib.h> 24 #include <Library/DebugLib.h> 25 #include <Library/BaseMemoryLib.h> 26 #include <Library/UefiDecompressLib.h> 27 #include <Library/PeCoffLib.h> 28 #include <Library/CacheMaintenanceLib.h> 29 #include <Library/TimerLib.h> 30 #include <Library/PerformanceLib.h> 31 32 #include <Guid/MemoryAllocationHob.h> 33 34 35 #define GET_HOB_TYPE(Hob) ((Hob).Header->HobType) 36 #define GET_HOB_LENGTH(Hob) ((Hob).Header->HobLength) 37 #define GET_NEXT_HOB(Hob) ((Hob).Raw + GET_HOB_LENGTH (Hob)) 38 #define END_OF_HOB_LIST(Hob) (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_END_OF_HOB_LIST) 39 40 // 41 // Get the data and data size field of GUID 42 // 43 #define GET_GUID_HOB_DATA(GuidHob) ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID))) 44 #define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE)) 45 46 #endif 47