51 #define CPU_ISR_PASSES_FRAME_POINTER TRUE 82 #define CPU_HARDWARE_FP FALSE 83 #define CPU_SOFTWARE_FP FALSE 95 #define CPU_ALL_TASKS_ARE_FP FALSE 110 #define CPU_IDLE_TASK_IS_FP FALSE 139 #define CPU_USE_DEFERRED_FP_SWITCH TRUE 141 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE 152 #define CPU_STACK_GROWS_UP FALSE 155 #define CPU_CACHE_LINE_BYTES 32 157 #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES ) 166 #define CPU_MODES_INTERRUPT_MASK 0x00000001 210 #ifdef OR1K_64BIT_ARCH 211 #define or1kreg uint64_t 213 #define or1kreg uint32_t 255 #define _CPU_Context_Get_SP( _context ) \ 260 double some_float_register;
275 #define CPU_CONTEXT_FP_SIZE 0 284 #define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0 292 #define CPU_STACK_MINIMUM_SIZE 4096 300 #define CPU_ALIGNMENT 8 306 #define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE 315 #define CPU_SIZEOF_POINTER 4 338 #define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT 350 #define CPU_STACK_ALIGNMENT 0 352 #define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES 364 #define _CPU_Initialize_vectors() 372 static inline uint32_t or1k_interrupt_disable(
void )
375 sr = _OR1K_mfspr(CPU_OR1K_SPR_SR);
377 _OR1K_mtspr(CPU_OR1K_SPR_SR, (sr & ~CPU_OR1K_SPR_SR_IEE));
382 static inline void or1k_interrupt_enable(uint32_t level)
387 sr = level | CPU_OR1K_SPR_SR_IEE | CPU_OR1K_SPR_SR_TEE;
388 _OR1K_mtspr(CPU_OR1K_SPR_SR, sr);
392 #define _CPU_ISR_Disable( _level ) \ 393 _level = or1k_interrupt_disable() 403 #define _CPU_ISR_Enable( _level ) \ 404 or1k_interrupt_enable( _level ) 414 #define _CPU_ISR_Flash( _level ) \ 416 _CPU_ISR_Enable( _level ); \ 417 _OR1K_mtspr(CPU_OR1K_SPR_SR, (_level & ~CPU_OR1K_SPR_SR_IEE)); \ 422 return ( level & CPU_OR1K_SPR_SR ) != 0;
447 #define OR1K_FAST_CONTEXT_SWITCH_ENABLED FALSE 489 void *stack_area_begin,
490 size_t stack_area_size,
492 void (*entry_point)(
void ),
508 #define _CPU_Context_Restart_self( _the_context ) \ 509 _CPU_Context_restore( (_the_context) ); 525 #define _CPU_Context_Initialize_fp( _fp_area_p ) \ 526 memset( *( _fp_area_p ), 0, CPU_CONTEXT_FP_SIZE ) 541 #define _CPU_Fatal_halt(_source, _error ) \ 542 printk("Fatal Error %d.%" PRId32 " Halted\n",_source, _error); \ 543 _OR1KSIM_CPU_Halt(); \ 548 #define CPU_USE_GENERIC_BITFIELD_CODE TRUE 552 #define CPU_SIZEOF_POINTER 4 554 #define CPU_MAXIMUM_PROCESSORS 32 564 #if !OR1K_FAST_CONTEXT_SWITCH_ENABLED 599 CPU_ISR_raw_handler new_handler,
600 CPU_ISR_raw_handler *old_handler
603 typedef void ( *CPU_ISR_handler )( uint32_t );
607 CPU_ISR_handler new_handler,
608 CPU_ISR_handler *old_handler
613 (CPU_ISR_raw_handler) new_handler,
614 (CPU_ISR_raw_handler *) old_handler
658 void **fp_context_ptr
669 void **fp_context_ptr
693 static inline unsigned int CPU_swap_u32(
697 uint32_t byte1, byte2, byte3, byte4, swapped;
699 byte4 = (value >> 24) & 0xff;
700 byte3 = (value >> 16) & 0xff;
701 byte2 = (value >> 8) & 0xff;
702 byte1 = value & 0xff;
704 swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
708 #define CPU_swap_u16( value ) \ 709 (((value&0xff) << 8) | ((value >> 8)&0xff)) 717 static inline CPU_Counter_ticks _CPU_Counter_difference(
718 CPU_Counter_ticks second,
719 CPU_Counter_ticks first
722 return second - first;
void _CPU_Exception_frame_print(const CPU_Exception_frame *frame)
Prints the exception frame via printk().
Definition: vectorexceptions.c:45
void _CPU_ISR_Set_level(uint32_t level)
Sets the hardware interrupt level by the level value.
Definition: cpu.c:57
CPU_Counter_ticks _CPU_Counter_read(void)
Returns the current CPU counter value.
Definition: system-clocks.c:117
Thread register context.
Definition: cpu.h:196
void * _CPU_Thread_Idle_body(uintptr_t ignored)
Definition: idle-mcf5272.c:20
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
void _CPU_Context_restore_fp(Context_Control_fp **fp_context_ptr)
Definition: cpu.c:207
Interrupt stack frame (ISF).
Definition: cpu.h:306
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_Context_switch(Context_Control *run, Context_Control *heir)
CPU switch context.
Definition: cpu_asm.c:91
void _CPU_Initialize(void)
CPU initialization.
Definition: cpu.c:45
SPARC basic context.
Definition: cpu.h:242
Provide printf() PRIxxx Constante Beyond Standards.
uint32_t CPU_Counter_ticks
Unsigned integer type for CPU counter values.
Definition: cpu.h:1202
#define RTEMS_NO_RETURN
Definition: basedefs.h:101
Interface to Kernel Print Methods.
uint32_t _CPU_ISR_Get_level(void)
Definition: cpu.c:88
unsigned context
Definition: tlb.h:108
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:703
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:381
void _CPU_Context_restore(Context_Control *new_context) RTEMS_NO_RETURN
Definition: cpu_asm.c:111
uintptr_t CPU_Uint32ptr
Definition: cpu.h:668
uint32_t _CPU_Counter_frequency(void)
Returns the current CPU counter frequency in Hz.
Definition: system-clocks.c:112
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:605
void _CPU_Context_save_fp(Context_Control_fp **fp_context_ptr)
Definition: cpu.c:198
The set of registers that specifies the complete processor state.
Definition: cpu.h:635