]> git.proxmox.com Git - mirror_edk2.git/blame - QuarkSocPkg/QuarkNorthCluster/Include/Protocol/QncS3Support.h
QuarkSocPkg: Add new package for Quark SoC X1000
[mirror_edk2.git] / QuarkSocPkg / QuarkNorthCluster / Include / Protocol / QncS3Support.h
CommitLineData
9b6bbcdb
MK
1/** @file\r
2This file defines the QNC S3 support Protocol.\r
3\r
4Copyright (c) 2013-2015 Intel Corporation.\r
5\r
6This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14\r
15**/\r
16#ifndef _QNC_S3_SUPPORT_PROTOCOL_H_\r
17#define _QNC_S3_SUPPORT_PROTOCOL_H_\r
18\r
19//\r
20// Extern the GUID for protocol users.\r
21//\r
22extern EFI_GUID gEfiQncS3SupportProtocolGuid;\r
23\r
24//\r
25// Forward reference for ANSI C compatibility\r
26//\r
27typedef struct _EFI_QNC_S3_SUPPORT_PROTOCOL EFI_QNC_S3_SUPPORT_PROTOCOL;\r
28\r
29typedef enum {\r
30 QncS3ItemTypeInitPcieRootPortDownstream,\r
31 QncS3ItemTypeMax\r
32} EFI_QNC_S3_DISPATCH_ITEM_TYPE;\r
33\r
34//\r
35// It's better not to use pointer here because the size of pointer in DXE is 8, but it's 4 in PEI\r
36// plug 4 to ParameterSize in PEIM if you really need it\r
37//\r
38typedef struct {\r
39 UINT32 Reserved;\r
40} EFI_QNC_S3_PARAMETER_INIT_PCIE_ROOT_PORT_DOWNSTREAM;\r
41\r
42typedef union {\r
43 EFI_QNC_S3_PARAMETER_INIT_PCIE_ROOT_PORT_DOWNSTREAM PcieRootPortData;\r
44} EFI_DISPATCH_CONTEXT_UNION;\r
45\r
46typedef struct {\r
47 EFI_QNC_S3_DISPATCH_ITEM_TYPE Type;\r
48 VOID *Parameter;\r
49} EFI_QNC_S3_DISPATCH_ITEM;\r
50\r
51//\r
52// Member functions\r
53//\r
54typedef\r
55EFI_STATUS\r
56(EFIAPI *EFI_QNC_S3_SUPPORT_SET_S3_DISPATCH_ITEM) (\r
57 IN EFI_QNC_S3_SUPPORT_PROTOCOL * This,\r
58 IN EFI_QNC_S3_DISPATCH_ITEM * DispatchItem,\r
59 OUT VOID **S3DispatchEntryPoint,\r
60 OUT VOID **Context\r
61 );\r
62\r
63/*++\r
64\r
65Routine Description:\r
66\r
67 Set an item to be dispatched at S3 resume time. At the same time, the entry point\r
68 of the QNC S3 support image is returned to be used in subsequent boot script save\r
69 call\r
70\r
71Arguments:\r
72\r
73 This - Pointer to the protocol instance.\r
74 DispatchItem - The item to be dispatched.\r
75 S3DispatchEntryPoint - The entry point of the QNC S3 support image.\r
76\r
77Returns:\r
78\r
79 EFI_STATUS\r
80\r
81--*/\r
82\r
83//\r
84// Protocol definition\r
85//\r
86struct _EFI_QNC_S3_SUPPORT_PROTOCOL {\r
87 EFI_QNC_S3_SUPPORT_SET_S3_DISPATCH_ITEM SetDispatchItem;\r
88};\r
89\r
90#endif\r