]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/UefiApplicationEntryPoint.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Include / Library / UefiApplicationEntryPoint.h
CommitLineData
fb3df220 1/** @file\r
50a64e5b 2 Module entry point library for UEFI Applications.\r
fb3df220 3\r
9095d37b 4Copyright (c) 2007 - 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 __UEFI_APPLICATION_ENTRY_POINT_H__\r
10#define __UEFI_APPLICATION_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 _gUefiDriverRevision;\r
fb3df220 16\r
17/**\r
28d3e14f 18 Entry point to UEFI Application.\r
fb3df220 19\r
71871514 20 This function is the entry point for a UEFI Application. This function must call\r
21 ProcessLibraryConstructorList(), ProcessModuleEntryPointList(), and ProcessLibraryDestructorList().\r
22 The return value from ProcessModuleEntryPointList() is returned.\r
23 If _gUefiDriverRevision is not zero and SystemTable->Hdr.Revision is less than _gUefiDriverRevison,\r
24 then return EFI_INCOMPATIBLE_VERSION.\r
fb3df220 25\r
71871514 26 @param ImageHandle The image handle of the UEFI Application.\r
27 @param SystemTable A pointer to the EFI System Table.\r
28\r
29 @retval EFI_SUCCESS The UEFI Application exited normally.\r
30 @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.\r
31 @retval Other Return value from ProcessModuleEntryPointList().\r
fb3df220 32\r
33**/\r
34EFI_STATUS\r
35EFIAPI\r
36_ModuleEntryPoint (\r
37 IN EFI_HANDLE ImageHandle,\r
38 IN EFI_SYSTEM_TABLE *SystemTable\r
39 );\r
40\r
fb3df220 41/**\r
9095d37b 42 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r
fb3df220 43\r
71871514 44 @param ImageHandle The image handle of the UEFI Application.\r
45 @param SystemTable A pointer to the EFI System Table.\r
fb3df220 46\r
71871514 47 @retval EFI_SUCCESS The UEFI Application exited normally.\r
48 @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.\r
49 @retval Other Return value from ProcessModuleEntryPointList().\r
fb3df220 50\r
51**/\r
52EFI_STATUS\r
53EFIAPI\r
54EfiMain (\r
55 IN EFI_HANDLE ImageHandle,\r
56 IN EFI_SYSTEM_TABLE *SystemTable\r
57 );\r
58\r
fb3df220 59/**\r
f6d2bcc6 60 Invokes the library destructors for all dependent libraries and terminates\r
9095d37b 61 the UEFI Application.\r
71871514 62\r
63 This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()\r
64 with a status specified by Status.\r
fb3df220 65\r
71871514 66 @param Status Status returned by the application that is exiting.\r
9095d37b 67\r
fb3df220 68**/\r
69VOID\r
70EFIAPI\r
71Exit (\r
72 IN EFI_STATUS Status\r
73 );\r
74\r
fb3df220 75/**\r
71871514 76 Autogenerated function that calls the library constructors for all of the module's\r
77 dependent libraries.\r
78\r
79 This function must be called by _ModuleEntryPoint().\r
80 This function calls the set of library constructors for the set of library instances\r
81 that a module depends on. This includes library instances that a module depends on\r
9095d37b 82 directly and library instances that a module depends on indirectly through other libraries.\r
71871514 83 This function is autogenerated by build tools and those build tools are responsible for\r
84 collecting the set of library instances, determine which ones have constructors, and\r
85 calling the library constructors in the proper order based upon each of the library\r
86 instances own dependencies.\r
87\r
88 @param ImageHandle The image handle of the UEFI Application.\r
89 @param SystemTable A pointer to the EFI System Table.\r
9095d37b 90\r
fb3df220 91**/\r
92VOID\r
93EFIAPI\r
94ProcessLibraryConstructorList (\r
95 IN EFI_HANDLE ImageHandle,\r
96 IN EFI_SYSTEM_TABLE *SystemTable\r
97 );\r
98\r
fb3df220 99/**\r
71871514 100 Autogenerated function that calls the library descructors for all of the module's\r
101 dependent libraries.\r
fb3df220 102\r
34860f7a 103 This function may be called by _ModuleEntryPoint()or Exit().\r
71871514 104 This function calls the set of library destructors for the set of library instances\r
105 that a module depends on. This includes library instances that a module depends on\r
9095d37b 106 directly and library instances that a module depends on indirectly through other libraries.\r
71871514 107 This function is autogenerated by build tools and those build tools are responsible\r
108 for collecting the set of library instances, determine which ones have destructors,\r
109 and calling the library destructors in the proper order based upon each of the library\r
110 instances own dependencies.\r
111\r
112 @param ImageHandle The image handle of the UEFI Application.\r
113 @param SystemTable A pointer to the EFI System Table.\r
fb3df220 114\r
fb3df220 115**/\r
116VOID\r
117EFIAPI\r
118ProcessLibraryDestructorList (\r
119 IN EFI_HANDLE ImageHandle,\r
120 IN EFI_SYSTEM_TABLE *SystemTable\r
121 );\r
122\r
123/**\r
f6d2bcc6 124 This function calls the set of module entry points. It must be called by _ModuleEntryPoint().\r
fb3df220 125\r
9095d37b 126 This function is autogenerated by build tools and those build tools are\r
f6d2bcc6
LG
127 responsible for collecting the module entry points and calling them in a specified order.\r
128\r
129 @param ImageHandle The image handle of the UEFI Application.\r
130 @param SystemTable A pointer to the EFI System Table.\r
fb3df220 131\r
71871514 132 @retval EFI_SUCCESS The UEFI Application executed normally.\r
133 @retval !EFI_SUCCESS The UEFI Application failed to execute normally.\r
134\r
fb3df220 135**/\r
fb3df220 136EFI_STATUS\r
137EFIAPI\r
138ProcessModuleEntryPointList (\r
139 IN EFI_HANDLE ImageHandle,\r
140 IN EFI_SYSTEM_TABLE *SystemTable\r
141 );\r
142\r
143#endif\r