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