4 Copyright (c) 2006, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #include <Library/PeimEntryPoint.h>
20 #include <Library/DebugLib.h>
23 Image entry point of Peim.
25 @param FfsHeader Pointer to FFS header the loaded driver.
26 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
28 @return Status returned by entry points of Peims.
34 IN EFI_PEI_FILE_HANDLE FileHandle
,
35 IN CONST EFI_PEI_SERVICES
**PeiServices
38 if (_gPeimRevision
!= 0) {
40 // Make sure that the PEI spec revision of the platform is >= PEI spec revision of the driver
42 ASSERT ((*PeiServices
)->Hdr
.Revision
>= _gPeimRevision
);
46 // Call constructor for all libraries
48 ProcessLibraryConstructorList (FileHandle
, PeiServices
);
51 // Call the driver entry point
53 return ProcessModuleEntryPointList (FileHandle
, PeiServices
);
58 Wrapper of Peim image entry point.
60 @param FfsHeader Pointer to FFS header the loaded driver.
61 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
63 @return Status returned by entry points of Peims.
69 IN EFI_PEI_FILE_HANDLE FileHandle
,
70 IN CONST EFI_PEI_SERVICES
**PeiServices
73 return _ModuleEntryPoint (FileHandle
, PeiServices
);