Skip to contentSkip to conversation

powerpc: Fix OF parsing of 64 bits PCI addresses

PATCH Benjamin Herrenschmidt 2 participants 2 messages Jul 17, 2008 PowerPC

lore
Share & tools
lore
#0 lore raw

The OF parsing code for PCI addresses isn't always treating properly the address space indication 0b11 (ie. 0x3) as meaning 64 bits memory space.

This means that it fails to parse addresses for PCI BARs that have this encoding set by the firmware, which happens on some SLOF versions and breaks offb palette handling on Powerstation.

---

arch/powerpc/kernel/pci-common.c +1 -0
Index: linux-work/arch/powerpc/kernel/pci-common.c
===================================================================
@@ -598,6 +598,7 @@ void __devinit pci_process_bridge_OF_ran
 			res->start = pci_addr;
 			break;
 		case 2:		/* PCI Memory space */
+		case 3:		/* PCI 64 bits Memory space */
 			printk(KERN_INFO
 			       " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n",
 			       cpu_addr, cpu_addr + size - 1, pci_addr,
arch/powerpc/kernel/prom_parse.c +24 -20

61 lines not on this page · raw message

#1 lore raw
Quoted 9 lines

The OF parsing code for PCI addresses isn't always treating properly the address space indication 0b11 (ie. 0x3) as meaning 64 bits memory space.

This means that it fails to parse addresses for PCI BARs that have this encoding set by the firmware, which happens on some SLOF versions and breaks offb palette handling on Powerstation.

Looks good.

Segher