]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/PciBus: Change PCI_IO_DEVICE.RomSize to UINT32 type
authorRay Ni <ray.ni@intel.com>
Mon, 11 Feb 2019 05:11:57 +0000 (13:11 +0800)
committerRay Ni <ray.ni@intel.com>
Thu, 14 Feb 2019 06:56:56 +0000 (14:56 +0800)
Per PCI Spec, the option ROM BAR is 32bit so the maximum option ROM
size can be hold by UINT32 type.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.h
MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.h
MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c

index 693880285726d2b3ab9e7b7be2a762246571e88a..18d76ea965e1189ba5ff564ef731b4533b091cda 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header files and data structures needed by PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\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
@@ -237,7 +237,7 @@ struct _PCI_IO_DEVICE {
   //\r
   // The OptionRom Size\r
   //\r
-  UINT64                                    RomSize;\r
+  UINT32                                    RomSize;\r
 \r
   //\r
   // TRUE if all OpROM (in device or in platform specific position) have been processed\r
index ab791541c34d4054a933d7fab98f68d3194cc8b5..7fb8e596f535eab0bad31a05feba1c6126cfb449 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Supporting functions implementaion for PCI devices management.\r
 \r
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -259,7 +259,7 @@ RegisterPciDevice (
                                        );\r
       if (!EFI_ERROR (Status)) {\r
         PciIoDevice->EmbeddedRom    = FALSE;\r
-        PciIoDevice->RomSize        = PlatformOpRomSize;\r
+        PciIoDevice->RomSize        = (UINT32) PlatformOpRomSize;\r
         PciIoDevice->PciIo.RomSize  = PlatformOpRomSize;\r
         PciIoDevice->PciIo.RomImage = PlatformOpRomBuffer;\r
         //\r
@@ -285,7 +285,7 @@ RegisterPciDevice (
                                        );\r
       if (!EFI_ERROR (Status)) {\r
         PciIoDevice->EmbeddedRom    = FALSE;\r
-        PciIoDevice->RomSize        = PlatformOpRomSize;\r
+        PciIoDevice->RomSize        = (UINT32) PlatformOpRomSize;\r
         PciIoDevice->PciIo.RomSize  = PlatformOpRomSize;\r
         PciIoDevice->PciIo.RomImage = PlatformOpRomBuffer;\r
         //\r
index f44db01a9dea280f8eec49d09237c0da1f6fb3d2..f8ba34268112206c5d3aceb4e5e94f67e2e1b152 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PCI eunmeration implementation on entire PCI bus system for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -528,15 +528,15 @@ DetermineRootBridgeAttributes (
   @return Max size of option rom needed.\r
 \r
 **/\r
-UINT64\r
+UINT32\r
 GetMaxOptionRomSize (\r
   IN PCI_IO_DEVICE   *Bridge\r
   )\r
 {\r
   LIST_ENTRY      *CurrentLink;\r
   PCI_IO_DEVICE   *Temp;\r
-  UINT64          MaxOptionRomSize;\r
-  UINT64          TempOptionRomSize;\r
+  UINT32          MaxOptionRomSize;\r
+  UINT32          TempOptionRomSize;\r
 \r
   MaxOptionRomSize = 0;\r
 \r
index 2df1fb0b94168ccc320b3faac841c19c68c882c4..ed4c875d3638ef408c4bba2e3bb1752f3787264e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PCI bus enumeration logic function declaration for PCI bus module.\r
 \r
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\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
@@ -109,7 +109,7 @@ DetermineRootBridgeAttributes (
   @return Max size of option rom needed.\r
 \r
 **/\r
-UINT64\r
+UINT32\r
 GetMaxOptionRomSize (\r
   IN PCI_IO_DEVICE   *Bridge\r
   );\r
index ee5c77147e4dd119240d53b47a089173c8f97242..cb9ef9c7d19ac9f3c8f1711ffe6d50f260164770 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Internal library implementation for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -415,7 +415,7 @@ PciHostBridgeResourceAllocator (
   UINT64                                         PMem32ResStatus;\r
   UINT64                                         Mem64ResStatus;\r
   UINT64                                         PMem64ResStatus;\r
-  UINT64                                         MaxOptionRomSize;\r
+  UINT32                                         MaxOptionRomSize;\r
   PCI_RESOURCE_NODE                              *IoBridge;\r
   PCI_RESOURCE_NODE                              *Mem32Bridge;\r
   PCI_RESOURCE_NODE                              *PMem32Bridge;\r