RTEMS目录梳理Sparc

和sparc有关的目录有三个:

rtems-4.6.0\cpukit\score\cpu\sparc\cpu.c

rtems-4.6.0\c\src\lib\libbsp\sparc\shared\bspstart.c

rtems-4.6.0\c\src\lib\libcpu\sparc\cache\cache.c

rtems-4.6.0\cpukit\score\include\rtems\score\isr.h

11 #define _ISR_Install_vector( _vector, _new_handler, _old_handler ) \
12   _CPU_ISR_install_vector( _vector, _new_handler, _old_handler )

rtems-4.6.0\cpukit\score\cpu\sparc\cpu.c

 1 /*PAGE
 2  *
 3  *  _CPU_ISR_install_vector
 4  *
 5  *  This kernel routine installs the RTEMS handler for the
 6  *  specified vector.
 7  *
 8  *  Input parameters:
 9  *    vector       - interrupt vector number
10  *    new_handler  - replacement ISR for this vector number
11  *    old_handler  - pointer to former ISR for this vector number
12  *
13  *  Output parameters: 
14  *    *old_handler - former ISR for this vector number
15  *
16  */
17 
18 void _CPU_ISR_install_vector(
19   unsigned32  vector,
20   proc_ptr    new_handler,
21   proc_ptr   *old_handler
22 )
23 {
24    unsigned32 real_vector;
25    proc_ptr   ignored;
26 
27   /*
28    *  Get the "real" trap number for this vector ignoring the synchronous
29    *  versus asynchronous indicator included with our vector numbers.
30    */
31 
32    real_vector = SPARC_REAL_TRAP_NUMBER( vector );
33 
34    /*
35     *  Return the previous ISR handler.
36     */
37 
38    *old_handler = _ISR_Vector_table[ real_vector ];
39 
40    /*
41     *  Install the wrapper so this ISR can be invoked properly.
42     */
43 
44    _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
45 
46    /*
47     *  We put the actual user ISR address in '_ISR_vector_table'.  This will
48     *  be used by the _ISR_Handler so the user gets control.
49     */
50 
51     _ISR_Vector_table[ real_vector ] = new_handler;
52 }
View Code

地方大幅度

猜你喜欢

转载自www.cnblogs.com/yanhc/p/12676370.html
今日推荐