]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / PeiCoreEntryPoint / PeiCoreEntryPoint.c
... / ...
CommitLineData
1/** @file\r
2 Entry point to a the PEI Core.\r
3\r
4Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
5SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#include <PiPei.h>\r
10\r
11//\r
12// The Library classes this module produced\r
13//\r
14#include <Library/PeiCoreEntryPoint.h>\r
15#include <Library/BaseLib.h>\r
16#include <Library/DebugLib.h>\r
17\r
18/**\r
19 The entry point of PE/COFF Image for the PEI Core.\r
20\r
21 This function is the entry point for the PEI Foundation, which allows the SEC phase\r
22 to pass information about the stack, temporary RAM and the Boot Firmware Volume.\r
23 In addition, it also allows the SEC phase to pass services and data forward for use\r
24 during the PEI phase in the form of one or more PPIs.\r
25 There is no limit to the number of additional PPIs that can be passed from SEC into\r
26 the PEI Foundation. As part of its initialization phase, the PEI Foundation will add\r
27 these SEC-hosted PPIs to its PPI database such that both the PEI Foundation and any\r
28 modules can leverage the associated service calls and/or code in these early PPIs.\r
29 This function is required to call ProcessModuleEntryPointList() with the Context\r
30 parameter set to NULL. ProcessModuleEntryPoint() is never expected to return.\r
31 The PEI Core is responsible for calling ProcessLibraryConstructorList() as soon as\r
32 the PEI Services Table and the file handle for the PEI Core itself have been established.\r
33 If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.\r
34\r
35 @param SecCoreData Points to a data structure containing information about the\r
36 PEI core's operating environment, such as the size and\r
37 location of temporary RAM, the stack location and the BFV\r
38 location.\r
39\r
40 @param PpiList Points to a list of one or more PPI descriptors to be\r
41 installed initially by the PEI core. An empty PPI list\r
42 consists of a single descriptor with the end-tag\r
43 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r
44 As part of its initialization phase, the PEI Foundation will\r
45 add these SEC-hosted PPIs to its PPI database, such that both\r
46 the PEI Foundation and any modules can leverage the associated\r
47 service calls and/or code in these early PPIs.\r
48\r
49**/\r
50VOID\r
51EFIAPI\r
52_ModuleEntryPoint (\r
53 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
54 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r
55 )\r
56{\r
57 ProcessModuleEntryPointList (SecCoreData, PpiList, NULL);\r
58\r
59 //\r
60 // Should never return\r
61 //\r
62 ASSERT (FALSE);\r
63 CpuDeadLoop ();\r
64}\r
65\r
66/**\r
67 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r
68\r
69 This function is required to call _ModuleEntryPoint() passing in SecCoreData and PpiList.\r
70\r
71 @param SecCoreData Points to a data structure containing information about the PEI core's\r
72 operating environment, such as the size and location of temporary RAM,\r
73 the stack location and the BFV location.\r
74\r
75 @param PpiList Points to a list of one or more PPI descriptors to be installed\r
76 initially by the PEI core. An empty PPI list consists of\r
77 a single descriptor with the end-tag\r
78 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r
79 As part of its initialization phase, the PEI Foundation will\r
80 add these SEC-hosted PPIs to its PPI database, such that both\r
81 the PEI Foundationand any modules can leverage the associated\r
82 service calls and/or code in these early PPIs.\r
83\r
84**/\r
85VOID\r
86EFIAPI\r
87EfiMain (\r
88 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
89 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r
90 )\r
91{\r
92 _ModuleEntryPoint (SecCoreData, PpiList);\r
93}\r