1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief No CPU Dependent Source |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * COPYRIGHT (c) 1989-1999. |
---|
9 | * On-Line Applications Research Corporation (OAR). |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.rtems.org/license/LICENSE. |
---|
14 | */ |
---|
15 | |
---|
16 | #ifdef HAVE_CONFIG_H |
---|
17 | #include "config.h" |
---|
18 | #endif |
---|
19 | |
---|
20 | #include <rtems/score/isr.h> |
---|
21 | #include <rtems/score/wkspace.h> |
---|
22 | |
---|
23 | void _CPU_Initialize(void) |
---|
24 | { |
---|
25 | /* |
---|
26 | * If there is not an easy way to initialize the FP context |
---|
27 | * during Context_Initialize, then it is usually easier to |
---|
28 | * save an "uninitialized" FP context here and copy it to |
---|
29 | * the task's during Context_Initialize. |
---|
30 | */ |
---|
31 | |
---|
32 | /* FP context initialization support goes here */ |
---|
33 | } |
---|
34 | |
---|
35 | uint32_t _CPU_ISR_Get_level( void ) |
---|
36 | { |
---|
37 | /* |
---|
38 | * This routine returns the current interrupt level. |
---|
39 | */ |
---|
40 | |
---|
41 | return 0; |
---|
42 | } |
---|
43 | |
---|
44 | /* |
---|
45 | * _CPU_ISR_install_raw_handler |
---|
46 | * |
---|
47 | * NO_CPU Specific Information: |
---|
48 | * |
---|
49 | * XXX document implementation including references if appropriate |
---|
50 | */ |
---|
51 | |
---|
52 | void _CPU_ISR_install_raw_handler( |
---|
53 | uint32_t vector, |
---|
54 | CPU_ISR_raw_handler new_handler, |
---|
55 | CPU_ISR_raw_handler *old_handler |
---|
56 | ) |
---|
57 | { |
---|
58 | /* |
---|
59 | * This is where we install the interrupt handler into the "raw" interrupt |
---|
60 | * table used by the CPU to dispatch interrupt handlers. |
---|
61 | */ |
---|
62 | } |
---|
63 | |
---|
64 | void _CPU_ISR_install_vector( |
---|
65 | uint32_t vector, |
---|
66 | CPU_ISR_handler new_handler, |
---|
67 | CPU_ISR_handler *old_handler |
---|
68 | ) |
---|
69 | { |
---|
70 | CPU_ISR_raw_handler ignored; |
---|
71 | |
---|
72 | *old_handler = _ISR_Vector_table[ vector ]; |
---|
73 | |
---|
74 | /* |
---|
75 | * If the interrupt vector table is a table of pointer to isr entry |
---|
76 | * points, then we need to install the appropriate RTEMS interrupt |
---|
77 | * handler for this vector number. |
---|
78 | */ |
---|
79 | |
---|
80 | _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored ); |
---|
81 | |
---|
82 | /* |
---|
83 | * We put the actual user ISR address in '_ISR_vector_table'. This will |
---|
84 | * be used by the _ISR_Handler so the user gets control. |
---|
85 | */ |
---|
86 | |
---|
87 | _ISR_Vector_table[ vector ] = new_handler; |
---|
88 | } |
---|
89 | |
---|
90 | /* |
---|
91 | * _CPU_Thread_Idle_body |
---|
92 | * |
---|
93 | * NOTES: |
---|
94 | * |
---|
95 | * 1. This is the same as the regular CPU independent algorithm. |
---|
96 | * |
---|
97 | * 2. If you implement this using a "halt", "idle", or "shutdown" |
---|
98 | * instruction, then don't forget to put it in an infinite loop. |
---|
99 | * |
---|
100 | * 3. Be warned. Some processors with onboard DMA have been known |
---|
101 | * to stop the DMA if the CPU were put in IDLE mode. This might |
---|
102 | * also be a problem with other on-chip peripherals. So use this |
---|
103 | * hook with caution. |
---|
104 | * |
---|
105 | * NO_CPU Specific Information: |
---|
106 | * |
---|
107 | * XXX document implementation including references if appropriate |
---|
108 | */ |
---|
109 | |
---|
110 | void *_CPU_Thread_Idle_body( uintptr_t ignored ) |
---|
111 | { |
---|
112 | |
---|
113 | for( ; ; ) |
---|
114 | /* insert your "halt" instruction here */ ; |
---|
115 | } |
---|