]>
Commit | Line | Data |
---|---|---|
e386b444 | 1 | /** @file\r |
2 | Entry point to a the PEI Core.\r | |
3 | \r | |
9095d37b | 4 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
e386b444 | 6 | \r |
7 | **/\r | |
8 | \r | |
c7d265a9 | 9 | #include <PiPei.h>\r |
c892d846 | 10 | \r |
c7d265a9 | 11 | //\r |
12 | // The Library classes this module produced\r | |
13 | //\r | |
14 | #include <Library/PeiCoreEntryPoint.h>\r | |
d00afc4e | 15 | #include <Library/BaseLib.h>\r |
f2084bda | 16 | #include <Library/DebugLib.h>\r |
e386b444 | 17 | \r |
18 | /**\r | |
71871514 | 19 | The entry point of PE/COFF Image for the PEI Core.\r |
c7d265a9 | 20 | \r |
71871514 | 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 | |
9095d37b LG |
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 | |
58380e9c | 38 | location.\r |
9095d37b LG |
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 | |
58380e9c | 43 | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r |
44 | As part of its initialization phase, the PEI Foundation will\r | |
9095d37b LG |
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 | |
58380e9c | 47 | service calls and/or code in these early PPIs.\r |
e386b444 | 48 | \r |
49 | **/\r | |
c7d265a9 | 50 | VOID\r |
9095d37b | 51 | EFIAPI\r |
2f88bd3a | 52 | _ModuleEntryPoint (\r |
c7d265a9 | 53 | IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r |
54 | IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
2f88bd3a | 55 | )\r |
e386b444 | 56 | {\r |
c7d265a9 | 57 | ProcessModuleEntryPointList (SecCoreData, PpiList, NULL);\r |
9095d37b | 58 | \r |
f2084bda | 59 | //\r |
60 | // Should never return\r | |
61 | //\r | |
2f88bd3a | 62 | ASSERT (FALSE);\r |
9095d37b | 63 | CpuDeadLoop ();\r |
e386b444 | 64 | }\r |
65 | \r | |
e386b444 | 66 | /**\r |
71871514 | 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 | |
9095d37b | 73 | the stack location and the BFV location.\r |
71871514 | 74 | \r |
75 | @param PpiList Points to a list of one or more PPI descriptors to be installed\r | |
9095d37b LG |
76 | initially by the PEI core. An empty PPI list consists of\r |
77 | a single descriptor with the end-tag\r | |
58380e9c | 78 | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r |
9095d37b LG |
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 | |
58380e9c | 82 | service calls and/or code in these early PPIs.\r |
e386b444 | 83 | \r |
84 | **/\r | |
c7d265a9 | 85 | VOID\r |
86 | EFIAPI\r | |
e386b444 | 87 | EfiMain (\r |
c7d265a9 | 88 | IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r |
89 | IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
e386b444 | 90 | )\r |
91 | {\r | |
c7d265a9 | 92 | _ModuleEntryPoint (SecCoreData, PpiList);\r |
e386b444 | 93 | }\r |