27#ifndef _RTEMS_SCORE_CPU_H
28#define _RTEMS_SCORE_CPU_H
50#define CPU_SIMPLE_VECTORED_INTERRUPTS TRUE
58#define CPU_ISR_PASSES_FRAME_POINTER FALSE
76#define CPU_HARDWARE_FP TRUE
77#define CPU_SOFTWARE_FP FALSE
79#define CPU_SOFTWARE_FP FALSE
80#define CPU_HARDWARE_FP FALSE
93#define CPU_ALL_TASKS_ARE_FP TRUE
95#define CPU_ALL_TASKS_ARE_FP FALSE
111#define CPU_IDLE_TASK_IS_FP TRUE
113#define CPU_IDLE_TASK_IS_FP FALSE
143#define CPU_USE_DEFERRED_FP_SWITCH FALSE
145#define CPU_USE_DEFERRED_FP_SWITCH TRUE
148#define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
158#define CPU_STACK_GROWS_UP FALSE
161#define CPU_CACHE_LINE_BYTES 16
163#define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
171#define CPU_MODES_INTERRUPT_MASK 0x0000000f
173#define CPU_MAXIMUM_PROCESSORS 32
251#define _CPU_Context_Get_SP( _context ) \
256#ifdef SH4_USE_X_REGISTERS
290void CPU_delay( uint32_t microseconds );
299#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
307#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
314#define CPU_INTERRUPT_NUMBER_OF_VECTORS 256
315#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
322#define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE
332#define CPU_STACK_MINIMUM_SIZE 4096
334#define CPU_SIZEOF_POINTER 4
342#define CPU_ALIGNMENT 8
344#define CPU_ALIGNMENT 4
359#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
370#define CPU_STACK_ALIGNMENT CPU_ALIGNMENT
372#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
384#define _CPU_Initialize_vectors()
391#define _CPU_ISR_Disable( _level) \
392 sh_disable_interrupts( _level )
400#define _CPU_ISR_Enable( _level) \
401 sh_enable_interrupts( _level)
410#define _CPU_ISR_Flash( _level) \
411 sh_flash_interrupts( _level)
415 sh_get_interrupt_level( level );
430#define _CPU_ISR_Set_level( _newlevel) \
431 sh_set_interrupt_level(_newlevel)
468 void (*_entry_point)(
void),
482#define _CPU_Context_Restart_self( _the_context ) \
483 _CPU_Context_restore( (_the_context) );
499#define _CPU_Context_Initialize_fp( _destination ) \
501 *(*(_destination)) = _CPU_Null_fp_context;\
504#define _CPU_Context_Initialize_fp( _destination ) \
523 void bsp_fatal_halt( uint32_t _error);
524#define _CPU_Fatal_halt( _source, _error ) bsp_fatal_halt( _error)
526#define _CPU_Fatal_halt( _source, _error)\
528 __asm__ volatile("mov.l %0,r0"::"m" (_error)); \
529 __asm__ volatile("mov #1, r4"); \
530 __asm__ volatile("trapa #34"); \
536#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
549typedef void ( *CPU_ISR_raw_handler )( void );
551extern CPU_ISR_raw_handler _Hardware_isr_Table[];
555 CPU_ISR_raw_handler new_handler,
556 CPU_ISR_raw_handler *old_handler
559typedef void ( *CPU_ISR_handler )( uint32_t );
563 CPU_ISR_handler new_handler,
564 CPU_ISR_handler *old_handler
622static inline CPU_Counter_ticks _CPU_Counter_difference(
623 CPU_Counter_ticks second,
624 CPU_Counter_ticks first
627 return second - first;
635typedef void ( *sh_isr_entry )( void );
#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_Context_Initialize(Context_Control *context, void *stack_area_begin, size_t stack_area_size, uint32_t new_level, void(*entry_point)(void), bool is_fp, void *tls_area)
Initializes the CPU context.
Definition: epiphany-context-initialize.c:40
void _CPU_Exception_frame_print(const CPU_Exception_frame *frame)
Prints the exception frame via printk().
Definition: vectorexceptions.c:45
RTEMS_INLINE_ROUTINE void _CPU_ISR_install_raw_handler(uint32_t vector, CPU_ISR_raw_handler new_handler, CPU_ISR_raw_handler *old_handler)
SPARC specific raw ISR installer.
Definition: cpu.h:649
uint32_t CPU_Counter_ticks
Unsigned integer type for CPU counter values.
Definition: cpu.h:1210
Context_Control_fp _CPU_Null_fp_context
void sh_isr
Definition: cpu.h:634
Hitachi SH CPU Department Source.
#define _CPU_Context_restore_fp(_fp_context_ptr)
Nothing to do due to the synchronous or lazy floating point switch.
Definition: cpu.h:904
#define _CPU_Context_save_fp(_fp_context_ptr)
Nothing to do due to the synchronous or lazy floating point switch.
Definition: cpu.h:898
The set of registers that specifies the complete processor state.
Definition: cpu.h:629
Interrupt stack frame (ISF).
Definition: cpu.h:191
SPARC basic context.
Definition: cpu.h:194
Thread register context.
Definition: cpu.h:194
unsigned pr
Definition: tlb.h:15