]> git.proxmox.com Git - mirror_edk2.git/blob - QuarkSocPkg/QuarkNorthCluster/Include/Protocol/QncS3Support.h
QuarkSocPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / QuarkSocPkg / QuarkNorthCluster / Include / Protocol / QncS3Support.h
1 /** @file
2 This file defines the QNC S3 support Protocol.
3
4 Copyright (c) 2013-2015 Intel Corporation.
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8
9 **/
10 #ifndef _QNC_S3_SUPPORT_PROTOCOL_H_
11 #define _QNC_S3_SUPPORT_PROTOCOL_H_
12
13 //
14 // Extern the GUID for protocol users.
15 //
16 extern EFI_GUID gEfiQncS3SupportProtocolGuid;
17
18 //
19 // Forward reference for ANSI C compatibility
20 //
21 typedef struct _EFI_QNC_S3_SUPPORT_PROTOCOL EFI_QNC_S3_SUPPORT_PROTOCOL;
22
23 typedef enum {
24 QncS3ItemTypeInitPcieRootPortDownstream,
25 QncS3ItemTypeMax
26 } EFI_QNC_S3_DISPATCH_ITEM_TYPE;
27
28 //
29 // It's better not to use pointer here because the size of pointer in DXE is 8, but it's 4 in PEI
30 // plug 4 to ParameterSize in PEIM if you really need it
31 //
32 typedef struct {
33 UINT32 Reserved;
34 } EFI_QNC_S3_PARAMETER_INIT_PCIE_ROOT_PORT_DOWNSTREAM;
35
36 typedef union {
37 EFI_QNC_S3_PARAMETER_INIT_PCIE_ROOT_PORT_DOWNSTREAM PcieRootPortData;
38 } EFI_DISPATCH_CONTEXT_UNION;
39
40 typedef struct {
41 EFI_QNC_S3_DISPATCH_ITEM_TYPE Type;
42 VOID *Parameter;
43 } EFI_QNC_S3_DISPATCH_ITEM;
44
45 //
46 // Member functions
47 //
48 typedef
49 EFI_STATUS
50 (EFIAPI *EFI_QNC_S3_SUPPORT_SET_S3_DISPATCH_ITEM) (
51 IN EFI_QNC_S3_SUPPORT_PROTOCOL * This,
52 IN EFI_QNC_S3_DISPATCH_ITEM * DispatchItem,
53 OUT VOID **S3DispatchEntryPoint,
54 OUT VOID **Context
55 );
56
57 /*++
58
59 Routine Description:
60
61 Set an item to be dispatched at S3 resume time. At the same time, the entry point
62 of the QNC S3 support image is returned to be used in subsequent boot script save
63 call
64
65 Arguments:
66
67 This - Pointer to the protocol instance.
68 DispatchItem - The item to be dispatched.
69 S3DispatchEntryPoint - The entry point of the QNC S3 support image.
70
71 Returns:
72
73 EFI_STATUS
74
75 --*/
76
77 //
78 // Protocol definition
79 //
80 struct _EFI_QNC_S3_SUPPORT_PROTOCOL {
81 EFI_QNC_S3_SUPPORT_SET_S3_DISPATCH_ITEM SetDispatchItem;
82 };
83
84 #endif