]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c
Function headers in .h and .c files synchronized with spec
[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 The entry point of PE/COFF Image for the PEI Core.
27
28 This function is the entry point for the PEI Foundation, which allows the SEC phase
29 to pass information about the stack, temporary RAM and the Boot Firmware Volume.
30 In addition, it also allows the SEC phase to pass services and data forward for use
31 during the PEI phase in the form of one or more PPIs.
32 There is no limit to the number of additional PPIs that can be passed from SEC into
33 the PEI Foundation. As part of its initialization phase, the PEI Foundation will add
34 these SEC-hosted PPIs to its PPI database such that both the PEI Foundation and any
35 modules can leverage the associated service calls and/or code in these early PPIs.
36 This function is required to call ProcessModuleEntryPointList() with the Context
37 parameter set to NULL. ProcessModuleEntryPoint() is never expected to return.
38 The PEI Core is responsible for calling ProcessLibraryConstructorList() as soon as
39 the PEI Services Table and the file handle for the PEI Core itself have been established.
40 If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.
41
42 @param SecCoreData Points to a data structure containing information about the PEI
43 core's operating environment, such as the size and location of
44 temporary RAM, the stack location and the BFV location.
45
46 @param PpiList Points to a list of one or more PPI descriptors to be installed
47 initially by the PEI core. An empty PPI list consists of a single
48 descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
49 As part of its initialization phase, the PEI Foundation will add
50 these SEC-hosted PPIs to its PPI database such that both the PEI
51 Foundation and any modules can leverage the associated service calls
52 and/or code in these early PPIs.
53
54 **/
55 VOID
56 EFIAPI
57 _ModuleEntryPoint(
58 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
59 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
60 )
61 {
62 ProcessModuleEntryPointList (SecCoreData, PpiList, NULL);
63
64 //
65 // Should never return
66 //
67 ASSERT(FALSE);
68 CpuDeadLoop ();
69 }
70
71
72 /**
73 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
74
75 This function is required to call _ModuleEntryPoint() passing in SecCoreData and PpiList.
76
77 @param SecCoreData Points to a data structure containing information about the PEI core's
78 operating environment, such as the size and location of temporary RAM,
79 the stack location and the BFV location.
80
81 @param PpiList Points to a list of one or more PPI descriptors to be installed
82 initially by the PEI core. An empty PPI list consists of a single
83 descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
84 As part of its initialization phase, the PEI Foundation will add these
85 SEC-hosted PPIs to its PPI database such that both the PEI Foundation
86 and any modules can leverage the associated service calls and/or code
87 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 }