]> git.proxmox.com Git - mirror_edk2.git/blob - EmbeddedPkg/Library/PrePiLib/PrePi.h
Updated to support passing PE/COFF and LZMA decompress up via HOBS. Currently turned...
[mirror_edk2.git] / EmbeddedPkg / Library / PrePiLib / PrePi.h
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 All rights reserved. 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
30 #include <Guid/MemoryAllocationHob.h>
31
32
33 #define GET_HOB_TYPE(Hob) ((Hob).Header->HobType)
34 #define GET_HOB_LENGTH(Hob) ((Hob).Header->HobLength)
35 #define GET_NEXT_HOB(Hob) ((Hob).Raw + GET_HOB_LENGTH (Hob))
36 #define END_OF_HOB_LIST(Hob) (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_END_OF_HOB_LIST)
37
38 //
39 // Get the data and data size field of GUID
40 //
41 #define GET_GUID_HOB_DATA(GuidHob) ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))
42 #define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))
43
44 #endif