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