Patchwork [Fwd:,Re:,[Fwd:,Re:,[Fwd:,Re:,arima,hdama,problem] ]]

login
register
about
Submitter Myles Watson
Date 2009-11-04 17:33:54
Message ID <2831fecf0911040933s95a5bc9ja750ce221132a26f@mail.gmail.com>
Download mbox | patch
Permalink /patch/533/
State Superseded
Headers show

Comments

Myles Watson - 2009-11-04 17:33:54
Here's a patch that will either work or help us figure out what's going
wrong.

Signed-off-by: Myles Watson <mylesgw@gmail.com>

Thanks,
Myles
Hugh Greenberg - 2009-11-04 18:06:30
Myles,

It worked.  Coreboot boots with SB_HT_CHAIN_ON_BUS_0 set to one and the 
previous patch.  Seabios also detects the network devices without 
setting CONFIG_PCI_ROOT1 to 0x02.  Attached is the output.  Seabios was 
compiled with DEBUG_LEVEL set to 8.

Patch

Index: svn/src/mainboard/arima/hdama/mptable.c
===================================================================
--- svn.orig/src/mainboard/arima/hdama/mptable.c
+++ svn/src/mainboard/arima/hdama/mptable.c
@@ -327,16 +327,21 @@  void reboot_if_hotswap(void)
 	int reset;
 	int i;
 
+	unsigned char bus_chain_0 = node_link_to_bus(0, 0);
 	reset = 0;
 	printk_debug("Looking for bad PCIX MHz input\n");
-	dev = dev_find_slot(1, PCI_DEVFN(0x02,0));
+	dev = dev_find_slot(bus_chain_0, PCI_DEVFN(0x02,0));
+	if (!dev)
+		printk_debug("Couldn't find %02x:02.0 \n", bus_chain_0);
 	data = pci_read_config32(dev, 0xa0);
 	if(!(((data>>16)&0x03)==0x03)) {
 		reset=1;
 		printk_debug("Bad PCIX MHz - Reset\n");
 	}
 	printk_debug("Looking for bad Hot Swap Enable\n");
-	dev = dev_find_slot(1, PCI_DEVFN(0x01,0));
+	dev = dev_find_slot(bus_chain_0, PCI_DEVFN(0x01,0));
+	if (!dev)
+		printk_debug("Couldn't find %02x:01.0 \n", bus_chain_0);
 	data = pci_read_config32(dev, 0x48);
 	if(data & 0x0c) {
 		reset=1;