]> git.proxmox.com Git - mirror_edk2.git/blob - QuarkSocPkg/QuarkNorthCluster/S3Support/Dxe/QncS3Support.h
QuarkSocPkg: Add new package for Quark SoC X1000
[mirror_edk2.git] / QuarkSocPkg / QuarkNorthCluster / S3Support / Dxe / QncS3Support.h
1 /** @file
2 Header file for QNC S3 Support driver
3
4 This file includes package header files, library classes and protocol, PPI & GUID definitions.
5
6 Copyright (c) 2013-2015 Intel Corporation.
7
8 This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
12
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 **/
16
17 #ifndef _QNC_S3_SUPPORT_H_
18 #define _QNC_S3_SUPPORT_H_
19
20 //
21 // External include files do NOT need to be explicitly specified in real EDKII
22 // environment
23 //
24 //
25 // Driver Consumed Protocol Prototypes
26 //
27 #include <Protocol/FirmwareVolume2.h>
28 #include <Library/UefiLib.h>
29 #include <Library/IoLib.h>
30 #include <Library/DebugLib.h>
31 #include <Library/DxeServicesLib.h>
32 #include <Library/S3BootScriptLib.h>
33 #include <Library/BaseMemoryLib.h>
34 #include <Library/PeCoffLib.h>
35 #include <Library/LockBoxLib.h>
36 #include <Library/UefiDriverEntryPoint.h>
37 #include <Library/UefiBootServicesTableLib.h>
38 #include <Library/UefiRuntimeServicesTableLib.h>
39 //
40 // Driver Produced Protocol Prototypes
41 //
42 #include <Protocol/LoadedImage.h>
43 #include <Protocol/QncS3Support.h>
44
45 #include <Library/CacheMaintenanceLib.h>
46 #include <Library/IntelQNCLib.h>
47 //
48 // Define the header of the context region.
49 //
50 typedef struct {
51 UINT32 MaxContexts;
52 UINT32 StorePosition;
53 EFI_DISPATCH_CONTEXT_UNION Contexts[1];
54 } QNC_S3_PARAMETER_HEADER;
55 //
56 // Function prototypes
57 //
58 EFI_STATUS
59 EFIAPI
60 QncS3SetDispatchItem (
61 IN EFI_QNC_S3_SUPPORT_PROTOCOL *This,
62 IN EFI_QNC_S3_DISPATCH_ITEM *DispatchItem,
63 OUT VOID **S3DispatchEntryPoint,
64 OUT VOID **Context
65 )
66 /*++
67
68 Routine Description:
69
70 Set an item to be dispatched at S3 resume time. At the same time, the entry point
71 of the QNC S3 support image is returned to be used in subsequent boot script save
72 call
73
74 Arguments:
75
76 This - Pointer to the protocol instance.
77 DispatchItem - The item to be dispatched.
78 S3DispatchEntryPoint - The entry point of the QNC S3 support image.
79
80 Returns:
81
82 EFI_STATUS - Successfully completed.
83 EFI_OUT_OF_RESOURCES - Out of resources.
84
85 --*/
86 ;
87
88 EFI_STATUS
89 LoadQncS3Image (
90 IN EFI_SYSTEM_TABLE *SystemTable
91 )
92 /*++
93
94 Routine Description:
95
96 Load the QNC S3 Image into Efi Reserved Memory below 4G.
97
98 Arguments:
99
100 ImageEntryPoint the ImageEntryPoint after success loading
101
102 Returns:
103
104 EFI_STATUS
105
106 --*/
107 ;
108
109 EFI_STATUS
110 QncS3InitPcieRootPortDownstream (
111 IN EFI_HANDLE ImageHandle,
112 IN VOID *Context
113 );
114
115 VOID
116 EFIAPI
117 QncS3BootEvent (
118 IN EFI_EVENT Event,
119 IN VOID *Context
120 );
121
122
123 #endif