]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c
3ac7cfb931706f51fd333590f412a2fd71a76364
[mirror_edk2.git] / MdePkg / Library / DxeCoreEntryPoint / DxeCoreEntryPoint.c
1 /** @file
2 Entry point to the DXE Core.
3
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include <PiDxe.h>
10
11 #include <Library/DxeCoreEntryPoint.h>
12 #include <Library/DebugLib.h>
13 #include <Library/BaseLib.h>
14
15 //
16 // Cache copy of HobList pointer.
17 //
18 VOID *gHobList = NULL;
19
20 /**
21 The entry point of PE/COFF Image for the DXE Core.
22
23 This function is the entry point for the DXE Core. This function is required to call
24 ProcessModuleEntryPointList() and ProcessModuleEntryPointList() is never expected to return.
25 The DXE Core is responsible for calling ProcessLibraryConstructorList() as soon as the EFI
26 System Table and the image handle for the DXE Core itself have been established.
27 If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.
28
29 @param HobStart The pointer to the beginning of the HOB List passed in from the PEI Phase.
30
31 **/
32 VOID
33 EFIAPI
34 _ModuleEntryPoint (
35 IN VOID *HobStart
36 )
37 {
38 //
39 // Cache a pointer to the HobList
40 //
41 gHobList = HobStart;
42
43 //
44 // Call the DXE Core entry point
45 //
46 ProcessModuleEntryPointList (HobStart);
47
48 //
49 // Should never return
50 //
51 ASSERT (FALSE);
52 CpuDeadLoop ();
53 }
54
55 /**
56 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
57
58 This function is required to call _ModuleEntryPoint() passing in HobStart.
59
60 @param HobStart The pointer to the beginning of the HOB List passed in from the PEI Phase.
61
62 **/
63 VOID
64 EFIAPI
65 EfiMain (
66 IN VOID *HobStart
67 )
68 {
69 _ModuleEntryPoint (HobStart);
70 }