33 #ifndef _RTEMS_SCORE_CPU_H 34 #define _RTEMS_SCORE_CPU_H 40 #include <rtems/score/types.h> 45 #define RTEMS_USE_16_BIT_OBJECT 68 #define CPU_INLINE_ENABLE_DISPATCH FALSE 97 #define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE 110 #define CPU_SIMPLE_VECTORED_INTERRUPTS TRUE 130 #define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE 144 #define CPU_ALLOCATE_INTERRUPT_STACK TRUE 155 #define CPU_ISR_PASSES_FRAME_POINTER 0 192 #if ( M32C_HAS_FPU == 1 ) 193 #define CPU_HARDWARE_FP TRUE 195 #define CPU_HARDWARE_FP FALSE 197 #define CPU_SOFTWARE_FP FALSE 199 #define CPU_CONTEXT_FP_SIZE 0 225 #define CPU_ALL_TASKS_ARE_FP TRUE 242 #define CPU_IDLE_TASK_IS_FP FALSE 273 #define CPU_USE_DEFERRED_FP_SWITCH TRUE 299 #define CPU_PROVIDES_IDLE_THREAD_BODY TRUE 312 #define CPU_STACK_GROWS_UP TRUE 337 #define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (2))) 339 #define CPU_TIMESTAMP_USE_STRUCT_TIMESPEC TRUE 362 #define CPU_BIG_ENDIAN TRUE 377 #define CPU_LITTLE_ENDIAN FALSE 392 #define CPU_MODES_INTERRUPT_MASK 0x00000001 394 #define CPU_PER_CPU_CONTROL_SIZE 0 472 #define _CPU_Context_Get_SP( _context ) \ 488 uint32_t special_interrupt_register;
533 #define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0 543 #define CPU_INTERRUPT_NUMBER_OF_VECTORS 32 546 #define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1) 552 #define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE 566 #define CPU_STACK_MINIMUM_SIZE (2048L) 569 #define CPU_SIZEOF_POINTER 4 571 #define CPU_SIZEOF_POINTER 2 582 #define CPU_ALIGNMENT 2 607 #define CPU_HEAP_ALIGNMENT 4 625 #define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT 640 #define CPU_STACK_ALIGNMENT 0 655 #define _CPU_Initialize_vectors() 669 #define _CPU_ISR_Disable( _isr_cookie ) \ 672 m32c_get_flg( _flg ); \ 673 _isr_cookie = _flg; \ 674 __asm__ volatile( "fclr I" ); \ 690 #define _CPU_ISR_Enable(_isr_cookie) \ 692 int _flg = (int) (_isr_cookie); \ 693 m32c_set_flg( _flg ); \ 710 #define _CPU_ISR_Flash( _isr_cookie ) \ 712 int _flg = (int) (_isr_cookie); \ 713 m32c_set_flg( _flg ); \ 714 __asm__ volatile( "fclr I" ); \ 734 #define _CPU_ISR_Set_level( _new_level ) \ 736 if (_new_level) __asm__ volatile( "fclr I" ); \ 737 else __asm__ volatile( "fset I" ); \ 793 uint32_t *stack_base,
843 #define _CPU_Context_Fp_start( _base, _offset ) \ 844 ( (void *) _Addresses_Add_offset( (_base), (_offset) ) ) 864 #define _CPU_Context_Initialize_fp( _destination ) \ 866 *(*(_destination)) = _CPU_Null_fp_context; \ 882 #define _CPU_Fatal_halt( _source, _error ) \ 902 #define CPU_USE_GENERIC_BITFIELD_CODE TRUE 912 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE 978 #if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE) 979 #define _CPU_Bitfield_Find_first_bit( _value, _output ) \ 996 #if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE) 998 #define _CPU_Priority_Mask( _bit_number ) \ 999 ( 1 << (_bit_number) ) 1015 #if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE) 1017 #define _CPU_Priority_bits_index( _priority ) \ 1183 static inline uint32_t CPU_swap_u32(
1187 uint32_t byte1, byte2, byte3, byte4, swapped;
1189 byte4 = (value >> 24) & 0xff;
1190 byte3 = (value >> 16) & 0xff;
1191 byte2 = (value >> 8) & 0xff;
1192 byte1 = value & 0xff;
1194 swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
1206 #define CPU_swap_u16( value ) \ 1207 (((value&0xff) << 8) | ((value >> 8)&0xff)) 1214 CPU_Counter_ticks second,
1215 CPU_Counter_ticks first
1218 return second - first;
void _CPU_ISR_install_vector(uint32_t vector, proc_ptr new_handler, proc_ptr *old_handler)
This routine installs an interrupt vector.
Definition: cpu.c:69
void _CPU_Context_validate(uintptr_t pattern)
Initializes and validates the CPU context with values derived from the pattern parameter.
Definition: cpu.h:1109
uint32_t _CPU_ISR_Get_level(void)
Return the current interrupt disable level for this task in the format used by the interrupt level po...
Definition: cpu.c:39
void _CPU_Context_restore(Context_Control *new_context)
This routine is generally used only to restart self in an efficient manner.
Definition: cpu_asm.c:112
void _CPU_Context_switch(Context_Control *run, Context_Control *heir)
CPU switch context.
Definition: cpu_asm.c:92
uint32_t fb
This will contain the frame base pointer.
Definition: cpu.h:460
void _CPU_Context_volatile_clobber(uintptr_t pattern)
Clobbers all volatile registers with values derived from the pattern parameter.
Definition: cpu.h:1104
This defines the minimal set of integer and processor state registers that must be saved during a vol...
Definition: cpu.h:248
void _CPU_Initialize(void)
CPU initialization.
Definition: cpu.c:26
void _CPU_Install_interrupt_stack(void)
This routine installs the hardware interrupt stack pointer.
Definition: cpu.c:101
uint32_t CPU_Counter_ticks
Unsigned integer type for CPU counter values.
Definition: cpu.h:1461
This defines the set of integer and processor state registers that must be saved during an interrupt...
Definition: cpu.h:425
void _CPU_ISR_install_raw_handler(uint32_t vector, proc_ptr new_handler, proc_ptr *old_handler)
This routine installs a "raw" interrupt handler directly into the processor's vector table...
Definition: cpu.c:57
void _CPU_Context_Restart_self(Context_Control *the_context)
This routine is responsible for somehow restarting the currently executing task.
void _CPU_Context_Initialize(Context_Control *the_context, uint32_t *stack_base, uint32_t size, uint32_t new_level, void *entry_point, bool is_fp, void *tls_area)
Initialize the context to a state suitable for starting a task after a context restore operation...
Definition: cpu.c:183
M32C Set up Basic CPU Dependency Settings Based on Compiler Settings.
CPU_Counter_ticks _CPU_Counter_read(void)
Returns the current CPU counter value.
Definition: cpu.c:96
CPU_Counter_ticks _CPU_Counter_difference(CPU_Counter_ticks second, CPU_Counter_ticks first)
Returns the difference between the second and first CPU counter value.
Definition: cpu.h:1160
#define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE
The following macro is a compiler specific way to indicate that the method will NOT return to the cal...
Definition: basedefs.h:162
void _CPU_Exception_frame_print(const CPU_Exception_frame *frame)
Prints the exception frame via printk().
Definition: arm-exception-frame-print.c:46
void * _CPU_Thread_Idle_body(uintptr_t ignored)
This routine is the CPU dependent IDLE thread body.
Definition: cpu.c:125
void * proc_ptr
XXX: Eventually proc_ptr needs to disappear!!!
Definition: basedefs.h:329