OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
ApplicationEntryPoint.c
Go to the documentation of this file.
1
9#include <Uefi.h>
10#include <Library/UefiApplicationEntryPoint.h>
11#include <Library/BaseLib.h>
12#include <Library/DebugLib.h>
13#include <Library/UefiBootServicesTableLib.h>
14#include <Library/PcdLib.h>
15
33EFI_STATUS
34EFIAPI
36 IN EFI_HANDLE ImageHandle,
37 IN EFI_SYSTEM_TABLE *SystemTable
38 )
39{
40 EFI_STATUS Status;
41
42 if (_gUefiDriverRevision != 0) {
43 //
44 // Make sure that the EFI/UEFI spec revision of the platform is >= EFI/UEFI spec revision of the application.
45 //
46 if (SystemTable->Hdr.Revision < _gUefiDriverRevision) {
47 return EFI_INCOMPATIBLE_VERSION;
48 }
49 }
50
51 //
52 // Call constructor for all libraries.
53 //
54 ProcessLibraryConstructorList (ImageHandle, SystemTable);
55
56 //
57 // Call the module's entry point
58 //
59 Status = ProcessModuleEntryPointList (ImageHandle, SystemTable);
60
61 //
62 // Process destructor for all libraries.
63 //
64 ProcessLibraryDestructorList (ImageHandle, SystemTable);
65
66 //
67 // Return the return status code from the driver entry point
68 //
69 return Status;
70}
71
82VOID
83EFIAPI
85 IN EFI_STATUS Status
86 )
87
88{
89 ProcessLibraryDestructorList (gImageHandle, gST);
90
91 gBS->Exit (gImageHandle, Status, 0, NULL);
92}
93
105EFI_STATUS
106EFIAPI
108 IN EFI_HANDLE ImageHandle,
109 IN EFI_SYSTEM_TABLE *SystemTable
110 )
111{
112 return _ModuleEntryPoint (ImageHandle, SystemTable);
113}
EFI_STATUS EFIAPI _ModuleEntryPointReal(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)
EFI_STATUS EFIAPI _ModuleEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition CanaryDummy.c:40
EFI_SYSTEM_TABLE * gST
EFI_HANDLE gImageHandle
EFI_BOOT_SERVICES * gBS