source: rtems/cpukit/score/cpu/no_cpu/cpu.c @ fe31ab2

4.104.115
Last change on this file since fe31ab2 was fe31ab2, checked in by Joel Sherrill <joel.sherrill@…>, on 03/27/10 at 15:02:26

2010-03-27 Joel Sherrill <joel.sherrill@…>

  • cpu.c, cpu_asm.c: Add include of config.h
  • Property mode set to 100644
File size: 3.6 KB
Line 
1/*
2 *  XXX CPU Dependent Source
3 *
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15#ifdef HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <rtems/system.h>
20#include <rtems/score/isr.h>
21#include <rtems/score/wkspace.h>
22
23/*  _CPU_Initialize
24 *
25 *  This routine performs processor dependent initialization.
26 *
27 *  INPUT PARAMETERS: NONE
28 *
29 *  NO_CPU Specific Information:
30 *
31 *  XXX document implementation including references if appropriate
32 */
33
34void _CPU_Initialize(void)
35{
36  /*
37   *  If there is not an easy way to initialize the FP context
38   *  during Context_Initialize, then it is usually easier to
39   *  save an "uninitialized" FP context here and copy it to
40   *  the task's during Context_Initialize.
41   */
42
43  /* FP context initialization support goes here */
44}
45
46/*PAGE
47 *
48 *  _CPU_ISR_Get_level
49 *
50 *  NO_CPU Specific Information:
51 *
52 *  XXX document implementation including references if appropriate
53 */
54
55uint32_t   _CPU_ISR_Get_level( void )
56{
57  /*
58   *  This routine returns the current interrupt level.
59   */
60
61  return 0;
62}
63
64/*PAGE
65 *
66 *  _CPU_ISR_install_raw_handler
67 *
68 *  NO_CPU Specific Information:
69 *
70 *  XXX document implementation including references if appropriate
71 */
72
73void _CPU_ISR_install_raw_handler(
74  uint32_t    vector,
75  proc_ptr    new_handler,
76  proc_ptr   *old_handler
77)
78{
79  /*
80   *  This is where we install the interrupt handler into the "raw" interrupt
81   *  table used by the CPU to dispatch interrupt handlers.
82   */
83}
84
85/*PAGE
86 *
87 *  _CPU_ISR_install_vector
88 *
89 *  This kernel routine installs the RTEMS handler for the
90 *  specified vector.
91 *
92 *  Input parameters:
93 *    vector      - interrupt vector number
94 *    old_handler - former ISR for this vector number
95 *    new_handler - replacement ISR for this vector number
96 *
97 *  Output parameters:  NONE
98 *
99 *
100 *  NO_CPU Specific Information:
101 *
102 *  XXX document implementation including references if appropriate
103 */
104
105void _CPU_ISR_install_vector(
106  uint32_t    vector,
107  proc_ptr    new_handler,
108  proc_ptr   *old_handler
109)
110{
111   *old_handler = _ISR_Vector_table[ vector ];
112
113   /*
114    *  If the interrupt vector table is a table of pointer to isr entry
115    *  points, then we need to install the appropriate RTEMS interrupt
116    *  handler for this vector number.
117    */
118
119   _CPU_ISR_install_raw_handler( vector, new_handler, old_handler );
120
121   /*
122    *  We put the actual user ISR address in '_ISR_vector_table'.  This will
123    *  be used by the _ISR_Handler so the user gets control.
124    */
125
126    _ISR_Vector_table[ vector ] = new_handler;
127}
128
129/*PAGE
130 *
131 *  _CPU_Install_interrupt_stack
132 *
133 *  NO_CPU Specific Information:
134 *
135 *  XXX document implementation including references if appropriate
136 */
137
138void _CPU_Install_interrupt_stack( void )
139{
140}
141
142/*PAGE
143 *
144 *  _CPU_Thread_Idle_body
145 *
146 *  NOTES:
147 *
148 *  1. This is the same as the regular CPU independent algorithm.
149 *
150 *  2. If you implement this using a "halt", "idle", or "shutdown"
151 *     instruction, then don't forget to put it in an infinite loop.
152 *
153 *  3. Be warned. Some processors with onboard DMA have been known
154 *     to stop the DMA if the CPU were put in IDLE mode.  This might
155 *     also be a problem with other on-chip peripherals.  So use this
156 *     hook with caution.
157 *
158 *  NO_CPU Specific Information:
159 *
160 *  XXX document implementation including references if appropriate
161 */
162
163void *_CPU_Thread_Idle_body( uintptr_t ignored )
164{
165
166  for( ; ; )
167    /* insert your "halt" instruction here */ ;
168}
Note: See TracBrowser for help on using the repository browser.