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 FileHandle Handle of the file being invoked.
26 Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().
27 @param PeiServices Describes the list of possible PEI Services.
29 @return Status returned by entry points of Peims.
35 IN EFI_PEI_FILE_HANDLE FileHandle
,
36 IN CONST EFI_PEI_SERVICES
**PeiServices
39 if (_gPeimRevision
!= 0) {
41 // Make sure that the PEI spec revision of the platform is >= PEI spec revision of the driver
43 ASSERT ((*PeiServices
)->Hdr
.Revision
>= _gPeimRevision
);
47 // Call constructor for all libraries
49 ProcessLibraryConstructorList (FileHandle
, PeiServices
);
52 // Call the driver entry point
54 return ProcessModuleEntryPointList (FileHandle
, PeiServices
);
59 Wrapper of Peim image entry point.
61 @param FileHandle Handle of the file being invoked.
62 Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().
63 @param PeiServices Describes the list of possible PEI Services.
65 @return Status returned by entry points of Peims.
71 IN EFI_PEI_FILE_HANDLE FileHandle
,
72 IN CONST EFI_PEI_SERVICES
**PeiServices
75 return _ModuleEntryPoint (FileHandle
, PeiServices
);