]> git.proxmox.com Git - mirror_edk2.git/blobdiff - QuarkSocPkg/QuarkNorthCluster/S3Support/Dxe/QncS3Support.h
QuarkSocPkg: Add new package for Quark SoC X1000
[mirror_edk2.git] / QuarkSocPkg / QuarkNorthCluster / S3Support / Dxe / QncS3Support.h
diff --git a/QuarkSocPkg/QuarkNorthCluster/S3Support/Dxe/QncS3Support.h b/QuarkSocPkg/QuarkNorthCluster/S3Support/Dxe/QncS3Support.h
new file mode 100644 (file)
index 0000000..140167e
--- /dev/null
@@ -0,0 +1,123 @@
+/** @file\r
+Header file for QNC S3 Support driver\r
+\r
+This file includes package header files, library classes and protocol, PPI & GUID definitions.\r
+\r
+Copyright (c) 2013-2015 Intel Corporation.\r
+\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
+\r
+#ifndef _QNC_S3_SUPPORT_H_\r
+#define _QNC_S3_SUPPORT_H_\r
+\r
+//\r
+// External include files do NOT need to be explicitly specified in real EDKII\r
+// environment\r
+//\r
+//\r
+// Driver Consumed Protocol Prototypes\r
+//\r
+#include <Protocol/FirmwareVolume2.h>\r
+#include <Library/UefiLib.h>\r
+#include <Library/IoLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/DxeServicesLib.h>\r
+#include <Library/S3BootScriptLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/PeCoffLib.h>\r
+#include <Library/LockBoxLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiRuntimeServicesTableLib.h>\r
+//\r
+// Driver Produced Protocol Prototypes\r
+//\r
+#include <Protocol/LoadedImage.h>\r
+#include <Protocol/QncS3Support.h>\r
+\r
+#include <Library/CacheMaintenanceLib.h>\r
+#include <Library/IntelQNCLib.h>\r
+//\r
+// Define the header of the context region.\r
+//\r
+typedef struct {\r
+  UINT32                      MaxContexts;\r
+  UINT32                      StorePosition;\r
+  EFI_DISPATCH_CONTEXT_UNION  Contexts[1];\r
+} QNC_S3_PARAMETER_HEADER;\r
+//\r
+// Function prototypes\r
+//\r
+EFI_STATUS\r
+EFIAPI\r
+QncS3SetDispatchItem (\r
+  IN     EFI_QNC_S3_SUPPORT_PROTOCOL   *This,\r
+  IN     EFI_QNC_S3_DISPATCH_ITEM      *DispatchItem,\r
+  OUT    VOID                          **S3DispatchEntryPoint,\r
+  OUT    VOID                          **Context\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Set an item to be dispatched at S3 resume time. At the same time, the entry point\r
+  of the QNC S3 support image is returned to be used in subsequent boot script save\r
+  call\r
+\r
+Arguments:\r
+\r
+  This                    - Pointer to the protocol instance.\r
+  DispatchItem            - The item to be dispatched.\r
+  S3DispatchEntryPoint    - The entry point of the QNC S3 support image.\r
+\r
+Returns:\r
+\r
+  EFI_STATUS              - Successfully completed.\r
+  EFI_OUT_OF_RESOURCES    - Out of resources.\r
+\r
+--*/\r
+;\r
+\r
+EFI_STATUS\r
+LoadQncS3Image (\r
+  IN  EFI_SYSTEM_TABLE   *SystemTable\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Load the QNC S3 Image into Efi Reserved Memory below 4G.\r
+\r
+Arguments:\r
+\r
+  ImageEntryPoint     the ImageEntryPoint after success loading\r
+\r
+Returns:\r
+\r
+  EFI_STATUS\r
+\r
+--*/\r
+;\r
+\r
+EFI_STATUS\r
+QncS3InitPcieRootPortDownstream (\r
+  IN EFI_HANDLE ImageHandle,\r
+  IN VOID       *Context\r
+  );\r
+\r
+VOID\r
+EFIAPI\r
+QncS3BootEvent (\r
+  IN EFI_EVENT    Event,\r
+  IN VOID         *Context\r
+  );\r
+\r
+\r
+#endif\r