public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: PnP BIOS + 2.4.9-ac16 = no boot
@ 2001-09-28 14:33 Thomas Hood
  2001-09-28 14:51 ` Stelian Pop
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Hood @ 2001-09-28 14:33 UTC (permalink / raw)
  To: Stelian Pop; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

Hi Stelian.

Try this patch.  It is a modification of the latest
pnpbios driver patch to 2.4.9-ac16 which includes
hacks to work on a Vaio laptop.  If this works then
I'll clean it up a bit and submit to Alan.

--
Thomas

[-- Attachment #2: thood-pnpbiosvaio-patch-20010928-3 --]
[-- Type: text/plain, Size: 13821 bytes --]

diff -Naur -5 pnp_ORIG/pnp_bios.c pnp/pnp_bios.c
--- pnp_ORIG/pnp_bios.c	Thu Sep 27 15:21:46 2001
+++ pnp/pnp_bios.c	Fri Sep 28 10:25:38 2001
@@ -484,11 +484,11 @@
 	envp [i++] = scratch;
 	scratch += sprintf (scratch, "ACTION=%s", dock?"add":"remove") + 1;
 
 	/* Report the ident for the dock */
 	envp [i++] = scratch;
-	scratch += sprintf (scratch, "DOCK=%x/%x/%x",
+	scratch += sprintf (scratch, "DOCK=0x%x/0x%x/0x%x",
 		info->location_id, info->serial, info->capabilities);
 	envp[i] = 0;
 	
 	value = call_usermodehelper (argv [0], argv, envp);
 	kfree (buf);
@@ -552,14 +552,13 @@
 	complete_and_exit(&unload_sem, 0);
 }
 
 #endif
 
-/* 
- * Searches the defined area (0xf0000-0xffff0) for a valid PnP BIOS
- * structure and, if found one, sets up the selectors and entry points
- */
+extern int is_sony_vaio_laptop;
+int pnp_bios_dont_use_current;
+EXPORT_SYMBOL(pnp_bios_dont_use_current);
 
 static int pnp_bios_disabled;
 
 static int disable_pnp_bios(char *str)
 {
@@ -567,10 +566,15 @@
 	return 0;
 }
 
 __setup("nobiospnp", disable_pnp_bios);
 
+/* 
+ * Searches the defined area (0xf0000-0xffff0) for a valid PnP BIOS
+ * structure and, if found one, sets up the selectors and entry points
+ */
+
 void pnp_bios_init(void)
 {
 	union pnpbios *check;
 	u8 sum;
 	int i, length;
@@ -580,10 +584,16 @@
 	if(pnp_bios_disabled)
 	{
 		printk(KERN_INFO "PNP BIOS services disabled.\n");
 		return;
 	}
+
+	if ( is_sony_vaio_laptop )
+		pnp_bios_dont_use_current = 1;
+	else
+		pnp_bios_dont_use_current = 0;
+
 	for (check = (union pnpbios *) __va(0xf0000);
 	     check < (union pnpbios *) __va(0xffff0);
 	     ((void *) (check)) += 16) {
 		if (check->fields.signature != PNP_SIGNATURE)
 			continue;
@@ -593,18 +603,18 @@
 		for (sum = 0, i = 0; i < length; i++)
 			sum += check->chars[i];
 		if (sum)
 			continue;
 		if (check->fields.version < 0x10) {
-			printk(KERN_WARNING "PnP: unsupported version %d.%d",
+			printk(KERN_WARNING "PnPBIOS: unsupported version %d.%d",
 			       check->fields.version >> 4,
 			       check->fields.version & 15);
 			continue;
 		}
-		printk(KERN_INFO "PnP: PNP BIOS installation structure at 0x%p\n",
+		printk(KERN_INFO "PnPBIOS: PnP BIOS installation structure at 0x%p\n",
 		       check);
-		printk(KERN_INFO "PnP: PNP BIOS version %d.%d, entry at %x:%x, dseg at %x\n",
+		printk(KERN_INFO "PnPBIOS: PnP BIOS version %d.%d, entry at 0x%x:0x%x, dseg at 0x%x\n",
                        check->fields.version >> 4, check->fields.version & 15,
 		       check->fields.pm16cseg, check->fields.pm16offset,
 		       check->fields.pm16dseg);
 		Q2_SET_SEL(PNP_CS32, &pnp_bios_callfunc, 64 * 1024);
 		Q_SET_SEL(PNP_CS16, check->fields.pm16cseg, 64 * 1024);
@@ -644,33 +654,49 @@
 EXPORT_SYMBOL(pnp_bios_present);
 EXPORT_SYMBOL(pnp_bios_dev_node_info);
 
 static void inline pnpbios_add_irqresource(struct pci_dev *dev, int irq)
 {
+	// Permit irq==-1 which signifies "disabled"
 	int i = 0;
-	while (dev->irq_resource[i].start && i < DEVICE_COUNT_IRQ) i++;
-	if (i < DEVICE_COUNT_IRQ)
+	while (!(dev->irq_resource[i].flags & IORESOURCE_UNSET) && i < DEVICE_COUNT_IRQ) i++;
+	if (i < DEVICE_COUNT_IRQ) {
 		dev->irq_resource[i].start = irq;
+		dev->irq_resource[i].flags = IORESOURCE_IRQ;  // Also clears _UNSET flag
+	}
 }
 
 static void inline pnpbios_add_dmaresource(struct pci_dev *dev, int dma)
 {
+	// Permit dma==-1 which signifies "disabled"
 	int i = 0;
-	while (dev->dma_resource[i].start && i < DEVICE_COUNT_DMA) i++;
-	if (i < DEVICE_COUNT_DMA)
+	while (!(dev->dma_resource[i].flags & IORESOURCE_UNSET) && i < DEVICE_COUNT_DMA) i++;
+	if (i < DEVICE_COUNT_DMA) {
 		dev->dma_resource[i].start = dma;
+		dev->dma_resource[i].flags = IORESOURCE_DMA;  // Also clears _UNSET flag
+	}
 }
 
-static void __init pnpbios_add_ioresource(struct pci_dev *dev, int io, 
-					  int len, int flags)
+static void __init pnpbios_add_ioresource(struct pci_dev *dev, int io, int len)
 {
 	int i = 0;
-	while (dev->resource[i].start && i < DEVICE_COUNT_RESOURCE) i++;
+	while (!(dev->resource[i].flags & IORESOURCE_UNSET) && i < DEVICE_COUNT_RESOURCE) i++;
 	if (i < DEVICE_COUNT_RESOURCE) {
 		dev->resource[i].start = io;
 		dev->resource[i].end = io + len;
-		dev->resource[i].flags = flags;
+		dev->resource[i].flags = IORESOURCE_IO;  // Also clears _UNSET flag
+	}
+}
+
+static void __init pnpbios_add_memresource(struct pci_dev *dev, int io, int len)
+{
+	int i = 0;
+	while (!(dev->resource[i].flags & IORESOURCE_UNSET) && i < DEVICE_COUNT_RESOURCE) i++;
+	if (i < DEVICE_COUNT_RESOURCE) {
+		dev->resource[i].start = io;
+		dev->resource[i].end = io + len;
+		dev->resource[i].flags = IORESOURCE_MEM;  // Also clears _UNSET flag
 	}
 }
 
 static char * __init pnpid32_to_pnpid(u32 id);
 
@@ -678,22 +704,22 @@
  * request I/O ports which are used according to the PnP BIOS
  * to avoid I/O conflicts.
  */
 static void mboard_request(char *pnpid, int io, int len)
 {
-    struct ressource *res;
+    struct resource *res;
     
     if (0 != strcmp(pnpid,"PNP0c01") &&  /* memory controller */
 	0 != strcmp(pnpid,"PNP0c02"))    /* system peripheral: other */
 	return;
 
     if (io < 0x100) {
 	/*
 	 * below 0x100 is only standard PC hardware
 	 * (pics, kbd, timer, dma, ...)
 	 *
-	 * We should not get ressource conflicts there,
+	 * We should not get resource conflicts there,
 	 * and the kernel reserves these anyway
 	 * (see arch/i386/kernel/setup.c).
 	 */
 	return;
     }
@@ -714,75 +740,91 @@
 
 /* parse PNPBIOS "Allocated Resources Block" and fill IO,IRQ,DMA into pci_dev */
 static void __init pnpbios_rawdata_2_pci_dev(struct pnp_bios_node *node, struct pci_dev *pci_dev)
 {
 	unsigned char *p = node->data, *lastp=NULL;
-        int mask,i,io,irq,len,dma;
 
-	memset(pci_dev, 0, sizeof(struct pci_dev));
         while ( (char *)p < ((char *)node->data + node->size )) {
         	if(p==lastp) break;
 
                 if( p[0] & 0x80 ) {// large item
 			switch (p[0] & 0x7f) {
 			case 0x01: // memory
-				io = *(short *) &p[4];
-				len = *(short *) &p[10];
-				pnpbios_add_ioresource(pci_dev, io, len, IORESOURCE_MEM);
+			{
+				int io = *(short *) &p[4];
+				int len = *(short *) &p[10];
+				pnpbios_add_memresource(pci_dev, io, len);
 				break;
+			}
 			case 0x02: // device name
-				len = *(short *) &p[1];
+			{
+				int len = *(short *) &p[1];
 				memcpy(pci_dev->name, p + 3, len >= 80 ? 79 : len);
 				break;
+			}
 			case 0x05: // 32-bit memory
-				io = *(int *) &p[4];
-				len = *(int *) &p[16];
-				pnpbios_add_ioresource(pci_dev, io, len, IORESOURCE_MEM);
+			{
+				int io = *(int *) &p[4];
+				int len = *(int *) &p[16];
+				pnpbios_add_memresource(pci_dev, io, len);
 				break;
+			}
 			case 0x06: // fixed location 32-bit memory
-				io = *(int *) &p[4];
-				len = *(int *) &p[8];
-				pnpbios_add_ioresource(pci_dev, io, len, IORESOURCE_MEM);
+			{
+				int io = *(int *) &p[4];
+				int len = *(int *) &p[8];
+				pnpbios_add_memresource(pci_dev, io, len);
 				break;
 			}
+			} /* switch */
                         lastp = p+3;
                         p = p + p[1] + p[2]*256 + 3;
                         continue;
                 }
                 if ((p[0]>>3) == 0x0f) // end tag
                         break;
                 switch (p[0]>>3) {
                 case 0x04: // irq
-                        irq = -1;
+                {
+                        int i, mask, irq = -1; // "disabled"
                         mask= p[1] + p[2]*256;
                         for (i=0;i<16;i++, mask=mask>>1)
-                                if(mask &0x01) irq=i;
+                                if(mask & 0x01) irq=i;
 			pnpbios_add_irqresource(pci_dev, irq);
                         break;
+                }
                 case 0x05: // dma
-                        dma = -1;
+                {
+                        int i, mask, dma = -1; // "disabled"
                         mask = p[1];
                         for (i=0;i<8;i++, mask = mask>>1)
-                                if(mask&0x01) dma=i;
+                                if(mask & 0x01) dma=i;
 			pnpbios_add_dmaresource(pci_dev, dma);
                         break;
+                }
                 case 0x08: // io
-			io= p[2] + p[3] *256;
-			len = p[7];
-			pnpbios_add_ioresource(pci_dev, io, len, IORESOURCE_IO);
+                {
+			int io= p[2] + p[3] *256;
+			int len = p[7];
+			pnpbios_add_ioresource(pci_dev, io, len);
 			mboard_request(pnpid32_to_pnpid(node->eisa_id),io,len);
                         break;
+                }
 		case 0x09: // fixed location io
-			io = p[1] + p[2] * 256;
-			len = p[3];
-			pnpbios_add_ioresource(pci_dev, io, len, IORESOURCE_IO);
+		{
+			int io = p[1] + p[2] * 256;
+			int len = p[3];
+			pnpbios_add_ioresource(pci_dev, io, len);
 			break;
-                }
+		}
+                } /* switch */
                 lastp=p+1;
                 p = p + (p[0] & 0x07) + 1;
 
-        }
+        } /* while */
+
+        return;
 }
 
 #define HEX(id,a) hex[((id)>>a) & 15]
 #define CHAR(id,a) (0x40 + (((id)>>a) & 31))
 
@@ -816,21 +858,49 @@
 	/* FIXME: Need to check for re-add of existing node */
 	list_add_tail(&dev->global_list, &pnpbios_devices);
 	return 0;
 }
 
+static struct pci_dev * __init pnpbios_kmalloc_pci_dev( void )
+{
+	struct pci_dev *dev;
+	int i;
+
+	dev =  kmalloc( sizeof(struct pci_dev), GFP_KERNEL );
+	if (!dev)
+		return NULL;
+
+	memset(dev,0,sizeof(struct pci_dev));
+
+	for (i=0;i<DEVICE_COUNT_RESOURCE;i++) {
+	/*	dev->resource[i].start = 0; */
+		dev->resource[i].flags = IORESOURCE_UNSET;
+	}
+	for (i=0;i<DEVICE_COUNT_IRQ;i++) {
+		dev->irq_resource[i].start = (unsigned long)-1;  // "disabled"
+		dev->irq_resource[i].flags = IORESOURCE_UNSET;
+	}
+	for (i=0;i<DEVICE_COUNT_DMA;i++) {
+		dev->dma_resource[i].start = (unsigned long)-1;  // "disabled"
+		dev->dma_resource[i].flags = IORESOURCE_UNSET;
+	}
+
+	return dev;
+}
+
 /*
  *	Build the list of pci_dev objects from the PnP table
  */
  
 static void __init pnpbios_build_devlist(void)
 {
-	int i, devs = 0;
+	int i;
+	int nodes_got = 0;
 	struct pnp_bios_node *node;
         struct pnp_dev_node_info node_info;
 	struct pci_dev *dev;
-	int num;
+	int nodenum;
 	char *pnpid;
 
 	
         if (!pnp_bios_present ())
                 return;
@@ -840,33 +910,33 @@
 
         node = kmalloc(node_info.max_node_size, GFP_KERNEL);
         if (!node)
                 return;
 
-	for(i=0;i<0xff;i++) {
-		dev =  kmalloc(sizeof (struct pci_dev), GFP_KERNEL);
+	for(i=0,nodenum=0;i<0xff && nodenum!=0xff;i++) {
+		int thisnodenum = nodenum;
+                if (pnp_bios_get_dev_node(
+                	(u8 *)&nodenum,
+                	pnp_bios_dont_use_current ? (char) 1 : (char ) 0,
+                	node)
+                )
+			continue;
+		nodes_got++;
+		dev = pnpbios_kmalloc_pci_dev();
 		if (!dev)
 			break;
-			
-                if (pnp_bios_get_dev_node((u8 *)&num, (char )0 , node))
-			continue;
-
-		devs++;
 		pnpbios_rawdata_2_pci_dev(node,dev);
-		dev->devfn=num;
+		dev->devfn=thisnodenum;
 		pnpid = pnpid32_to_pnpid(node->eisa_id);
 		memcpy(dev->name,"PNPBIOS",8);
 		memcpy(dev->slot_name,pnpid,8);
 		if(pnpbios_insert_device(dev)<0)
 			kfree(dev);
 	}
 	kfree(node);
 
-	if (devs)
-		printk(KERN_INFO "PnP: %i device%s detected total\n", devs, devs > 1 ? "s" : "");
-	else
-		printk(KERN_INFO "PnP: No devices found\n");
+	printk(KERN_INFO "PnPBIOS: %i node%s reported by PnP BIOS\n", nodes_got, nodes_got != 1 ? "s" : "");
 }
 
 
 /*
  *	The public interface to PnP BIOS enumeration
diff -Naur -5 pnp_ORIG/pnp_proc.c pnp/pnp_proc.c
--- pnp_ORIG/pnp_proc.c	Thu Sep 27 15:21:46 2001
+++ pnp/pnp_proc.c	Fri Sep 28 10:28:31 2001
@@ -13,10 +13,11 @@
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/proc_fs.h>
 #include <linux/pnp_bios.h>
 
+extern int pnp_bios_dont_use_current;
 static struct proc_dir_entry *proc_pnp = NULL;
 static struct proc_dir_entry *proc_pnp_boot = NULL;
 static struct pnp_dev_node_info node_info;
 
 static int proc_read_devices(char *buf, char **start, off_t pos,
@@ -31,11 +32,11 @@
 	    return 0;
 	}
 	node = kmalloc(node_info.max_node_size, GFP_KERNEL);
 	if (!node) return -ENOMEM;
 	for (num = 0; num != 0xff; ) {
-		pnp_bios_get_dev_node(&num, 0, node);
+		pnp_bios_get_dev_node(&num, 1, node);
 		p += sprintf(p, "%02x\t%08x\t%02x:%02x:%02x\t%04x\n",
 			     node->handle, node->eisa_id,
 			     node->type_code[0], node->type_code[1],
 			     node->type_code[2], node->flags);
 	}
@@ -103,18 +104,20 @@
 	
 	node = kmalloc(node_info.max_node_size, GFP_KERNEL);
 	if (!node) return;
 	for (num = 0; num != 0xff; ) {
 		//sprintf(name, "%02x", num);
-		if (pnp_bios_get_dev_node(&num, 0, node) != 0)
+		if (pnp_bios_get_dev_node(&num, 1, node) != 0)
 			break;
 		sprintf(name, "%02x", node->handle);
-		ent = create_proc_entry(name, 0, proc_pnp);
-		if (ent) {
-			ent->read_proc = proc_read_node;
-			ent->write_proc = proc_write_node;
-			ent->data = (void *)(long)(node->handle);
+		if ( !pnp_bios_dont_use_current ) {
+			ent = create_proc_entry(name, 0, proc_pnp);
+			if (ent) {
+				ent->read_proc = proc_read_node;
+				ent->write_proc = proc_write_node;
+				ent->data = (void *)(long)(node->handle);
+			}
 		}
 		ent = create_proc_entry(name, 0, proc_pnp_boot);
 		if (ent) {
 			ent->read_proc = proc_read_node;
 			ent->write_proc = proc_write_node;
@@ -130,11 +133,13 @@
 	char name[3];
 	
 	if (!proc_pnp) return;
 	for (num = 0; num != 0xff; num++) {
 		sprintf(name, "%02x", num);
-		remove_proc_entry(name, proc_pnp);
+		if ( !pnp_bios_dont_use_current ) {
+			remove_proc_entry(name, proc_pnp);
+		}
 		remove_proc_entry(name, proc_pnp_boot);
 	}
 	remove_proc_entry("boot", proc_pnp);
 	remove_proc_entry("devices", proc_pnp);
 	remove_proc_entry("pnp", proc_bus);

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: PnP BIOS + 2.4.9-ac16 = no boot
@ 2001-10-02 23:29 Thomas Hood
  2001-10-03 14:06 ` Ion Badulescu
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Hood @ 2001-10-02 23:29 UTC (permalink / raw)
  To: linux-kernel

I wrote:
> Thanks for reporting this.  Please try 2.4.10-ac3.  If your
> kernel won't boot, try booting with the "nobioscurrpnp" option.

Better yet, try 2.4.10-ac4  :)

-- 
Thomas Hood
(Don't reply to the From: address but to jdthood_AT_yahoo.co.uk)

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: PnP BIOS + 2.4.9-ac16 = no boot
@ 2001-10-02 23:17 Thomas Hood
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Hood @ 2001-10-02 23:17 UTC (permalink / raw)
  To: linux-kernel

> 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

Thanks for reporting this.  Please try 2.4.10-ac3.  If your
kernel won't boot, try booting with the "nobioscurrpnp" option.

-- 
Thomas Hood
(Don't reply to the From: address but to jdthood_AT_yahoo.co.uk)

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: PnP BIOS + 2.4.9-ac16 = no boot
@ 2001-09-28 13:47 Thomas Hood
  2001-09-28 14:02 ` Stelian Pop
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Hood @ 2001-09-28 13:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: Stelian Pop

[-- Attachment #1: Type: text/plain, Size: 1777 bytes --]

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).

You wrote:
> 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 
understand what he meant when he said:
> 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!

[-- Attachment #2: thood-pnpbiosvaio-patch-20010928-2 --]
[-- Type: text/plain, Size: 781 bytes --]

--- pnp_bios.c_ORIG	Thu Sep 27 15:21:46 2001
+++ pnp_bios.c_vaiofix	Fri Sep 28 09:38:16 2001
@@ -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;

^ permalink raw reply	[flat|nested] 18+ messages in thread
[parent not found: <3BB46DCD.91576F70@mail.com>]
* Re: PnP BIOS + 2.4.9-ac16 = no boot
@ 2001-09-28 12:29 Thomas Hood
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Hood @ 2001-09-28 12:29 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]

Stelian Pop wrote:
> When booting a 2.4.9-ac16 kernel on my Sony Vaio C1VE laptop
> the boot process hangs with something like:
> 	PnP: PNP BIOS installation structure at 0xc00f8120
> 	PnP: PNP BIOS version 1.0, entry ay f0000:b25f, dseg at 400
> 	general protection fault: 0000
> 	...
> 	Code: Bad EIP value
> 
> Adding nobiospnp to the kernel boot line solves the problem. The last
> -ac kernel I tried (2.4.9-ac10) does not need exhibit this problem.

Between 2.4.9-ac10 and 2.4.9-ac16 two small changes were made to
the PnP BIOS code.  One of them must be the cause of your troubles.

> Since this machine's BIOS is crap anyway (almost entirely ACPI - 
> APM suspend doesn't work etc), is it worth investigating this issue
> or should I blame the BIOS structures once again ?

Initial suspicion may fall on your BIOS.  However, if the
PnP BIOS driver worked before then that means that we ought
to be able to work around any bugs in it.

Please try this patch to drivers/pnp/pnp_bios.c (attached) and get
back to me.

It would be helpful too if you could track down (using printks)
where the fault occurs.

--
Thomas

[-- Attachment #2: thood-pnpbiosvaio-patch-20010928-1 --]
[-- Type: text/plain, Size: 457 bytes --]

--- pnp_bios.c_ORIG	Thu Sep 27 15:21:46 2001
+++ pnp_bios.c_vaiofix	Fri Sep 28 08:24:39 2001
@@ -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;


^ permalink raw reply	[flat|nested] 18+ messages in thread
* PnP BIOS + 2.4.9-ac16 = no boot
@ 2001-09-28 10:46 Stelian Pop
  0 siblings, 0 replies; 18+ messages in thread
From: Stelian Pop @ 2001-09-28 10:46 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,

When booting a 2.4.9-ac16 kernel on my Sony Vaio C1VE laptop
the boot process hangs with something like:
	PnP: PNP BIOS installation structure at 0xc00f8120
	PnP: PNP BIOS version 1.0, entry ay f0000:b25f, dseg at 400
	general protection fault: 0000
	...
	Code: Bad EIP value

Adding nobiospnp to the kernel boot line solves the problem. The last
-ac kernel I tried (2.4.9-ac10) does not need exhibit this problem.

Since this machine's BIOS is crap anyway (almost entirely ACPI - 
APM suspend doesn't work etc), is it worth investigating this issue
or should I blame the BIOS structures once again ?

Thanks,

Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
|---------------- Free Software Engineer -----------------|
| Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alcôve, liberating software ---------------|

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2001-10-03 14:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-28 14:33 PnP BIOS + 2.4.9-ac16 = no boot Thomas Hood
2001-09-28 14:51 ` Stelian Pop
2001-09-28 15:20   ` Thomas Hood
2001-09-28 15:28     ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2001-10-02 23:29 Thomas Hood
2001-10-03 14:06 ` Ion Badulescu
2001-10-02 23:17 Thomas Hood
2001-09-28 13:47 Thomas Hood
2001-09-28 14:02 ` Stelian Pop
2001-09-28 14:41   ` Thomas Hood
2001-09-28 14:54     ` Stelian Pop
2001-09-28 14:58     ` Alan Cox
2001-09-28 14:58   ` Thomas Hood
2001-10-02 22:11   ` Ion Badulescu
2001-10-03  9:28     ` Stelian Pop
     [not found] <3BB46DCD.91576F70@mail.com>
2001-09-28 13:12 ` Stelian Pop
2001-09-28 12:29 Thomas Hood
2001-09-28 10:46 Stelian Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox