5 Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved
7 This program and the accompanying materials are licensed and made available under
8 the terms and conditions of the BSD License that accompanies this distribution.
9 The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php.
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 This file defines the PCH S3 support Protocol.
24 #ifndef _PCH_S3_SUPPORT_PROTOCOL_H_
25 #define _PCH_S3_SUPPORT_PROTOCOL_H_
28 #include <Pi/PiS3BootScript.h>
31 #define EFI_PCH_S3_SUPPORT_PROTOCOL_GUID \
33 0xe287d20b, 0xd897, 0x4e1e, 0xa5, 0xd9, 0x97, 0x77, 0x63, 0x93, 0x6a, 0x4 \
36 #include <Protocol/PchPlatformPolicy.h>
39 /// Extern the GUID for protocol users.
41 extern EFI_GUID gEfiPchS3SupportProtocolGuid
;
44 /// Forward reference for ANSI C compatibility
46 typedef struct _EFI_PCH_S3_SUPPORT_PROTOCOL EFI_PCH_S3_SUPPORT_PROTOCOL
;
49 PchS3ItemTypeSendCodecCommand
,
50 PchS3ItemTypePollStatus
,
51 PchS3ItemTypeInitPcieRootPortDownstream
,
52 PchS3ItemTypePcieSetPm
,
53 PchS3ItemTypePmTimerStall
,
55 } EFI_PCH_S3_DISPATCH_ITEM_TYPE
;
58 /// It's better not to use pointer here because the size of pointer in DXE is 8, but it's 4 in PEI
59 /// plug 4 to ParameterSize in PEIM if you really need it
64 } EFI_PCH_S3_PARAMETER_SEND_CODEC_COMMAND
;
68 EFI_BOOT_SCRIPT_WIDTH Width
;
72 } EFI_PCH_S3_PARAMETER_POLL_STATUS
;
78 UINT8 TempBusNumberMin
;
79 UINT8 TempBusNumberMax
;
80 } EFI_PCH_S3_PARAMETER_INIT_PCIE_ROOT_PORT_DOWNSTREAM
;
86 PCH_PCI_EXPRESS_ASPM_CONTROL RootPortAspm
;
87 UINT8 NumOfDevAspmOverride
;
88 UINT32 DevAspmOverrideAddr
;
89 UINT8 TempBusNumberMin
;
90 UINT8 TempBusNumberMax
;
91 UINT8 NumOfDevLtrOverride
;
92 UINT32 DevLtrOverrideAddr
;
93 } EFI_PCH_S3_PARAMETER_PCIE_SET_PM
;
96 UINT32 DelayTime
; // us
97 } EFI_PCH_S3_PARAMETER_PM_TIMER_STALL
;
100 EFI_PCH_S3_DISPATCH_ITEM_TYPE Type
;
102 } EFI_PCH_S3_DISPATCH_ITEM
;
109 (EFIAPI
*EFI_PCH_S3_SUPPORT_SET_S3_DISPATCH_ITEM
) (
110 IN EFI_PCH_S3_SUPPORT_PROTOCOL
* This
,
111 IN EFI_PCH_S3_DISPATCH_ITEM
* DispatchItem
,
112 OUT EFI_PHYSICAL_ADDRESS
* S3DispatchEntryPoint
118 Set an item to be dispatched at S3 resume time. At the same time, the entry point
119 of the PCH S3 support image is returned to be used in subsequent boot script save
122 @param[in] This Pointer to the protocol instance.
123 @param[in] DispatchItem The item to be dispatched.
124 @param[in] S3DispatchEntryPoint The entry point of the PCH S3 support image.
126 @retval EFI_STATUS Successfully completed.
127 @retval EFI_OUT_OF_RESOURCES Out of resources.
132 /// Protocol definition
134 struct _EFI_PCH_S3_SUPPORT_PROTOCOL
{
135 EFI_PCH_S3_SUPPORT_SET_S3_DISPATCH_ITEM SetDispatchItem
;