]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
Fixed tracker #49
[mirror_edk2.git] / MdePkg / Library / PeimEntryPoint / PeimEntryPoint.c
CommitLineData
878ddf1f 1\r
2/** @file\r
3 Entry point to a PEIM.\r
4\r
5Copyright (c) 2006, Intel Corporation<BR>\r
6All rights reserved. This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16/**\r
17 Image entry point of Peim.\r
18\r
19 @param FfsHeader Pointer to FFS header the loaded driver.\r
20 @param PeiServices Pointer to the PEI services.\r
21\r
22 @return Status returned by entry points of Peims.\r
23\r
24**/\r
25EFI_STATUS\r
26EFIAPI\r
27_ModuleEntryPoint (\r
28 IN EFI_FFS_FILE_HEADER *FfsHeader,\r
29 IN EFI_PEI_SERVICES **PeiServices\r
30 )\r
31{\r
32 if (_gPeimRevision != 0) {\r
33 //\r
34 // Make sure that the PEI spec revision of the platform is >= PEI spec revision of the driver\r
35 //\r
36 ASSERT ((*PeiServices)->Hdr.Revision >= _gPeimRevision);\r
37 }\r
38\r
39 //\r
40 // Call constructor for all libraries\r
41 //\r
42 ProcessLibraryConstructorList (FfsHeader, PeiServices);\r
43\r
44 //\r
45 // Call the driver entry point\r
46 //\r
47 return ProcessModuleEntryPointList (FfsHeader, PeiServices);\r
48}\r
49\r
50\r
51/**\r
52 Wrapper of Peim image entry point.\r
53\r
54 @param FfsHeader Pointer to FFS header the loaded driver.\r
55 @param PeiServices Pointer to the PEI services.\r
56\r
57 @return Status returned by entry points of Peims.\r
58\r
59**/\r
60EFI_STATUS\r
61EFIAPI\r
62EfiMain (\r
63 IN EFI_FFS_FILE_HEADER *FfsHeader,\r
64 IN EFI_PEI_SERVICES **PeiServices\r
65 )\r
66{\r
67 return _ModuleEntryPoint (FfsHeader, PeiServices);\r
68}\r