]>
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 | |
c892d846 | 9 | \r |
c7d265a9 | 10 | #include <PiPei.h>\r |
c892d846 | 11 | \r |
c7d265a9 | 12 | //\r |
13 | // The Library classes this module produced\r | |
14 | //\r | |
15 | #include <Library/PeiCoreEntryPoint.h>\r | |
d00afc4e | 16 | #include <Library/BaseLib.h>\r |
f2084bda | 17 | #include <Library/DebugLib.h>\r |
e386b444 | 18 | \r |
19 | /**\r | |
71871514 | 20 | The entry point of PE/COFF Image for the PEI Core.\r |
c7d265a9 | 21 | \r |
71871514 | 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 | |
9095d37b LG |
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 | |
58380e9c | 39 | location.\r |
9095d37b LG |
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 | |
58380e9c | 44 | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r |
45 | As part of its initialization phase, the PEI Foundation will\r | |
9095d37b LG |
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 | |
58380e9c | 48 | service calls and/or code in these early PPIs.\r |
e386b444 | 49 | \r |
50 | **/\r | |
c7d265a9 | 51 | VOID\r |
9095d37b | 52 | EFIAPI\r |
c7d265a9 | 53 | _ModuleEntryPoint(\r |
54 | IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r | |
55 | IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
56 | )\r | |
e386b444 | 57 | {\r |
c7d265a9 | 58 | ProcessModuleEntryPointList (SecCoreData, PpiList, NULL);\r |
9095d37b | 59 | \r |
f2084bda | 60 | //\r |
61 | // Should never return\r | |
62 | //\r | |
63 | ASSERT(FALSE);\r | |
9095d37b | 64 | CpuDeadLoop ();\r |
e386b444 | 65 | }\r |
66 | \r | |
67 | \r | |
68 | /**\r | |
71871514 | 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 | |
9095d37b | 75 | the stack location and the BFV location.\r |
71871514 | 76 | \r |
77 | @param PpiList Points to a list of one or more PPI descriptors to be installed\r | |
9095d37b LG |
78 | initially by the PEI core. An empty PPI list consists of\r |
79 | a single descriptor with the end-tag\r | |
58380e9c | 80 | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r |
9095d37b LG |
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 | |
58380e9c | 84 | service calls and/or code in these early PPIs.\r |
e386b444 | 85 | \r |
86 | **/\r | |
c7d265a9 | 87 | VOID\r |
88 | EFIAPI\r | |
e386b444 | 89 | EfiMain (\r |
c7d265a9 | 90 | IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r |
91 | IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
e386b444 | 92 | )\r |
93 | {\r | |
c7d265a9 | 94 | _ModuleEntryPoint (SecCoreData, PpiList);\r |
e386b444 | 95 | }\r |