]>
Commit | Line | Data |
---|---|---|
a33a2f62 JY |
1 | /** @file\r |
2 | In EndOfPei notify, it will call FspNotifyPhase API.\r | |
3 | \r | |
d8043ce9 | 4 | Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r |
a33a2f62 JY |
5 | This program and the accompanying materials\r |
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 | |
8 | http://opensource.org/licenses/bsd-license.php.\r | |
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 | |
15 | \r | |
16 | #include "FspInitPei.h"\r | |
17 | \r | |
18 | /**\r | |
19 | This function handles S3 resume task at the end of PEI\r | |
20 | \r | |
21 | @param[in] PeiServices Pointer to PEI Services Table.\r | |
22 | @param[in] NotifyDesc Pointer to the descriptor for the Notification event that\r | |
23 | caused this function to execute.\r | |
24 | @param[in] Ppi Pointer to the PPI data associated with this function.\r | |
25 | \r | |
26 | @retval EFI_STATUS Always return EFI_SUCCESS\r | |
27 | **/\r | |
28 | EFI_STATUS\r | |
29 | EFIAPI\r | |
30 | S3EndOfPeiNotify (\r | |
31 | IN EFI_PEI_SERVICES **PeiServices,\r | |
32 | IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,\r | |
33 | IN VOID *Ppi\r | |
34 | );\r | |
35 | \r | |
36 | EFI_PEI_NOTIFY_DESCRIPTOR mS3EndOfPeiNotifyDesc = {\r | |
37 | (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r | |
38 | &gEfiEndOfPeiSignalPpiGuid,\r | |
39 | S3EndOfPeiNotify\r | |
40 | };\r | |
41 | \r | |
42 | /**\r | |
43 | This function handles S3 resume task at the end of PEI\r | |
44 | \r | |
45 | @param[in] PeiServices Pointer to PEI Services Table.\r | |
46 | @param[in] NotifyDesc Pointer to the descriptor for the Notification event that\r | |
47 | caused this function to execute.\r | |
48 | @param[in] Ppi Pointer to the PPI data associated with this function.\r | |
49 | \r | |
50 | @retval EFI_STATUS Always return EFI_SUCCESS\r | |
51 | **/\r | |
52 | EFI_STATUS\r | |
53 | EFIAPI\r | |
54 | S3EndOfPeiNotify (\r | |
55 | IN EFI_PEI_SERVICES **PeiServices,\r | |
56 | IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,\r | |
57 | IN VOID *Ppi\r | |
58 | )\r | |
59 | {\r | |
60 | NOTIFY_PHASE_PARAMS NotifyPhaseParams;\r | |
d8043ce9 | 61 | EFI_STATUS Status;\r |
a33a2f62 JY |
62 | FSP_INFO_HEADER *FspHeader;\r |
63 | \r | |
64 | FspHeader = FspFindFspHeader (PcdGet32 (PcdFlashFvFspBase));\r | |
65 | if (FspHeader == NULL) {\r | |
66 | return EFI_DEVICE_ERROR;\r | |
67 | }\r | |
d8043ce9 JY |
68 | \r |
69 | DEBUG ((DEBUG_INFO, "S3EndOfPeiNotify enter\n"));\r | |
70 | \r | |
a33a2f62 | 71 | NotifyPhaseParams.Phase = EnumInitPhaseAfterPciEnumeration;\r |
d8043ce9 JY |
72 | Status = CallFspNotifyPhase (FspHeader, &NotifyPhaseParams);\r |
73 | DEBUG((DEBUG_INFO, "FSP S3NotifyPhase AfterPciEnumeration status: 0x%x\n", Status));\r | |
a33a2f62 JY |
74 | \r |
75 | NotifyPhaseParams.Phase = EnumInitPhaseReadyToBoot;\r | |
d8043ce9 JY |
76 | Status = CallFspNotifyPhase (FspHeader, &NotifyPhaseParams);\r |
77 | DEBUG((DEBUG_INFO, "FSP S3NotifyPhase ReadyToBoot status: 0x%x\n", Status));\r | |
a33a2f62 JY |
78 | \r |
79 | return EFI_SUCCESS;\r | |
80 | }\r |