]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c
Refine MdePkg library instances: Remove unnecessary EFIAPI modifier for library worke...
[mirror_edk2.git] / MdePkg / Library / DxeCoreEntryPoint / DxeCoreEntryPoint.c
CommitLineData
e386b444 1/** @file\r
2 Entry point to the DXE Core.\r
3\r
4Copyright (c) 2006, Intel Corporation<BR>\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
c892d846 15\r
c7d265a9 16#include <PiDxe.h>\r
c892d846 17\r
18\r
c7d265a9 19#include <Library/DxeCoreEntryPoint.h>\r
20#include <Library/DebugLib.h>\r
21#include <Library/BaseLib.h>\r
e386b444 22\r
23//\r
24// Cache copy of HobList pointer. \r
25// \r
26VOID *gHobList = NULL;\r
27\r
28/**\r
29 Enrty point to DXE core.\r
30\r
e310a27b 31 This function is the entry point to the DXE Foundation. The PEI phase, which executes just before\r
32 DXE, is responsible for loading and invoking the DXE Foundation in system memory. The only\r
33 parameter that is passed to the DXE Foundation is HobStart. This parameter is a pointer to the\r
34 HOB list that describes the system state at the hand-off to the DXE Foundation. At a minimum,\r
35 this system state must include the following:\r
36 - PHIT HOB\r
37 - CPU HOB\r
38 - Description of system memory\r
39 - Description of one or more firmware volumes\r
40 The DXE Foundation is also guaranteed that only one processor is running and that the processor is\r
41 running with interrupts disabled. The implementation of the DXE Foundation must not make any\r
42 assumptions about where the DXE Foundation will be loaded or where the stack is located. In\r
43 general, the DXE Foundation should make as few assumptions about the state of the system as\r
44 possible. This lack of assumptions will allow the DXE Foundation to be portable to the widest\r
45 variety of system architectures.\r
46 \r
e386b444 47 @param HobStart Pointer of HobList.\r
48\r
49**/\r
50VOID\r
51EFIAPI\r
52_ModuleEntryPoint (\r
53 IN VOID *HobStart\r
54 )\r
55{\r
56 //\r
57 // Cache a pointer to the HobList\r
58 //\r
59 gHobList = HobStart;\r
60\r
61 //\r
62 // Call the DXE Core entry point\r
63 //\r
64 ProcessModuleEntryPointList (HobStart);\r
65\r
66 //\r
67 // Should never return\r
68 //\r
69 ASSERT(FALSE);\r
70 CpuDeadLoop ();\r
71}\r
72\r
73\r
74/**\r
75 Wrapper of enrty point to DXE CORE.\r
76\r
77 @param HobStart Pointer of HobList.\r
78\r
79**/\r
80VOID\r
81EFIAPI\r
82EfiMain (\r
83 IN VOID *HobStart\r
84 )\r
85{\r
86 _ModuleEntryPoint (HobStart);\r
87}\r