Patchworkβ Linux cannot bootable without old onboard pci driver on RS690 system.

login
register
about
Submitter 유택연
Date 2009-11-25 04:22:08
Message ID <efa814ff0911242022q4fa5547ei626b6d297d266729@mail.gmail.com>
Download mbox | patch
Permalink /patch/592/
State New
Headers show

Comments

유택연 - 2009-11-25 04:22:08
Hi,

Old the onboard pci driver is still seems to be needed as a dummy driver.
On RS690 based system like dbm690t and pistachio, linux kernel is
halted on scan PCI bus below 00:14:04 node.

This patch is tested under linux kernel version 2.6.37.36.
See attached patches.

jaagar
Myles Watson - 2009-11-25 14:23:41
> Old the onboard pci driver is still seems to be needed as a dummy driver.
> On RS690 based system like dbm690t and pistachio, linux kernel is
> halted on scan PCI bus below 00:14:04 node.

I think this is a symptom of a broken RS690 driver, although it may be
related to another problem.  The right way to fix it is to figure out why
it's needed, since it shouldn't be.  I think the most likely thing is that
the RS690 driver is trying to initialize the graphics device, and shouldn't.

If you need to add onboard for RS690 to work, lets add it in the RS690
directory.  It's not something that we want to resurrect.  

Thanks,
Myles
Myles Watson - 2009-11-26 15:54:40
> I think this is not caused by RS690, but seems to be related
> device-tree structure.
> Because the stopped point of linux kernel is the bus scan stage.
> Successful for RS690 tree, but halted at SB600's PCI bridge.
It seems like Zheng is having trouble at a different point.  Since you've
gotten it to work with the onboard driver, could you send the complete logs
with and without it?

> I know it is not proper solution that add the old onboard pci driver,
> but it is a temporary solution till we found the problem.
Since it's a temporary solution, lets add it somewhere local.

Thanks,
Myles
Peter Stuge - 2009-11-26 16:50:21
Hi,

Myles Watson wrote:
> > I think this is not caused by RS690, but seems to be related
> > device-tree structure.
> > Because the stopped point of linux kernel is the bus scan stage.
> > Successful for RS690 tree, but halted at SB600's PCI bridge.
> It seems like Zheng is having trouble at a different point.  Since you've
> gotten it to work with the onboard driver, could you send the complete logs
> with and without it?
> 
> > I know it is not proper solution that add the old onboard pci driver,
> > but it is a temporary solution till we found the problem.
> Since it's a temporary solution, lets add it somewhere local.

I created a ticket for the purpose:

http://tracker.coreboot.org/trac/coreboot/ticket/147


//Peter
유택연 - 2009-11-27 02:24:33
I troubled at the same point with Zheng.

See Zheng's the first message titled "r4925 makes my linux hang".
My system halted the same point of Zheng's log file "r4925_error_log.log".

I cannot capture the boot log at this time, because my serial port has
a physical problem.

I don't know why properly operate with onboard pci driver.
It seems to be there is no relationship.

If want to find the reason why kernel stopped, should know what
happened in kernel code.
I'll do this the later date.

-- jaagar


2009/11/27 Peter Stuge <peter@stuge.se>:
> Hi,
>
> Myles Watson wrote:
>> > I think this is not caused by RS690, but seems to be related
>> > device-tree structure.
>> > Because the stopped point of linux kernel is the bus scan stage.
>> > Successful for RS690 tree, but halted at SB600's PCI bridge.
>> It seems like Zheng is having trouble at a different point.  Since you've
>> gotten it to work with the onboard driver, could you send the complete logs
>> with and without it?
>>
>> > I know it is not proper solution that add the old onboard pci driver,
>> > but it is a temporary solution till we found the problem.
>> Since it's a temporary solution, lets add it somewhere local.
>
> I created a ticket for the purpose:
>
> http://tracker.coreboot.org/trac/coreboot/ticket/147
>
>
> //Peter
>
유택연 - 2009-11-27 02:46:16
My kernel log attached.


2009/11/27 Yoo, Taik-Yon <jaagar@gmail.com>:
> I troubled at the same point with Zheng.
>
> See Zheng's the first message titled "r4925 makes my linux hang".
> My system halted the same point of Zheng's log file "r4925_error_log.log".
>
> I cannot capture the boot log at this time, because my serial port has
> a physical problem.
>
> I don't know why properly operate with onboard pci driver.
> It seems to be there is no relationship.
>
> If want to find the reason why kernel stopped, should know what
> happened in kernel code.
> I'll do this the later date.
>
> -- jaagar
>
>
> 2009/11/27 Peter Stuge <peter@stuge.se>:
>> Hi,
>>
>> Myles Watson wrote:
>>> > I think this is not caused by RS690, but seems to be related
>>> > device-tree structure.
>>> > Because the stopped point of linux kernel is the bus scan stage.
>>> > Successful for RS690 tree, but halted at SB600's PCI bridge.
>>> It seems like Zheng is having trouble at a different point.  Since you've
>>> gotten it to work with the onboard driver, could you send the complete logs
>>> with and without it?
>>>
>>> > I know it is not proper solution that add the old onboard pci driver,
>>> > but it is a temporary solution till we found the problem.
>>> Since it's a temporary solution, lets add it somewhere local.
>>
>> I created a ticket for the purpose:
>>
>> http://tracker.coreboot.org/trac/coreboot/ticket/147
>>
>>
>> //Peter
>>
>

Patch

diff -uNr coreboot-a/src/drivers/pci/Makefile.inc coreboot-b/src/drivers/pci/Makefile.inc
--- coreboot-a/src/drivers/pci/Makefile.inc	1970-01-01 09:00:00.000000000 +0900
+++ coreboot-b/src/drivers/pci/Makefile.inc	2009-08-13 13:11:11.000000000 +0900
@@ -0,0 +1 @@ 
+subdirs-y += onboard
diff -uNr coreboot-a/src/drivers/pci/onboard/chip.h coreboot-b/src/drivers/pci/onboard/chip.h
--- coreboot-a/src/drivers/pci/onboard/chip.h	1970-01-01 09:00:00.000000000 +0900
+++ coreboot-b/src/drivers/pci/onboard/chip.h	2009-07-13 14:29:51.000000000 +0900
@@ -0,0 +1,11 @@ 
+#ifndef PCI_ONBOARD_H
+#define PCI_ONBOARD_H
+
+struct drivers_pci_onboard_config 
+{
+       unsigned long rom_address;
+};
+struct chip_operations;
+extern struct chip_operations drivers_pci_onboard_ops;
+
+#endif 
diff -uNr coreboot-a/src/drivers/pci/onboard/Config.lb coreboot-b/src/drivers/pci/onboard/Config.lb
--- coreboot-a/src/drivers/pci/onboard/Config.lb	1970-01-01 09:00:00.000000000 +0900
+++ coreboot-b/src/drivers/pci/onboard/Config.lb	2009-07-13 14:29:51.000000000 +0900
@@ -0,0 +1,4 @@ 
+config chip.h
+
+object onboard.o
+
diff -uNr coreboot-a/src/drivers/pci/onboard/Makefile.inc coreboot-b/src/drivers/pci/onboard/Makefile.inc
--- coreboot-a/src/drivers/pci/onboard/Makefile.inc	1970-01-01 09:00:00.000000000 +0900
+++ coreboot-b/src/drivers/pci/onboard/Makefile.inc	2009-08-13 13:11:11.000000000 +0900
@@ -0,0 +1 @@ 
+obj-y += onboard.o
diff -uNr coreboot-a/src/drivers/pci/onboard/onboard.c coreboot-b/src/drivers/pci/onboard/onboard.c
--- coreboot-a/src/drivers/pci/onboard/onboard.c	1970-01-01 09:00:00.000000000 +0900
+++ coreboot-b/src/drivers/pci/onboard/onboard.c	2009-11-25 07:55:32.000000000 +0900
@@ -0,0 +1,77 @@ 
+/*
+ * Copyright 2004 Tyan Computer
+ *  by yhlu@tyan.com
+ */
+
+#include <console/console.h>
+
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <device/pci_ops.h>
+#include "chip.h"
+
+/*
+ * How to use the onboard device driver for option rom execution:
+ *
+ * 1. You need to add the driver to your mainboard Config.lb:
+ *
+ *      chip drivers/pci/onboard
+ *	    device pci x.0 on end
+ *          register "rom_address" = "0xfff80000"
+ *      end
+ * 2. Reduce the size of your normal (or fallback) image, by adding the
+ *    following lines to your target Config.lb, after romimage "normal"
+ *      # 48K for SCSI FW or ATI ROM
+ *      option CONFIG_ROM_SIZE = 512*1024-48*1024
+ * 3. Create your vgabios.bin, for example using awardeco and put it in the
+ *    directory of your target Config.lb. You can also read an option rom from
+ *    a running system, but this is unreliable, as some option roms are changed
+ *    during execution:
+ *      #  dd if=/dev/mem of=atix.rom skip=1536 count=96
+ * 4. After you built coreboot.rom, attach the option rom to your coreboot
+ *    image:
+ *      # cat ../atix.rom ./normal/coreboot.rom ./fallback/coreboot.rom > coreboot.rom
+ *
+ * Alternatively you can use the following script "nsxv" to build your image
+ * Usage:
+ * # ./nsxv s2850
+ *
+ *     #!/bin/bash
+ *     MBVENDOR=tyan
+ *     MBMODEL=$1
+ *     LBROOT=/home/yhlu/xx/xx
+ *
+ *     echo $1
+ *     date
+ *
+ *     cd "$LBROOT/freebios2/targets"
+ *     rm -rf "$MBVENDOR/$MBMODEL/$MBMODEL"
+ *     ./buildtarget "$MBVENDOR/$MBMODEL" &> "$LBROOT/x_b.txt"
+ *     cd "$MBVENDOR/$MBMODEL/$MBMODEL"
+ *     #make clean
+ *     eval make &> "$LBROOT/x_m.txt"
+ *             if [ $? -eq 0 ]; then
+ *                     echo "ok."
+ *             else
+ *                     echo "FAILED! Log excerpt:"
+ *                     tail -n 15 "$LBROOT/x_m.txt"
+ *                     exit
+ *             fi
+ *     cat ../atix.rom ./normal/coreboot.rom ./fallback/coreboot.rom > "$LBROOT/rom/"$MBMODEL"_coreboot.rom"
+ *     cp -f "$LBROOT/rom/"$MBMODEL"_coreboot.rom" /home/yhlu/
+ *
+ *     date
+ *
+ */
+
+static void onboard_enable(device_t dev)
+{
+	struct drivers_pci_onboard_config *conf;
+        conf = dev->chip_info;
+}
+
+struct chip_operations drivers_pci_onboard_ops = {
+	CHIP_NAME("Onboard PCI")
+	.enable_dev = onboard_enable,
+};