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