[coreboot] Patch set updated for coreboot: 8e0e8bc Reverse Vendor ID & Device ID for map_oprom_vendev()

Martin Roth (martin@se-eng.com) gerrit at coreboot.org
Fri Apr 27 17:23:47 CEST 2012


Martin Roth (martin at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/938

-gerrit

commit 8e0e8bc705bcf1394c1b0e2fb2144f08fada8803
Author: Martin Roth <martin at se-eng.com>
Date:   Thu Apr 26 16:04:18 2012 -0600

    Reverse Vendor ID & Device ID for map_oprom_vendev()
    
    - When calling map_oprom_vendev() the vendor ID and device ID
      are joined into a 32 bit value.  They were reversed from the
      order that I would have expected - Device ID as the high 16 bits
      and the Vendor ID as the low 16.  This patch reverses them so
      so that the the dword comparison in map_oprom_vendev() matches
      what's entered into Kconfig for vendor,device.
    - Change files calling map_oprom_vendev()
    
    Change-Id: I5b84db3cb1a359a7533409fde7d05fbc6ba3fcc4
    Signed-off-by: Martin L Roth <martin at se-eng.com>
---
 src/devices/pci_rom.c                   |    6 +++---
 src/northbridge/intel/sandybridge/gma.c |   16 ++++++++--------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c
index 800776e..e7933eb 100644
--- a/src/devices/pci_rom.c
+++ b/src/devices/pci_rom.c
@@ -37,7 +37,7 @@ struct rom_header *pci_rom_probe(struct device *dev)
 	/* If it's in FLASH, then don't check device for ROM. */
 	rom_header = cbfs_load_optionrom(dev->vendor, dev->device, NULL);
 
-	u32 vendev = dev->vendor | (dev->device << 16);
+	u32 vendev = (dev->vendor << 16) | dev->device;
 	u32 mapped_vendev = vendev;
 
 	if (map_oprom_vendev)
@@ -45,8 +45,8 @@ struct rom_header *pci_rom_probe(struct device *dev)
 
 	if (!rom_header) {
 		if (vendev != mapped_vendev) {
-			rom_header = cbfs_load_optionrom(mapped_vendev &
-					0xffff, mapped_vendev >> 16, NULL);
+			rom_header = cbfs_load_optionrom(mapped_vendev >> 16,
+					mapped_vendev & 0xffff , NULL);
 		}
 	}
 
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index 00b5957..4aabb75 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -37,14 +37,14 @@ u32 map_oprom_vendev(u32 vendev)
 	u32 new_vendev=vendev;
 
 	switch (vendev) {
-	case 0x01028086:		/* GT1 Desktop */
-	case 0x010a8086:		/* GT1 Server */
-	case 0x01128086:		/* GT2 Desktop */
-	case 0x01168086:		/* GT2 Mobile */
-	case 0x01228086:		/* GT2 Desktop >=1.3GHz */
-	case 0x01268086:		/* GT2 Mobile >=1.3GHz */
-	case 0x01668086:                /* IVB */
-		new_vendev=0x01068086;	/* GT1 Mobile */
+	case 0x80860102:		/* GT1 Desktop */
+	case 0x8086010a:		/* GT1 Server */
+	case 0x80860112:		/* GT2 Desktop */
+	case 0x80860116:		/* GT2 Mobile */
+	case 0x80860122:		/* GT2 Desktop >=1.3GHz */
+	case 0x80860126:		/* GT2 Mobile >=1.3GHz */
+	case 0x80860166:                /* IVB */
+		new_vendev=0x80860106;	/* GT1 Mobile */
 		break;
 	}
 




More information about the coreboot mailing list