]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFspWrapperPkg/FspInitPei/FspNotifyS3.c
IntelFspWrapperPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFspWrapperPkg / FspInitPei / FspNotifyS3.c
CommitLineData
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
19486360 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
a33a2f62
JY
6\r
7**/\r
8\r
9\r
10#include "FspInitPei.h"\r
11\r
12/**\r
13 This function handles S3 resume task at the end of PEI\r
14\r
15 @param[in] PeiServices Pointer to PEI Services Table.\r
16 @param[in] NotifyDesc Pointer to the descriptor for the Notification event that\r
17 caused this function to execute.\r
18 @param[in] Ppi Pointer to the PPI data associated with this function.\r
19\r
20 @retval EFI_STATUS Always return EFI_SUCCESS\r
21**/\r
22EFI_STATUS\r
23EFIAPI\r
24S3EndOfPeiNotify (\r
25 IN EFI_PEI_SERVICES **PeiServices,\r
26 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,\r
27 IN VOID *Ppi\r
28 );\r
29\r
30EFI_PEI_NOTIFY_DESCRIPTOR mS3EndOfPeiNotifyDesc = {\r
31 (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
32 &gEfiEndOfPeiSignalPpiGuid,\r
33 S3EndOfPeiNotify\r
34};\r
35\r
36/**\r
37 This function handles S3 resume task at the end of PEI\r
38\r
39 @param[in] PeiServices Pointer to PEI Services Table.\r
40 @param[in] NotifyDesc Pointer to the descriptor for the Notification event that\r
41 caused this function to execute.\r
42 @param[in] Ppi Pointer to the PPI data associated with this function.\r
43\r
44 @retval EFI_STATUS Always return EFI_SUCCESS\r
45**/\r
46EFI_STATUS\r
47EFIAPI\r
48S3EndOfPeiNotify (\r
49 IN EFI_PEI_SERVICES **PeiServices,\r
50 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,\r
51 IN VOID *Ppi\r
52 )\r
53{\r
54 NOTIFY_PHASE_PARAMS NotifyPhaseParams;\r
d8043ce9 55 EFI_STATUS Status;\r
a33a2f62
JY
56 FSP_INFO_HEADER *FspHeader;\r
57\r
58 FspHeader = FspFindFspHeader (PcdGet32 (PcdFlashFvFspBase));\r
59 if (FspHeader == NULL) {\r
60 return EFI_DEVICE_ERROR;\r
61 }\r
d8043ce9
JY
62 \r
63 DEBUG ((DEBUG_INFO, "S3EndOfPeiNotify enter\n"));\r
64 \r
a33a2f62 65 NotifyPhaseParams.Phase = EnumInitPhaseAfterPciEnumeration;\r
d8043ce9
JY
66 Status = CallFspNotifyPhase (FspHeader, &NotifyPhaseParams);\r
67 DEBUG((DEBUG_INFO, "FSP S3NotifyPhase AfterPciEnumeration status: 0x%x\n", Status));\r
a33a2f62
JY
68\r
69 NotifyPhaseParams.Phase = EnumInitPhaseReadyToBoot;\r
d8043ce9
JY
70 Status = CallFspNotifyPhase (FspHeader, &NotifyPhaseParams);\r
71 DEBUG((DEBUG_INFO, "FSP S3NotifyPhase ReadyToBoot status: 0x%x\n", Status));\r
a33a2f62
JY
72\r
73 return EFI_SUCCESS;\r
74}\r