]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c
6b9f12d12f6c97d1466f73ccde818bf578dfd939
[mirror_edk2.git] / MdePkg / Library / PeiCoreEntryPoint / PeiCoreEntryPoint.c
1 /** @file
2 Entry point to a the PEI Core.
3
4 Copyright (c) 2006 - 2007, 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 <PiPei.h>
17
18 //
19 // The Library classes this module produced
20 //
21 #include <Library/PeiCoreEntryPoint.h>
22 #include <Library/BaseLib.h>
23 #include <Library/DebugLib.h>
24
25 /**
26
27 Enrty point to PEI core.
28
29 @param SecCoreData Points to a data structure containing
30 information about the PEI core's
31 operating environment, such as the size
32 and location of temporary RAM, the stack
33 location and the BFV location. The type
34 EFI_SEC_PEI_HAND_OFF is
35
36 @param PpiList Points to a list of one or more PPI
37 descriptors to be installed initially by
38 the PEI core. An empty PPI list consists
39 of a single descriptor with the end-tag
40 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
41 As part of its initialization phase, the
42 PEI Foundation will add these SEC-hosted
43 PPIs to its PPI database such that both
44 the PEI Foundation and any modules can
45 leverage the associated service calls
46 and/or code in these early PPIs.
47
48 **/
49 VOID
50 EFIAPI
51 _ModuleEntryPoint(
52 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
53 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
54 )
55 {
56 ProcessModuleEntryPointList (SecCoreData, PpiList, NULL);
57
58 //
59 // Should never return
60 //
61 ASSERT(FALSE);
62 CpuDeadLoop ();
63 }
64
65
66 /**
67
68 Wrapper of enrty point to PEI core.
69
70 @param SecCoreData Points to a data structure containing
71 information about the PEI core's
72 operating environment, such as the size
73 and location of temporary RAM, the stack
74 location and the BFV location. The type
75 EFI_SEC_PEI_HAND_OFF is
76
77 @param PpiList Points to a list of one or more PPI
78 descriptors to be installed initially by
79 the PEI core. An empty PPI list consists
80 of a single descriptor with the end-tag
81 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
82 As part of its initialization phase, the
83 PEI Foundation will add these SEC-hosted
84 PPIs to its PPI database such that both
85 the PEI Foundation and any modules can
86 leverage the associated service calls
87 and/or code in these early PPIs.
88
89 **/
90 VOID
91 EFIAPI
92 EfiMain (
93 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
94 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
95 )
96 {
97 _ModuleEntryPoint (SecCoreData, PpiList);
98 }