Subject: Re: Son of unexpected trap
To: None <>
From: Michael L. Hitch <>
List: amiga-dev
Date: 07/22/1994 09:27:39
On Jul 21, 11:23pm, Andrew Cherry wrote:
> Andrew Cherry writes:
>  > Recently, I sent a message to amiga-dev about getting an unexpected
>  > trap while trying to boot a recent kernel (from sources sup'ed on
>  > Monday).  I put a call to panic() in straytrap() in order to enter the
>  > debugger (L-Amiga Alt F10 wouldn't work), so now I can provide more
>  > information.  Here is the trace:
> After further investigation, I have found how to avoid this.  Removing
> "ed0		at ztwobus0		# dp8390 ethernet"
> from the GENERIC config file fixed the problem (yes, it was a pain
> to find this out).  My kernel now boots properly.  I don't own
> a dp8390 ethernet card, so I have no idea why this is happening!
> Is this a recent addition to the kernel, or has it been changed
> recently?

  The ed0 device was recently added - it supports the Hydra Ethernet card
if I remember correctly.  I think what is happening is that when the interrupt
routine is called to see if the interrupt is from the ed0 device, it doesn't
check correctly to see if the device was even configured.  I ran into the
same problem with the IDE driver.  The check in if_ed.c is:

        if ((sc = edcd.cd_devs[unit]) == NULL)
                return (0);
This check isn't quite correct, as edcd.cd_devs is a pointer to a table of
pointers.  That pointer should initially be NULL, but the above check is
really testing to see if the contents at address 0 is NULL, which it won't
be - it's a jump to a panic routine (for any kernel calls to a NULL address).
If this is the case, that value is going to be used as the address of the
device structure for ed0 and certainly isn't going to work.


Michael L. Hitch			INTERNET:
Computer Consultant
Office of Systems and Computing Services
Montana State University	Bozeman, MT	USA