]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
5 Copyright (c) 2006, Intel Corporation<BR>
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
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.
17 // The package level header files this module uses
21 // The protocols, PPI and GUID defintions for this module
24 // The Library classes this module consumes
26 #include <Library/PeimEntryPoint.h>
27 #include <Library/DebugLib.h>
30 Image entry point of Peim.
32 @param FfsHeader Pointer to FFS header the loaded driver.
33 @param PeiServices Pointer to the PEI services.
35 @return Status returned by entry points of Peims.
41 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
42 IN EFI_PEI_SERVICES
**PeiServices
45 if (_gPeimRevision
!= 0) {
47 // Make sure that the PEI spec revision of the platform is >= PEI spec revision of the driver
49 ASSERT ((*PeiServices
)->Hdr
.Revision
>= _gPeimRevision
);
53 // Call constructor for all libraries
55 ProcessLibraryConstructorList (FfsHeader
, PeiServices
);
58 // Call the driver entry point
60 return ProcessModuleEntryPointList (FfsHeader
, PeiServices
);
65 Wrapper of Peim image entry point.
67 @param FfsHeader Pointer to FFS header the loaded driver.
68 @param PeiServices Pointer to the PEI services.
70 @return Status returned by entry points of Peims.
76 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
77 IN EFI_PEI_SERVICES
**PeiServices
80 return _ModuleEntryPoint (FfsHeader
, PeiServices
);