Skip to contentSkip to conversation

PnP BIOS + 2.4.9-ac16 = no boot

DISCUSSION Thomas Hood 4 participants 8 messages Sep 28, 2001 – Oct 3, 2001

lore
Share & tools
lore
#0 lore raw

Stelian:

In -ac15 the PnP BIOS driver was changed so that the proc interface got the "current" and "boot" configurations the right way 'round. As a side effect the change made the initialization routine build its device list from the "current" configuration as opposed to the "boot" configuration (... which seemed like the right thing to do at the time, heh heh ... hmmmmm).

Quoted 2 lines · You

With the patch a third line is printed before the oops:
PnP: PNP BIOS 13 devices detected (or something like that).

The patch I sent you reverted the build_devlist function to looking at the "boot" configuration. Your output shows that the devlist got built this time, which is good. However you still got an oops, which is bad. My guess is that the oops now occurs in pnp_proc_init(). I attach a revised patch which cuts out proc support. Hopefully this will allow your kernel to boot. This is just a hack; I'll submit a proper fix to Alan later.

Alan (if you're listening): The patches I have already sent you are still okay to go since they don't affect this issue. What I need to do is submit a patch that, for Sony laptops, (1) causes pnpbios to build its devlist from the "boot" configuration, and (2) omits the "current" configuration from /proc/bus/pnp. I'll work on this tonight.

Stelian: Your report made me go back and look at something Alan told me earlier about Vaio laptops. At the time I didn't fully

Quoted 2 lines · understand what he meant when he

If you query the current device status on a Vaio and some other boxes using the 32bit API your computer dies horribly shortly afterwards.

I didn't realize that he meant the "current" configuration as opposed to the "boot" configuration. Stupid of me.

--
Thomas
P.S. The attached patch is only a temporary hack!

pnp_bios.c_vaiofix renamed from pnp_bios.c_ORIG +2 -2
@@ -614,11 +614,11 @@
 		pnp_bios_inst_struc = check;
 		break;
 	}
 	pnpbios_build_devlist();
 #ifdef CONFIG_PROC_FS
-	pnp_proc_init();
+	// pnp_proc_init();
 #endif
 #ifdef CONFIG_HOTPLUG	
 	init_completion(&unload_sem);
 	if(kernel_thread(pnp_dock_thread, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL)>0)
 		unloading = 0;
@@ -845,11 +845,11 @@
 	for(i=0;i<0xff;i++) {
 		dev =  kmalloc(sizeof (struct pci_dev), GFP_KERNEL);
 		if (!dev)
 			break;
 			
-                if (pnp_bios_get_dev_node((u8 *)&num, (char )0 , node))
+                if (pnp_bios_get_dev_node((u8 *)&num, (char )1 , node))
 			continue;
 
 		devs++;
 		pnpbios_rawdata_2_pci_dev(node,dev);
 		dev->devfn=num;
#1 lore raw

On Fri, Sep 28, 2001 at 09:47:43AM -0400, Thomas Hood wrote:

[ Some detailed PnP BIOS driver explication snipped]

Quoted 3 lines

I attach a revised patch which cuts out proc support. Hopefully this will allow your kernel to boot. This is just a hack; I'll submit a proper fix to Alan later.

I confirm that the revised patch makes a bootable kernel for me.

Quoted 7 lines

Stelian: Your report made me go back and look at something Alan told me earlier about Vaio laptops. At the time I didn't fully

Quoted 2 lines · understand what he meant when he

If you query the current device status on a Vaio and some other boxes using the 32bit API your computer dies horribly shortly afterwards.

I didn't realize that he meant the "current" configuration as opposed to the "boot" configuration. Stupid of me.

[...]

pnp_bios.c_vaiofix line 619

Quoted 2 lines
pnp_bios.c_vaiofix renamed from pnp_bios.c_ORIG +1 -1
-	pnp_proc_init();
+	// pnp_proc_init();

What about making a conditional on 'is_sony_vaio_laptop' here ? (but you need to extends the conditionnal export of this variable from dmi_scan.c / i386_ksyms.c).

Stelian.

Signature · 4 lines
Stelian Pop <[email protected]>
|---------------- Free Software Engineer -----------------|
| Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alcôve, liberating software ---------------|
#2 lore raw
Quoted 3 lines · Stelian Pop

What about making a conditional on 'is_sony_vaio_laptop' here ? (but you need to extends the conditionnal export of this variable from dmi_scan.c / i386_ksyms.c).

Well, the funny thing is, the same kernel doesn't boot on a Dell Inspiron laptop either, if PNP is enabled -- and the oops is the same. So it's not just Sony...

2.4.9-ac10 has no such issues on the same laptop, btw.

Ion

Signature · 2 lines
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.
#3 lore raw
In reply to Stelian Pop
Quoted 7 lines · Ion Badulescu
Quoted 3 lines

What about making a conditional on 'is_sony_vaio_laptop' here ? (but you need to extends the conditionnal export of this variable from dmi_scan.c / i386_ksyms.c).

Well, the funny thing is, the same kernel doesn't boot on a Dell Inspiron laptop either, if PNP is enabled -- and the oops is the same. So it's not just Sony...

Maybe we'll need to test against something like 'pnp_broken' variable instead of is_sony_vaio_laptop in PnP drivers, and add the callbacks in dmi_scan to initialize pnp_broken...

Stelian.

Signature · 4 lines
Stelian Pop <[email protected]>
|---------------- Free Software Engineer -----------------|
| Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alcôve, liberating software ---------------|
#4 lore raw
In reply to Thomas Hood
Quoted 3 lines · Stelian Pop

What about making a conditional on 'is_sony_vaio_laptop' here ? (but you need to extends the conditionnal export of this variable from dmi_scan.c / i386_ksyms.c).

In addition to applying the patch I just sent (thood-pnpbiosvaio-patch-20010928-3), you will have to move the definition of is_sony_vaio_laptop outside the #ifdefs in arch/i386/kernel/dmi_scan.c and i386_ksyms.c

You or Alan: For the cleaned up patch, do we export this variable unconditionally?

--
Thomas

#5 lore raw
Quoted 7 lines

In addition to applying the patch I just sent (thood-pnpbiosvaio-patch-20010928-3), you will have to move the definition of is_sony_vaio_laptop outside the #ifdefs in arch/i386/kernel/dmi_scan.c and i386_ksyms.c

You or Alan: For the cleaned up patch, do we export this variable unconditionally?

I think so

#6 lore raw
In reply to Thomas Hood
Quoted 9 lines · Thomas Hood
Quoted 3 lines · Stelian Pop

What about making a conditional on 'is_sony_vaio_laptop' here ? (but you need to extends the conditionnal export of this variable from dmi_scan.c / i386_ksyms.c).

In addition to applying the patch I just sent (thood-pnpbiosvaio-patch-20010928-3), you will have to move the definition of is_sony_vaio_laptop outside the #ifdefs in arch/i386/kernel/dmi_scan.c and i386_ksyms.c

No need for me since I have CONFIG_SONYPI on.

Quoted 2 lines

You or Alan: For the cleaned up patch, do we export this variable unconditionally?

I'd vote for unconditionnally define one int instead of having something like:

	#if defined(CONFIG_SONYPI) || defined(CONFIG_SONYPI_MODULE) || ( defined(CONFIG_PNP) && defined(CONFIG_PROC) )

(and maybe other defines in the future... :( ).

Stelian.

Signature · 4 lines
Stelian Pop <[email protected]>
|---------------- Free Software Engineer -----------------|
| Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alcôve, liberating software ---------------|
#7 lore raw
In reply to Thomas Hood
Quoted 4 lines · I said:

In addition to applying the patch I just sent (thood-pnpbiosvaio-patch-20010928-3), you will have to move the definition of is_sony_vaio_laptop outside the #ifdefs in arch/i386/kernel/dmi_scan.c and i386_ksyms.c

... along with the functions that initialize it. The easiest thing to do is remove the #ifdef's and #endif's around the sony_vaio_laptop stuff in those two files. Is that the ultimately correct thing to do?

--
Thomas