Commit | Line | Data |
---|---|---|
9b6bbcdb MK |
1 | /** @file\r |
2 | This file defines the QNC S3 support Protocol.\r | |
3 | \r | |
4 | Copyright (c) 2013-2015 Intel Corporation.\r | |
5 | \r | |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT 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 | |
22 | extern EFI_GUID gEfiQncS3SupportProtocolGuid;\r | |
23 | \r | |
24 | //\r | |
25 | // Forward reference for ANSI C compatibility\r | |
26 | //\r | |
27 | typedef struct _EFI_QNC_S3_SUPPORT_PROTOCOL EFI_QNC_S3_SUPPORT_PROTOCOL;\r | |
28 | \r | |
29 | typedef 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 | |
38 | typedef struct {\r | |
39 | UINT32 Reserved;\r | |
40 | } EFI_QNC_S3_PARAMETER_INIT_PCIE_ROOT_PORT_DOWNSTREAM;\r | |
41 | \r | |
42 | typedef union {\r | |
43 | EFI_QNC_S3_PARAMETER_INIT_PCIE_ROOT_PORT_DOWNSTREAM PcieRootPortData;\r | |
44 | } EFI_DISPATCH_CONTEXT_UNION;\r | |
45 | \r | |
46 | typedef 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 | |
54 | typedef\r | |
55 | EFI_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 | |
65 | Routine 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 | |
71 | Arguments:\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 | |
77 | Returns:\r | |
78 | \r | |
79 | EFI_STATUS\r | |
80 | \r | |
81 | --*/\r | |
82 | \r | |
83 | //\r | |
84 | // Protocol definition\r | |
85 | //\r | |
86 | struct _EFI_QNC_S3_SUPPORT_PROTOCOL {\r | |
87 | EFI_QNC_S3_SUPPORT_SET_S3_DISPATCH_ITEM SetDispatchItem;\r | |
88 | };\r | |
89 | \r | |
90 | #endif\r |