]>
Commit | Line | Data |
---|---|---|
e386b444 | 1 | /** @file\r |
2 | Entry point to the DXE Core.\r | |
3 | \r | |
19388d29 HT |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r |
5 | This program and the accompanying materials\r | |
e386b444 | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
58380e9c | 8 | http://opensource.org/licenses/bsd-license.php.\r |
e386b444 | 9 | \r |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT 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 | |
26 | VOID *gHobList = NULL;\r | |
27 | \r | |
28 | /**\r | |
518db1d9 | 29 | The entry point of PE/COFF Image for the DXE Core. \r |
30 | \r | |
47c6e0f7 | 31 | This function is the entry point for the DXE Core. This function is required to call\r |
32 | ProcessModuleEntryPointList() and ProcessModuleEntryPointList() is never expected to return.\r | |
33 | The DXE Core is responsible for calling ProcessLibraryConstructorList() as soon as the EFI\r | |
34 | System Table and the image handle for the DXE Core itself have been established.\r | |
518db1d9 | 35 | If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.\r |
36 | \r | |
2fc59a00 | 37 | @param HobStart The pointer to the beginning of the HOB List passed in from the PEI Phase. \r |
e386b444 | 38 | \r |
39 | **/\r | |
40 | VOID\r | |
41 | EFIAPI\r | |
42 | _ModuleEntryPoint (\r | |
43 | IN VOID *HobStart\r | |
44 | )\r | |
45 | {\r | |
46 | //\r | |
47 | // Cache a pointer to the HobList\r | |
48 | //\r | |
49 | gHobList = HobStart;\r | |
50 | \r | |
51 | //\r | |
52 | // Call the DXE Core entry point\r | |
53 | //\r | |
54 | ProcessModuleEntryPointList (HobStart);\r | |
55 | \r | |
56 | //\r | |
57 | // Should never return\r | |
58 | //\r | |
59 | ASSERT(FALSE);\r | |
60 | CpuDeadLoop ();\r | |
61 | }\r | |
62 | \r | |
63 | \r | |
64 | /**\r | |
518db1d9 | 65 | Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r |
66 | \r | |
67 | This function is required to call _ModuleEntryPoint() passing in HobStart.\r | |
e386b444 | 68 | \r |
2fc59a00 | 69 | @param HobStart The pointer to the beginning of the HOB List passed in from the PEI Phase. \r |
e386b444 | 70 | \r |
71 | **/\r | |
72 | VOID\r | |
73 | EFIAPI\r | |
74 | EfiMain (\r | |
75 | IN VOID *HobStart\r | |
76 | )\r | |
77 | {\r | |
78 | _ModuleEntryPoint (HobStart);\r | |
79 | }\r |