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