9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] aha1542 -> kernel panic
@ 2002-12-31 16:45 Steve Simon
  2002-12-31 16:57 ` Russ Cox
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Steve Simon @ 2002-12-31 16:45 UTC (permalink / raw)
  To: 9fans

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

Hi,

I tried to add an Adaptec 1542B to a pc I hope to
use as a cpu server (to support DAT and CDROM drives)
and I get a panic (This is a dual Pentium Pro machine,
though I still have *nomp=1).

I have an ata disk but this is for swap.

I am booting the current installation floppy - but
I guess it must have an aha1542 driver as its doing
somthing!

Without the scsi0=aha1542 port=0x330 in plan9.ini
the machine boots fine.

The error I get is:

    panic: what ? up is zero pc 0x801a413d
    ktrace /kernel/path 80106720 800005c50
   <stack dump...>

I cannot see this error in ther kernel though there is
somthing similar in trap.c - maybe the error message
is getting overwritten by somthing else?

The card is setup for its default configuration from the adaptec manual
(apart from the BIOS and floppy being disabled, and the DMA
speed of 8MB/s) IE port=0x330 dma=5 irq=11.

Looking at the source (below) I wonder if the interrupt structure
has changed a bit since this code was written and the kernel
is more strict about stray interrupts than it used to be?

This is purely a guess. anyone any other / more concrete ideas?

ioalloc and irqalloc attached - BTW I get an error when I cat'ed
these devices: qlock 80186a14 nlocks 1. Dont know if this is relevant.
also the ports reported in /dev/sdstat don't tally with those in
/dev/ioalloc...

-Steve

sdmylex.c:
/*
  * Get the id, DMA and IRQ info from the board. This will
  * cause an interrupt which will hopefully not cause any
  * trouble because the interrupt number isn't known yet.
  * This is necessary as the DMA won't be set up if the
  * board has the BIOS disabled.
  *
  * If the IRQ is already known, this must be a 32-bit PCI
  * or EISA card, in which case the returned DMA and IRQ can
  * be ignored.
  */





[-- Attachment #2: ioalloc --]
[-- Type: application/octet-stream, Size: 544 bytes --]

       0        f dma         
      20       21 i8259.0     
      40       43 i8253       
      60       60 kbd         
      61       61 i8253.cntr2c
      64       64 kbd         
      70       71 rtc/nvr     
      80       8f dma         
      a0       a1 i8259.1     
      d0       df dma         
     1f0      1f7 atacmd      
     2b0      2df vga         
     300      30f tcm509isa   
     3c0      3da vga         
     3f0      3f5 floppy      
     3f6      3f6 atactl      
     3f7      3f7 floppy      

[-- Attachment #3: irqalloc --]
[-- Type: application/octet-stream, Size: 358 bytes --]

          3           0 debugpt
          7           0 mathemu
          9           0 mathover
         14           0 fault386
         16           0 matherror
         32           0 clock
         33           1 kbd
         35           3 COM2
         38           6 floppy
         42          10 ether0
         46          14 sdC (ata)

[-- Attachment #4: sdatat --]
[-- Type: application/octet-stream, Size: 33 bytes --]

sdC ata port 1F0 ctl 3F4 irq 14

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

* Re: [9fans] aha1542 -> kernel panic
  2002-12-31 16:45 [9fans] aha1542 -> kernel panic Steve Simon
@ 2002-12-31 16:57 ` Russ Cox
  2002-12-31 16:58 ` jmk
  2003-01-01 11:15 ` Richard Miller
  2 siblings, 0 replies; 5+ messages in thread
From: Russ Cox @ 2002-12-31 16:57 UTC (permalink / raw)
  To: 9fans

> I cannot see this error in ther kernel though there is
> somthing similar in trap.c - maybe the error message
> is getting overwritten by somthing else?

It's been a while since we rebuilt the install kernel,
so the message is just old.  It's the one from trap.c
that you found.  I reworded it a month or so ago
to make clear what was happening.



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

* Re: [9fans] aha1542 -> kernel panic
  2002-12-31 16:45 [9fans] aha1542 -> kernel panic Steve Simon
  2002-12-31 16:57 ` Russ Cox
@ 2002-12-31 16:58 ` jmk
  2003-01-01 11:15 ` Richard Miller
  2 siblings, 0 replies; 5+ messages in thread
From: jmk @ 2002-12-31 16:58 UTC (permalink / raw)
  To: 9fans

someone has changed the message you get in the current kernel to

		panic("fault but up is zero; pc 0x%8.8lux addr 0x%8.8lux\n", ureg->pc, addr);

it's in trap.c/fault386 and means you have taken a page fault either in an
interrupt handler or during initialisation before the sceduler is started.

use the acid on the kernel binary with the addr given in the panic to
find where the fault happened and we can maybe track it down.


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

* Re: [9fans] aha1542 -> kernel panic
  2002-12-31 16:45 [9fans] aha1542 -> kernel panic Steve Simon
  2002-12-31 16:57 ` Russ Cox
  2002-12-31 16:58 ` jmk
@ 2003-01-01 11:15 ` Richard Miller
  2003-01-01 14:25   ` David Presotto
  2 siblings, 1 reply; 5+ messages in thread
From: Richard Miller @ 2003-01-01 11:15 UTC (permalink / raw)
  To: 9fans

> Without the scsi0=aha1542 port=0x330 in plan9.ini
> the machine boots fine.

There's the clue.  The plan9.ini line should be

scsi0=type=aha1542 port=0x330

Without the "type=" field, isa.type is left as a null pointer and
this line

		if(strcmp(isa.type, "aha1542"))
			continue;

causes the panic.

There are other places in the kernel where a similar panic could
occur.  In the absence of thorough syntax-checking of plan9.ini,
may I suggest adding a defensive

	isa->type = "";

to the beginning of /sys/src/9/pc/main.c:/^isaconfig/ ?

-- Richard Miller



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

* Re: [9fans] aha1542 -> kernel panic
  2003-01-01 11:15 ` Richard Miller
@ 2003-01-01 14:25   ` David Presotto
  0 siblings, 0 replies; 5+ messages in thread
From: David Presotto @ 2003-01-01 14:25 UTC (permalink / raw)
  To: 9fans

> There are other places in the kernel where a similar panic could
> occur.  In the absence of thorough syntax-checking of plan9.ini,
> may I suggest adding a defensive
> 
> 	isa->type = "";
> 
> to the beginning of /sys/src/9/pc/main.c:/^isaconfig/ ?
> 
> -- Richard Miller
> 

done


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

end of thread, other threads:[~2003-01-01 14:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-31 16:45 [9fans] aha1542 -> kernel panic Steve Simon
2002-12-31 16:57 ` Russ Cox
2002-12-31 16:58 ` jmk
2003-01-01 11:15 ` Richard Miller
2003-01-01 14:25   ` David Presotto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).