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