]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
Fix the doxygen comment.
[mirror_edk2.git] / MdePkg / Library / PeimEntryPoint / PeimEntryPoint.c
1 /** @file
2 Entry point to a PEIM.
3
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
9
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.
12
13 **/
14
15
16 #include <PiPei.h>
17
18
19 #include <Library/PeimEntryPoint.h>
20 #include <Library/DebugLib.h>
21
22 /**
23 Image entry point of Peim.
24
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.
28
29 @return Status returned by entry points of Peims.
30
31 **/
32 EFI_STATUS
33 EFIAPI
34 _ModuleEntryPoint (
35 IN EFI_PEI_FILE_HANDLE FileHandle,
36 IN CONST EFI_PEI_SERVICES **PeiServices
37 )
38 {
39 if (_gPeimRevision != 0) {
40 //
41 // Make sure that the PEI spec revision of the platform is >= PEI spec revision of the driver
42 //
43 ASSERT ((*PeiServices)->Hdr.Revision >= _gPeimRevision);
44 }
45
46 //
47 // Call constructor for all libraries
48 //
49 ProcessLibraryConstructorList (FileHandle, PeiServices);
50
51 //
52 // Call the driver entry point
53 //
54 return ProcessModuleEntryPointList (FileHandle, PeiServices);
55 }
56
57
58 /**
59 Wrapper of Peim image entry point.
60
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.
64
65 @return Status returned by entry points of Peims.
66
67 **/
68 EFI_STATUS
69 EFIAPI
70 EfiMain (
71 IN EFI_PEI_FILE_HANDLE FileHandle,
72 IN CONST EFI_PEI_SERVICES **PeiServices
73 )
74 {
75 return _ModuleEntryPoint (FileHandle, PeiServices);
76 }