19 #ifndef _RTEMS_SCORE_CPU_H 20 #define _RTEMS_SCORE_CPU_H 26 #include <rtems/score/types.h> 32 #ifndef RTEMS_USE_16_BIT_OBJECT 33 #define RTEMS_USE_16_BIT_OBJECT 57 #define CPU_INLINE_ENABLE_DISPATCH FALSE 87 #define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE 108 #define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE 123 #define CPU_ALLOCATE_INTERRUPT_STACK TRUE 135 #define CPU_ISR_PASSES_FRAME_POINTER 0 148 #define CPU_SIMPLE_VECTORED_INTERRUPTS TRUE 176 #if ( AVR_HAS_FPU == 1 ) 177 #define CPU_HARDWARE_FP TRUE 179 #define CPU_HARDWARE_FP FALSE 181 #define CPU_SOFTWARE_FP FALSE 208 #define CPU_ALL_TASKS_ARE_FP TRUE 226 #define CPU_IDLE_TASK_IS_FP FALSE 258 #define CPU_USE_DEFERRED_FP_SWITCH TRUE 285 #define CPU_PROVIDES_IDLE_THREAD_BODY TRUE 299 #define CPU_STACK_GROWS_UP FALSE 325 #define CPU_STRUCTURE_ALIGNMENT 327 #define CPU_TIMESTAMP_USE_STRUCT_TIMESPEC TRUE 338 #define CPU_BIG_ENDIAN TRUE 339 #define CPU_LITTLE_ENDIAN FALSE 351 #define CPU_MODES_INTERRUPT_MASK 0x00000001 353 #define CPU_PER_CPU_CONTROL_SIZE 0 411 uint16_t stack_pointer;
415 #define _CPU_Context_Get_SP( _context ) \ 416 (_context)->stack_pointer 465 #define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp ) 477 #define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0 488 #define CPU_INTERRUPT_NUMBER_OF_VECTORS 32 489 #define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1) 496 #define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE 507 #define CPU_STACK_MINIMUM_SIZE 512 512 #define CPU_PRIORITY_MAXIMUM 15 514 #define CPU_SIZEOF_POINTER 2 525 #define CPU_ALIGNMENT 4 551 #define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT 569 #define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT 584 #define CPU_STACK_ALIGNMENT 0 598 #define _CPU_Initialize_vectors() 609 #define _CPU_ISR_Disable( _isr_cookie ) \ 611 (_isr_cookie) = SREG; \ 612 __asm__ volatile ("cli"::); \ 625 #define _CPU_ISR_Enable( _isr_cookie ) \ 627 SREG = _isr_cookie; \ 628 __asm__ volatile ("sei"::); \ 642 #define _CPU_ISR_Flash( _isr_cookie ) \ 644 SREG=(_isr_cookie); \ 645 __asm__ volatile("sei"::); \ 646 (_isr_cookie) = SREG; \ 647 __asm__ volatile("cli"::); \ 733 #define _CPU_Context_Restart_self( _the_context ) \ 734 _CPU_Context_restore( _the_context ); 754 #define _CPU_Context_Fp_start( _base, _offset ) \ 755 ( (void *) _Addresses_Add_offset( (_base), (_offset) ) ) 773 #define _CPU_Context_Initialize_fp( _destination ) \ 775 *(*(_destination)) = _CPU_Null_fp_context; \ 792 #define _CPU_Fatal_halt( _source, _error ) \ 859 #define CPU_USE_GENERIC_BITFIELD_CODE TRUE 860 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE 862 #if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE) 864 #define _CPU_Bitfield_Find_first_bit( _value, _output ) \ 883 #if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE) 885 #define _CPU_Priority_Mask( _bit_number ) \ 886 ( 1 << (_bit_number) ) 901 #if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE) 903 #define _CPU_Priority_bits_index( _priority ) \ 914 void context_initialize(
unsigned short* context,
915 unsigned short stack_add,
916 unsigned short entry_point);
937 uint32_t *stack_base,
959 void _CPU_Push(uint16_t _SP_, uint16_t entry_point);
1037 void *_CPU_Thread_Idle_body( uintptr_t ignored );
1140 static inline uint32_t CPU_swap_u32(
1144 uint32_t byte1, byte2, byte3, byte4, swapped;
1146 byte4 = (value >> 24) & 0xff;
1147 byte3 = (value >> 16) & 0xff;
1148 byte2 = (value >> 8) & 0xff;
1149 byte1 = value & 0xff;
1151 swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
1155 #define CPU_swap_u16( value ) \ 1156 (((value&0xff) << 8) | ((value >> 8)&0xff)) 1160 CPU_Counter_ticks _CPU_Counter_read(
void );
1163 CPU_Counter_ticks second,
1164 CPU_Counter_ticks first
1167 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: avr/cpu.c:69
#define _CPU_ISR_Set_level(_new_level)
This routine and _CPU_ISR_Get_level Map the interrupt level in task mode onto the hardware that the C...
Definition: score/cpu/bfin/rtems/score/cpu.h:742
void _CPU_Context_validate(uintptr_t pattern)
Initializes and validates the CPU context with values derived from the pattern parameter.
Definition: score/cpu/mips/rtems/score/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: avr/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: no_cpu/cpu_asm.c:112
void _CPU_Context_switch(Context_Control *run, Context_Control *heir)
CPU switch context.
Definition: no_cpu/cpu_asm.c:92
Intel AVR Set up Basic CPU Dependency Settings Based on Compiler Settings.
void _CPU_Context_volatile_clobber(uintptr_t pattern)
Clobbers all volatile registers with values derived from the pattern parameter.
Definition: score/cpu/mips/rtems/score/cpu.h:1104
This defines the minimal set of integer and processor state registers that must be saved during a vol...
Definition: score/cpu/arm/rtems/score/cpu.h:248
void _CPU_Initialize(void)
CPU initialization.
Definition: avr/cpu.c:26
void _CPU_Install_interrupt_stack(void)
This routine installs the hardware interrupt stack pointer.
Definition: avr/cpu.c:101
uint32_t CPU_Counter_ticks
Unsigned integer type for CPU counter values.
Definition: score/cpu/no_cpu/rtems/score/cpu.h:1461
This defines the set of integer and processor state registers that must be saved during an interrupt...
Definition: score/cpu/avr/rtems/score/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: avr/cpu.c:57
uint32_t special_interrupt_register
This field is a hint that a port will have a number of integer registers that need to be saved when a...
Definition: score/cpu/avr/rtems/score/cpu.h:426
void _CPU_Context_restore_fp(Context_Control_fp **fp_context_ptr)
This routine restores the floating point context passed to it.
Definition: m68k/cpu.c:176
The CPU specific per-CPU control.
Definition: score/cpu/avr/rtems/score/cpu.h:367
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: bfin/cpu.c:183
double some_float_register
FPU registers are listed here.
Definition: score/cpu/avr/rtems/score/cpu.h:422
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: score/cpu/mips/rtems/score/cpu.h:1160
This defines the complete set of floating point registers that must be saved during any context switc...
Definition: score/cpu/arm/rtems/score/cpu.h:294
void _CPU_Context_save_fp(Context_Control_fp **fp_context_ptr)
This routine saves the floating point context passed to it.
Definition: m68k/cpu.c:167
#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
Common Symbols and Define Undefined Registers.
The set of registers that specifies the complete processor state.
Definition: score/cpu/arm/rtems/score/cpu.h:671
#define SCORE_EXTERN
The following ensures that all data is declared in the space of the initialization routine for either...
Definition: basedefs.h:81
void * proc_ptr
XXX: Eventually proc_ptr needs to disappear!!!
Definition: basedefs.h:329