22#ifndef _RTEMS_SCORE_CPU_H
23#define _RTEMS_SCORE_CPU_H
40#define RTEMS_USE_32_BIT_OBJECT
53#define CPU_SIMPLE_VECTORED_INTERRUPTS TRUE
55#define CPU_HARDWARE_FP FALSE
57#define CPU_SOFTWARE_FP FALSE
59#define CPU_ALL_TASKS_ARE_FP FALSE
61#define CPU_IDLE_TASK_IS_FP FALSE
63#define CPU_USE_DEFERRED_FP_SWITCH FALSE
65#define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
78#define CPU_STACK_GROWS_UP FALSE
81#define CPU_CACHE_LINE_BYTES 32
83#define CPU_STRUCTURE_ALIGNMENT
94#define CPU_MODES_INTERRUPT_MASK 0x00000001
96#define CPU_MAXIMUM_PROCESSORS 32
147#define nogap __attribute__ ((packed))
168#define _CPU_Context_Get_SP( _context ) \
184#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
194#define CPU_INTERRUPT_NUMBER_OF_VECTORS 64
195#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER \
196 (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
202#define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE
212#define CPU_STACK_MINIMUM_SIZE (1536)
221#define CPU_SIZEOF_POINTER 4
231#define CPU_ALIGNMENT 8
248#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
262#define CPU_STACK_ALIGNMENT 0
264#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
273#define _CPU_Initialize_vectors()
283#define _CPU_ISR_Disable( _isr_cookie ) \
297#define _CPU_ISR_Enable( _isr_cookie ) \
299 (_isr_cookie) = (_isr_cookie); \
312#define _CPU_ISR_Flash( _isr_cookie ) \
314 _CPU_ISR_Enable( _isr_cookie ); \
315 _CPU_ISR_Disable( _isr_cookie ); \
337#define _CPU_ISR_Set_level( _new_level ) \
339 if (_new_level) asm volatile ( "nop\n" ); \
340 else asm volatile ( "nop\n" ); \
374#define CPU_CCR_INTERRUPTS_ON 0x80
375#define CPU_CCR_INTERRUPTS_OFF 0x00
377#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
378 _isr, _entry_point, _is_fp, _tls_area ) \
385 _stack = ((uintptr_t)(_stack_base)) + (_size) - 8; \
386 *((void (**)(void))(_stack)) = (_entry_point); \
388 (_the_context)->fp = (void *)_stack; \
389 (_the_context)->sp = (void *)_stack; \
406#define _CPU_Context_Restart_self( _the_context ) \
407 _CPU_Context_restore( (_the_context) );
422#define _CPU_Fatal_halt( _source, _error ) \
423 printk("Fatal Error %d.%lu Halted\n",_source,_error); \
428#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
443typedef void ( *CPU_ISR_handler )( uint32_t );
447 CPU_ISR_handler new_handler,
448 CPU_ISR_handler *old_handler
493 uint32_t integer_registers [16];
526static inline uint32_t CPU_swap_u32(
530 uint32_t byte1, byte2, byte3, byte4, swapped;
532 byte4 = (value >> 24) & 0xff;
533 byte3 = (value >> 16) & 0xff;
534 byte2 = (value >> 8) & 0xff;
535 byte1 = value & 0xff;
537 swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
541#define CPU_swap_u16( value ) \
542 (((value&0xff) << 8) | ((value >> 8)&0xff))
550static inline CPU_Counter_ticks _CPU_Counter_difference(
551 CPU_Counter_ticks second,
552 CPU_Counter_ticks first
555 return second - first;
Interface to Kernel Print Methods.
#define RTEMS_NO_RETURN
Definition: basedefs.h:102
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
bool _CPU_ISR_Is_enabled(uint32_t level)
Returns true if interrupts are enabled in the specified ISR level, otherwise returns false.
Definition: cpu.h:375
void * _CPU_Thread_Idle_body(uintptr_t ignored)
Definition: idle-mcf5272.c:20
void _CPU_Initialize(void)
CPU initialization.
Definition: cpu.c:45
uintptr_t CPU_Uint32ptr
Definition: cpu.h:662
RTEMS_INLINE_ROUTINE void _CPU_ISR_install_vector(uint32_t vector, CPU_ISR_handler new_handler, CPU_ISR_handler *old_handler)
SPARC specific RTEMS ISR installer.
Definition: cpu.h:493
uint32_t _CPU_Counter_frequency(void)
Returns the current CPU counter frequency in Hz.
Definition: system-clocks.c:112
void _CPU_Context_switch(Context_Control *run, Context_Control *heir)
CPU switch context.
Definition: cpu_asm.c:91
CPU_Counter_ticks _CPU_Counter_read(void)
Returns the current CPU counter value.
Definition: system-clocks.c:117
void _CPU_Context_restore(Context_Control *new_context) RTEMS_NO_RETURN
Definition: cpu_asm.c:111
uint32_t _CPU_ISR_Get_level(void)
Definition: cpu.c:88
void _CPU_Exception_frame_print(const CPU_Exception_frame *frame)
Prints the exception frame via printk().
Definition: vectorexceptions.c:45
#define sp
stack-pointer */
Definition: regs.h:64
#define fp
frame-pointer */
Definition: regs.h:65
uint32_t CPU_Counter_ticks
Unsigned integer type for CPU counter values.
Definition: cpu.h:1210
The set of registers that specifies the complete processor state.
Definition: cpu.h:629
Interrupt stack frame (ISF).
Definition: cpu.h:191
uint32_t special_interrupt_register
Definition: cpu.h:172
Thread register context.
Definition: cpu.h:194