]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/PeimEntryPoint.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Include / Library / PeimEntryPoint.h
CommitLineData
fb3df220 1/** @file\r
50a64e5b 2 Module entry point library for PEIM.\r
fb3df220 3\r
9095d37b 4Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
fb3df220 6\r
7**/\r
8\r
9#ifndef __MODULE_ENTRY_POINT_H__\r
10#define __MODULE_ENTRY_POINT_H__\r
11\r
fc30687f 12///\r
9095d37b 13/// Declare the EFI/UEFI Specification Revision to which this driver is implemented\r
fc30687f 14///\r
2f88bd3a 15extern CONST UINT32 _gPeimRevision;\r
fb3df220 16\r
17/**\r
f6d2bcc6
LG
18 The entry point of PE/COFF Image for a PEIM.\r
19\r
9095d37b 20 This function is the entry point for a PEIM. This function must call ProcessLibraryConstructorList()\r
f6d2bcc6
LG
21 and ProcessModuleEntryPointList(). The return value from ProcessModuleEntryPointList() is returned.\r
22 If _gPeimRevision is not zero and PeiServices->Hdr.Revision is less than _gPeimRevison, then ASSERT().\r
fb3df220 23\r
9095d37b 24 @param FileHandle Handle of the file being invoked.\r
63766b6d 25 @param PeiServices Describes the list of possible PEI Services.\r
fb3df220 26\r
6a0e332d 27 @retval EFI_SUCCESS The PEIM executed normally.\r
28 @retval !EFI_SUCCESS The PEIM failed to execute normally.\r
fb3df220 29**/\r
30EFI_STATUS\r
31EFIAPI\r
32_ModuleEntryPoint (\r
2f88bd3a
MK
33 IN EFI_PEI_FILE_HANDLE FileHandle,\r
34 IN CONST EFI_PEI_SERVICES **PeiServices\r
fb3df220 35 );\r
36\r
fb3df220 37/**\r
6a0e332d 38 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r
9095d37b 39\r
f6d2bcc6 40 This function is required to call _ModuleEntryPoint() passing in FileHandle and PeiServices.\r
fb3df220 41\r
9095d37b 42 @param FileHandle Handle of the file being invoked.\r
63766b6d 43 @param PeiServices Describes the list of possible PEI Services.\r
fb3df220 44\r
6a0e332d 45 @retval EFI_SUCCESS The PEIM executed normally.\r
46 @retval !EFI_SUCCESS The PEIM failed to execute normally.\r
fb3df220 47\r
48**/\r
49EFI_STATUS\r
50EFIAPI\r
51EfiMain (\r
2f88bd3a
MK
52 IN EFI_PEI_FILE_HANDLE FileHandle,\r
53 IN CONST EFI_PEI_SERVICES **PeiServices\r
fb3df220 54 );\r
55\r
fb3df220 56/**\r
f6d2bcc6
LG
57 Autogenerated function that calls the library constructors for all of the module's\r
58 dependent libraries.\r
fb3df220 59\r
34860f7a 60 This function must be called by _ModuleEntryPoint().\r
f6d2bcc6 61 This function calls the set of library constructors for the set of library instances that a\r
34860f7a 62 module depends on. This includes library instances that a module depends on directly and library\r
9095d37b 63 instances that a module depends on indirectly through other libraries.\r
f6d2bcc6
LG
64 This function is autogenerated by build tools and those build tools are responsible for collecting\r
65 the set of library instances, determine which ones have constructors, and calling the library\r
66 constructors in the proper order based upon each of the library instances own dependencies.\r
67\r
68 @param FileHandle Handle of the file being invoked.\r
69 @param PeiServices Describes the list of possible PEI Services.\r
fb3df220 70\r
71**/\r
72VOID\r
73EFIAPI\r
74ProcessLibraryConstructorList (\r
2f88bd3a
MK
75 IN EFI_PEI_FILE_HANDLE FileHandle,\r
76 IN CONST EFI_PEI_SERVICES **PeiServices\r
fb3df220 77 );\r
78\r
fb3df220 79/**\r
f6d2bcc6 80 Autogenerated function that calls a set of module entry points.\r
fb3df220 81\r
f6d2bcc6 82 This function must be called by _ModuleEntryPoint().\r
9095d37b 83 This function calls the set of module entry points.\r
f6d2bcc6
LG
84 This function is autogenerated by build tools and those build tools are responsible\r
85 for collecting the module entry points and calling them in a specified order.\r
fb3df220 86\r
9095d37b 87 @param FileHandle Handle of the file being invoked.\r
63766b6d 88 @param PeiServices Describes the list of possible PEI Services.\r
fb3df220 89\r
6a0e332d 90 @retval EFI_SUCCESS The PEIM executed normally.\r
91 @retval !EFI_SUCCESS The PEIM failed to execute normally.\r
9095d37b 92\r
fb3df220 93**/\r
94EFI_STATUS\r
95EFIAPI\r
96ProcessModuleEntryPointList (\r
2f88bd3a
MK
97 IN EFI_PEI_FILE_HANDLE FileHandle,\r
98 IN CONST EFI_PEI_SERVICES **PeiServices\r
fb3df220 99 );\r
100\r
101#endif\r