]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/PiDxeS3BootScriptLib/InternalBootScriptLib.h
MdeModulePkg/NetLib: Use StrToIpv4/6Address in BaseLib
[mirror_edk2.git] / MdeModulePkg / Library / PiDxeS3BootScriptLib / InternalBootScriptLib.h
index 3e2a0d2bacf5d451023a3ac984d8e9600fdb79fa..ffbf5d2688daf004b2283e7d11d55850c0756881 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
-  Support for S3 boot script lib. This file defined some internal macro and internal \r
+  Support for S3 boot script lib. This file defined some internal macro and internal\r
   data structure\r
\r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+\r
+  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions\r
@@ -23,6 +23,8 @@
 #include <Protocol/SmmBase2.h>\r
 #include <Protocol/DxeSmmReadyToLock.h>\r
 #include <Protocol/SmmReadyToLock.h>\r
+#include <Protocol/SmmExitBootServices.h>\r
+#include <Protocol/SmmLegacyBoot.h>\r
 \r
 #include <Library/S3BootScriptLib.h>\r
 \r
@@ -31,7 +33,7 @@
 #include <Library/PcdLib.h>\r
 #include <Library/SmbusLib.h>\r
 #include <Library/IoLib.h>\r
-#include <Library/PciLib.h>\r
+#include <Library/PciSegmentLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/TimerLib.h>\r
 #define MAX_IO_ADDRESS 0xFFFF\r
 \r
 //\r
-// Macro to convert a UEFI PCI address to a PCI Library PCI address\r
+// Macro to convert a UEFI PCI address + segment to a PCI Segment Library PCI address\r
 //\r
-#define PCI_ADDRESS_ENCODE(A) (UINTN)PCI_LIB_ADDRESS( \\r
-        ((((UINTN)(A))& 0xff000000) >> 24), ((((UINTN)(A)) &0x00ff0000) >> 16), ((((UINTN)(A)) & 0xff00) >> 8), ((RShiftU64 ((A), 32) & 0xfff) | ((A)& 0xff)) \\r
-        )\r
-        \r
-\r
+#define PCI_ADDRESS_ENCODE(S, A) PCI_SEGMENT_LIB_ADDRESS( \\r
+                                   S, \\r
+                                   ((((UINTN)(A)) & 0xff000000) >> 24), \\r
+                                   ((((UINTN)(A)) & 0x00ff0000) >> 16), \\r
+                                   ((((UINTN)(A)) & 0xff00) >> 8), \\r
+                                   ((RShiftU64 ((A), 32) & 0xfff) | ((A) & 0xff)) \\r
+                                   )\r
 \r
 typedef union {\r
   UINT8 volatile  *Buf;\r
@@ -70,11 +74,14 @@ typedef union {
 // The boot script private data.\r
 //\r
 typedef struct {\r
-  UINT8           *TableBase;\r
-  UINT32          TableLength;               // Record the actual memory length \r
-  UINT16          TableMemoryPageNumber;     // Record the page number Allocated for the table \r
-  BOOLEAN         AtRuntime;                 // Record if current state is after SmmReadyToLock\r
-  BOOLEAN         InSmm;                     // Record if this library is in SMM.\r
+  UINT8     *TableBase;\r
+  UINT32    TableLength;            // Record the actual memory length\r
+  UINT16    TableMemoryPageNumber;  // Record the page number Allocated for the table\r
+  BOOLEAN   InSmm;                  // Record if this library is in SMM.\r
+  BOOLEAN   AtRuntime;              // Record if current state is after SmmExitBootServices or SmmLegacyBoot.\r
+  UINT32    BootTimeScriptLength;   // Maintain boot time script length in LockBox after SmmReadyToLock in SMM.\r
+  BOOLEAN   SmmLocked;              // Record if current state is after SmmReadyToLock\r
+  BOOLEAN   BackFromS3;             // Indicate that the system is back from S3.\r
 } SCRIPT_TABLE_PRIVATE_DATA;\r
 \r
 typedef\r