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