]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/PiDxeS3BootScriptLib/InternalBootScriptLib.h
MdeModulePkg/BmpSupportLib: Check PixelHeight/PixelWidth against 0
[mirror_edk2.git] / MdeModulePkg / Library / PiDxeS3BootScriptLib / InternalBootScriptLib.h
index e54027848346f9e81a270da652088aab398285ea..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 - 2015, 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
@@ -33,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
@@ -73,8 +75,8 @@ typedef union {
 //\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
+  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