This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 68000/RTEMS question..




   In message <013201bdb0f9$8b8d4b00$3aee67c7@don.blaze-net.com>, you write:
 
| Howdy,
| 
| I am working on a port of the gen68302 BSP to my own 68302 based module.
| In reading through the initialization code I am having trouble seeing how
| interrupts are set in the vector table for a 68000 (ie NO_VBR). Does anyone
| actually have RTEMS running on a 68000 based processor?

Version 3.6.0?

The 68hc000 based efi68k BSP uses the vector jump table from ROM.
A working version of 3.6.0 is available at
http://efi332.eng.ohio-state.edu/pub/efi332/RTEMS.

|         1: I cannot explain why the vector number is multiplied by 6
|            and then 10 subtracted to get the address to store the ISR
|            service routine.

6 byte jsr instruction. vector 2 is the first; 6*2 = 12, the
first two byte hold the jsr instruction the next 4 are the address.
vec*6-10 is the address field in the jsr jmp table.

|         2: How does ISR_Handler calculate the vector number to then use
|            to call into the ISR dispatch table.

It pulls the return address of the jsr off the stack and reverse the
above.

Hope that helps... It's different in the pre 4.0 versions.

John

---------------------------------------------------------
                                John S Gwynne, PhD.
Mission Research Corporation    Email: jgwynne@mrcday.com
3975 Research Blvd              Tel: (937) 429-9261
Dayton Ohio 45430-2625          Fax: (937) 429-2625
---------------------------------------------------------