lkml.org 
[lkml]   [1998]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject2.1.103 single processor boot kernel panic fix
There is a serious bug in 2.1.103 on system with no SMP support and
thus no APIC (I know 2.1.103 is bleeding edge). As dsitributed it
panics during booting due to an unhandled kernel paging address which
turn out to the APIC base address. (Several hours of kernel
recompiling and printk on my aging 486DX2/50 with 16Mb of memory and
nil disc space free). My machine uses glibc 2.x/libc 6, binutils
2.9.1 (the GNU version), gcc 2.8.1, g++ 2.8.1 and libg++ 2.8.1 (libg++
<2.8 is incompatible with g++ 2.8.1 and its configure script is smart
enpugh to tell you).

This occurs when the first irq scan takes place, so no hard disc
detection for example. Here is a fix that is slightly ugly but does
the job. I am using a kernel with the patch applied right now, and it
does boot). The patch hijacks the pin==-1 test by setting all the pins
to -1 before you can get eaten by the bug.

Duncan (-:

--- linux-2.1.103/arch/i386/kernel/io_apic.c.dist Thu May 21 22:54:00 1998
+++ linux-2.1.103/arch/i386/kernel/io_apic.c Thu May 21 22:56:12 1998
@@ -988,3 +988,9 @@
print_IO_APIC();
}

+__initfunc(void setup_no_apic(void))
+{
+ int i;
+ for (i=0; i<NR_IRQS; i++)
+ irq_2_pin[i]=-1;
+}
--- linux-2.1.103/arch/i386/kernel/irq.h.dist Thu May 21 22:49:06 1998
+++ linux-2.1.103/arch/i386/kernel/irq.h Thu May 21 22:48:40 1998
@@ -27,6 +27,7 @@
void print_IO_APIC (void);

extern unsigned int io_apic_irqs;
+extern void setup_no_apic(void); /* Code to avoid panics due to no APIC */

#define IO_APIC_VECTOR(irq) (0x51+((irq)<<3))

--- linux-2.1.103/arch/i386/kernel/smp.c.dist Thu May 21 22:56:43 1998
+++ linux-2.1.103/arch/i386/kernel/smp.c Thu May 21 22:59:49 1998
@@ -970,6 +970,7 @@
if (!smp_found_config)
{
printk(KERN_NOTICE "SMP motherboard not detected. Using dummy APIC emulation.\n");
+ setup_no_apic(); /* Leave this out for booting kernel panics. */
io_apic_irqs = 0;
goto smp_done;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.021 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site