Message: 9 Date: Tue, 23 Mar 2010 14:19:01 -0600 From: Myles Watson mylesgw@gmail.com To: ron minnich rminnich@gmail.com Cc: Mark Marshall mark.marshall@csr.com, coreboot@coreboot.org Subject: Re: [coreboot] W83977EF vs. ASUS P2B-L vs. PS/2 keyboard Message-ID: 2831fecf1003231319v303e3ac3r1d03e2d2bc1c28aa@mail.gmail.com Content-Type: text/plain; charset="iso-8859-1"
155 pnp_set_logical_device(dev);
156 pnp_set_enable(dev, 1);
This little snippet looks a lot like pnp_enable_resources, which is already getting called on all enabled devices.
Maybe it's not getting called early enough?
Thanks, Myles
Indeed. Any room for simplification?
http://tracker.coreboot.org/trac/coreboot/browser/trunk/src/devices/device.c
Line 801. This is very suspicious too. Shouldn't it be returning only if it is ALREADY enabled?
My log points to only PCI devices getting enabled. Could this be the root culprit?
I'll see what happens if I change this instead of applying the patch I just floated.
Thanks Keith
http://tracker.coreboot.org/trac/coreboot/browser/trunk/src/devices/device.c
Line 801. This is very suspicious too. Shouldn't it be returning only if it is ALREADY enabled?
It returns if it isn't enabled. It was disabled by pnp_enable if that was needed.
My log points to only PCI devices getting enabled. Could this be the root culprit?
If you put in a debugging statement in pnp_enable_resources you'll see that
it gets called too.
Thanks, Myles
This is going to get a lot more interesting.
I switched back to my P2B-LS and tried the onboard SCSI now that I got the keyboard going.
Its presence is known, but the linux module failed to probe it. lspci shows that its I/O port range is disabled. No wonder. This is with a BIOS built for P2B-F without the SCSI device listed in devicetree.cb as I am investigating if the P2B-L/S/LS/F series can share the same code as P2B-F. I thought coreboot enables all PCI devices it detects?
Same with the onboard Intel LAN. Its presence is also known. ifconfig shows its MAC address, but assigning it a local IP fails.
That's it for tonight.
Cheers Keith
On Tue, Mar 23, 2010 at 10:30 PM, Myles Watson mylesgw@gmail.com wrote:
http://tracker.coreboot.org/trac/coreboot/browser/trunk/src/devices/device.c
Line 801. This is very suspicious too. Shouldn't it be returning only if it is ALREADY enabled?
It returns if it isn't enabled. It was disabled by pnp_enable if that was needed.
My log points to only PCI devices getting enabled. Could this be the root culprit?
If you put in a debugging statement in pnp_enable_resources you'll see that it gets called too.
Thanks, Myles
I switched back to my P2B-LS and tried the onboard SCSI now that I got the keyboard going.
So why did that change work if pnp_enable_resources was already doing the same thing?
Its presence is known, but the linux module failed to probe it. lspci shows that its I/O port range is disabled. No wonder. This is with a BIOS built for P2B-F without the SCSI device listed in devicetree.cb as I am investigating if the P2B-L/S/LS/F series can share the same code as P2B-F. I thought coreboot enables all PCI devices it detects?
It should. You could send the log to the list.
I'd be interested in the log before and after the keyboard patch. It seems like something else is broken if you have to enable it twice.
Thanks, Myles
On 3/24/10 2:04 PM, Myles Watson wrote:
I switched back to my P2B-LS and tried the onboard SCSI now that I got the keyboard going.
So why did that change work if pnp_enable_resources was already doing the same thing?
I seem to remember the southbridge driver had to contain some code to make sure the pnp and i2c devices hanging off it are initialized correctly. Maybe the device allocator does not try to call pnp_enable_resources for the ASUS P2B?
Stefan
On Wed, Mar 24, 2010 at 8:56 AM, Stefan Reinauer stepan@coresystems.dewrote:
On 3/24/10 2:04 PM, Myles Watson wrote:
I switched back to my P2B-LS and tried the onboard SCSI now that I got the keyboard going.
So why did that change work if pnp_enable_resources was already doing the same thing?
I seem to remember the southbridge driver had to contain some code to make sure the pnp and i2c devices hanging off it are initialized correctly. Maybe the device allocator does not try to call pnp_enable_resources for the ASUS P2B?
That could be. I just looked at the superio code, and I'm not sure it looks right. I'd like to see the log with this patch applied. If it's correct, it should be called for each enabled PNP device.
Index: svn/src/devices/pnp_device.c =================================================================== --- svn.orig/src/devices/pnp_device.c +++ svn/src/devices/pnp_device.c @@ -145,6 +145,7 @@ void pnp_set_resources(device_t dev)
void pnp_enable_resources(device_t dev) { + printk(BIOS_DEBUG, "%s: %s\n", __func__, dev_path(dev)); pnp_set_logical_device(dev); pnp_set_enable(dev, 1); }
Thanks, Myles