[PATCH] Re: Unknown interrupt code

Philipp Rumpf (prumpf@jcsbs.lanobis.de)
Tue, 9 Feb 1999 18:25:23 +0000


--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii

On Tue, Feb 09, 1999 at 10:39:56AM +0000, Philipp Rumpf wrote:
> This one would work better IMO.

Argh. I did not set up %ds / %es. The problem with the code in
2.2.1 is we do not setup the stack correctly. This code is not
nice either, it dies without reenabling interrupts, which means
we cannot use SysRq, the panic reboot won't work aso.

--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="unexpint-2.diff"

diff -ur /linux/arch/i386/kernel/irq.c linux/arch/i386/kernel/irq.c
--- /linux/arch/i386/kernel/irq.c Thu Jan 21 11:50:43 1999
+++ linux/arch/i386/kernel/irq.c Tue Feb 9 11:04:49 1999
@@ -992,14 +992,15 @@
static char uglybuffer[10*256];

__asm__("\n" __ALIGN_STR"\n"
- "common_unexpected:\n\t"
- SAVE_ALL
- "pushl $ret_from_intr\n\t"
- "jmp strange_interrupt");
-
+ "common_unexpected:\n"
+ "movl $" STR(__KERNEL_DS) ",%edx\n"
+ "movl %dx,%ds\n"
+ "movl %dx,%es\n"
+ "call strange_interrupt\n");
+
void strange_interrupt(int irqnum)
{
- printk("Unexpected interrupt %d\n", irqnum & 255);
+ printk("Unexpected interrupt %d\n", irqnum);
for (;;);
}

@@ -1013,7 +1014,7 @@

jumpto -= (unsigned long)(code+10);
code[0] = 0x68; /* pushl */
- *(int *)(code+1) = i - 512;
+ *(int *)(code+1) = i;
code[5] = 0xe9; /* jmp */
*(int *)(code+6) = jumpto;

Only in linux/arch/i386/kernel: irq.c~

--fUYQa+Pmc3FrFX/N--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/