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