X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C76055.7A04DED8@onstor-exch02.onstor.net>; Tue, 6 Mar 2007 18:11:03 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: BSD Exception Stuff ??
Date: Tue, 6 Mar 2007 18:11:03 -0700
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E02B74E84@onstor-exch02.onstor.net>
In-Reply-To: <20070306170825.21f79599@ripper.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: BSD Exception Stuff ??
Thread-Index: AcdgVRufhU3wBCfhRamnGnQFNEqKwAAAFCew
From: "Warren Gale" <warren.gale@onstor.com>
To: "Andy Sharp" <andy.sharp@onstor.com>

Cool..
Thanks.

-----Original Message-----
From: Andy Sharp=20
Sent: Tuesday, March 06, 2007 5:08 PM
To: Warren Gale
Subject: Re: BSD Exception Stuff ??

So, I think I fixed my exception vector problem anyway, although I'm
not sure how I can tell other than I now get quite a bit farther before
I take a PROM exception, a TLBL miss in this case.

I had made a bogey in some startup code that was supposed to skip some
junk that I thought might be hosing the exception vector table, if
CONFIG_ONSTOR_BOBCAT was set, but instead I put just ONSTOR_BOBCAT, so
it was hosing the exception vector initialization just like I thought
it would.  Sigh.

Of course, I'm not sure why I'm getting a TLBL miss exception into the
PROM, but it's probably the best thing to do since I don't have any
console output at the moment.  So, either the exception vector table
thing is fixed and the kernel is incredibly smart, or, it's not as
fixed as I think.

I'll keep you informed.

Cheers,

a



On Tue, 6 Mar 2007 16:58:45 -0800 "Warren Gale"
<warren.gale@onstor.com> wrote:

> Andy,
>=20
>    Found some interesting comments in the BSD  "machdep.c"
>=20
>  file.
>=20
> =20
>=20
> In my r133work  branch:
>=20
> r133work/openbsd/src/sys/arch/pmonmips/pmonmips/machdep.c
>=20
> =20
>=20
> mips_init function...  Dang It's a big one...
>=20
> =20
>=20
> =20
>=20
> #ifdef BOBCAT
>=20
> /*
>=20
>  * XXX replace define with PROM environment variable.
>=20
>  * Since BOBCAT is a dual cpu environment, and the exception
>=20
>  * vectors are shared by cpu0 and cpu1, the PROM implements
>=20
>  * a jump table to the per processor exception table.
>=20
>  */
>=20
> #define OS_EXC_OFFSET   0x400
>=20
> #else
>=20
> #define OS_EXC_OFFSET   0
>=20
> #endif /* BOBCAT */
>=20
> =20
>=20
>         /*
>=20
>          * Copy down exception vector code.
>=20
>          */
>=20
>         if (MipsTLBMissEnd - MipsTLBMiss > 0x80)
>=20
>                 panic("startup: TLB code too large");
>=20
>         bcopy(MipsTLBMiss, (char *)(TLB_MISS_EXC_VEC + OS_EXC_OFFSET),
>=20
>                 MipsTLBMissEnd - MipsTLBMiss);
>=20
> #if 1
>=20
>         bcopy(MipsException, (char *)(GEN_EXC_VEC + OS_EXC_OFFSET),
>=20
>                 MipsExceptionEnd - MipsException);
>=20
> #else
>=20
>         bcopy(MipsException, MipsException,
>=20
>                 MipsExceptionEnd - MipsException);
>=20
> #endif
>=20
> =20
>=20
> =20
>=20
> Don't know if this helps at all.
>=20
> Warren
>=20
