TianoCore EDK2 master
Loading...
Searching...
No Matches
ApplicationEntryPoint.c
Go to the documentation of this file.
1
9#include <Uefi.h>
11#include <Library/BaseLib.h>
12#include <Library/DebugLib.h>
14
33EFIAPI
35 IN EFI_HANDLE ImageHandle,
36 IN EFI_SYSTEM_TABLE *SystemTable
37 )
38{
39 EFI_STATUS Status;
40
41 if (_gUefiDriverRevision != 0) {
42 //
43 // Make sure that the EFI/UEFI spec revision of the platform is >= EFI/UEFI spec revision of the application.
44 //
45 if (SystemTable->Hdr.Revision < _gUefiDriverRevision) {
46 return EFI_INCOMPATIBLE_VERSION;
47 }
48 }
49
50 //
51 // Call constructor for all libraries.
52 //
53 ProcessLibraryConstructorList (ImageHandle, SystemTable);
54
55 //
56 // Call the module's entry point
57 //
58 Status = ProcessModuleEntryPointList (ImageHandle, SystemTable);
59
60 //
61 // Process destructor for all libraries.
62 //
63 ProcessLibraryDestructorList (ImageHandle, SystemTable);
64
65 //
66 // Return the return status code from the driver entry point
67 //
68 return Status;
69}
70
81VOID
82EFIAPI
84 IN EFI_STATUS Status
85 )
86
87{
89
90 gBS->Exit (gImageHandle, Status, 0, NULL);
91}
92
105EFIAPI
107 IN EFI_HANDLE ImageHandle,
108 IN EFI_SYSTEM_TABLE *SystemTable
109 )
110{
111 return _ModuleEntryPoint (ImageHandle, SystemTable);
112}
EFI_STATUS EFIAPI _ModuleEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
VOID EFIAPI Exit(IN EFI_STATUS Status)
EFI_STATUS EFIAPI EfiMain(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
VOID EFIAPI ProcessModuleEntryPointList(IN VOID *HobStart)
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
VOID EFIAPI ProcessLibraryDestructorList(IN EFI_HANDLE ImageHandle, IN EFI_MM_SYSTEM_TABLE *MmSystemTable)
CONST UINT32 _gUefiDriverRevision
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_SYSTEM_TABLE * gST
EFI_HANDLE gImageHandle
EFI_BOOT_SERVICES * gBS