mbar and bus error (was: some newbie questions)

Ed Sutter els at emailbox.hdtv.lucent.com
Mon Feb 23 13:08:08 UTC 2004


Did you verify whether or not access to MBAR requires supervisor level?
And then, whether or not your monitor is running at supervisor level?
Ed

sebastian ssmoller wrote:
> 
> hi,
> during the last days i tried to access MBAR on my board (68360/040).
> without any success. even read access causes a bus error :(
> 
> i reread the doc of my board and the quicc (6.8, 9.2, 4.4.3, 6.9.1, aso)
> and i guess the initialisation sequence i use  is correct.
> 
> i also downloaded the linux kernel (2.6.3) and had a look at the init
> sequence used there - it is more or less the same.
> 
> i googled around for some hours - the sample code/doc i found uses the same
> init seq as rtems/linux/my test prog.
> 
> i wrote simple asm prog to isolate the problematic code - no success.
> 
> thats the code:
> 
> start:
>     movel #0,dptr     /* my debug var to see where the prog hangs */
>     movel #0,dptr+4
>     movel #0,dptr+8
> 
>     /* SSP */
>     oriw   #0x3000,sr          | Switch to Master Stack Pointer
>    oriw    #0x2700,sr
>    movea.l   #stack_init,sp
>     move.l  #stack_init,a7
> 
>     addql #1,dptr
> 
>     /* VBR */
>     lea       int_vec_tab,a0       | Get base of vector table
>     movec   a0,vbr             | Set up the VBR
> 
>     addql #1,dptr
> 
>     /* pre MBAR work */
>     movec   dfc,d1             | Save destination register
> 
>     moveq   #7,d0             | CPU-space funcction code
>     movec   d0,dfc             | Set destination function code register
>     movec   d0,sfc             | Set source function code register
> 
>     addql #1,dptr
> 
>     lea    0x3ff04,a0
>     movel   #0xfffffffe,0x3FF08   | Set MBARE (keyed write)
> 
>     move.l 0x3ff08,dptr+4
> 
>     addql #1,dptr
> 
>     /* get MBAR */
>     moves.l (a0), d0
>     move.l d0,dptr+8
> 
>     addql #1,dptr
> 
>     /* set MBAR */
>     /*
>     move.l    #m360+0x101,d0
>     move.l    #0xffc00000,d0
>     */
>     move.l    #0xffc00000,d0
>     ori.l   #0x00000101,d0
>     moves.l d0,(a0)             | set MBAR
> 
>     addql #1,dptr
> 
>     /* post MBAR work */
>     movec   d1,dfc             | Restore destination register
> 
>     /* removed the rest here (e.g. interrupt table (copied from rtems))*/
> 
> i havnt any further ideas what the problem could be.
> 
> anyone any hint/info/... ?
> 
> thx
> regards,
> seb



More information about the users mailing list