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