AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20070306170801.7dfd9186@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<warren.gale@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	BB375AF679D4A34E9CA8DFA650E2B04E02B74E5E@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Tue, 6 Mar 2007 17:08:25 -0800
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Warren Gale" <warren.gale@onstor.com>
Subject: Re: BSD Exception Stuff ??
Message-ID: <20070306170825.21f79599@ripper.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E02B74E5E@onstor-exch02.onstor.net>
References: <BB375AF679D4A34E9CA8DFA650E2B04E02B74E5E@onstor-exch02.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

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