RTEMS 7.0-rc1
Loading...
Searching...
No Matches
cpu.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
12/*
13 * Copyright (C) 2009, 2017 embedded brains GmbH & Co. KG
14 *
15 * Copyright (c) 2007 Ray Xu <Rayx.cn@gmail.com>
16 *
17 * Copyright (c) 2006 On-Line Applications Research Corporation (OAR)
18 *
19 * Copyright (c) 2002 Advent Networks, Inc.
20 * Jay Monkman <jmonkman@adventnetworks.com>
21 *
22 * COPYRIGHT (c) 2000 Canon Research Centre France SA.
23 * Emmanuel Raguet, mailto:raguet@crf.canon.fr
24 *
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions
27 * are met:
28 * 1. Redistributions of source code must retain the above copyright
29 * notice, this list of conditions and the following disclaimer.
30 * 2. Redistributions in binary form must reproduce the above copyright
31 * notice, this list of conditions and the following disclaimer in the
32 * documentation and/or other materials provided with the distribution.
33 *
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
35 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
37 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
38 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
41 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
42 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
43 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
44 * POSSIBILITY OF SUCH DAMAGE.
45 *
46 */
47
48#ifndef _RTEMS_SCORE_CPU_H
49#define _RTEMS_SCORE_CPU_H
50
52#if defined(RTEMS_PARAVIRT)
53#include <rtems/score/paravirt.h>
54#endif
55#include <rtems/score/arm.h>
56
63#if defined(ARM_MULTILIB_ARCH_V4)
64
65#if defined(__thumb__) && !defined(__thumb2__)
66 #define ARM_SWITCH_REGISTERS uint32_t arm_switch_reg
67 #define ARM_SWITCH_TO_ARM ".align 2\nbx pc\n.arm\n"
68 #define ARM_SWITCH_BACK "add %[arm_switch_reg], pc, #1\nbx %[arm_switch_reg]\n.thumb\n"
69 #define ARM_SWITCH_OUTPUT [arm_switch_reg] "=&r" (arm_switch_reg)
70 #define ARM_SWITCH_ADDITIONAL_OUTPUT , ARM_SWITCH_OUTPUT
71#else
72 #define ARM_SWITCH_REGISTERS
73 #define ARM_SWITCH_TO_ARM
74 #define ARM_SWITCH_BACK
75 #define ARM_SWITCH_OUTPUT
76 #define ARM_SWITCH_ADDITIONAL_OUTPUT
77#endif
78
84#define ARM_PSR_N (1 << 31)
85#define ARM_PSR_Z (1 << 30)
86#define ARM_PSR_C (1 << 29)
87#define ARM_PSR_V (1 << 28)
88#define ARM_PSR_Q (1 << 27)
89#define ARM_PSR_J (1 << 24)
90#define ARM_PSR_GE_SHIFT 16
91#define ARM_PSR_GE_MASK (0xf << ARM_PSR_GE_SHIFT)
92#define ARM_PSR_E (1 << 9)
93#define ARM_PSR_A (1 << 8)
94#define ARM_PSR_I (1 << 7)
95#define ARM_PSR_F (1 << 6)
96#define ARM_PSR_T (1 << 5)
97#define ARM_PSR_M_SHIFT 0
98#define ARM_PSR_M_MASK (0x1f << ARM_PSR_M_SHIFT)
99#define ARM_PSR_M_USR 0x10
100#define ARM_PSR_M_FIQ 0x11
101#define ARM_PSR_M_IRQ 0x12
102#define ARM_PSR_M_SVC 0x13
103#define ARM_PSR_M_ABT 0x17
104#define ARM_PSR_M_HYP 0x1a
105#define ARM_PSR_M_UND 0x1b
106#define ARM_PSR_M_SYS 0x1f
107
110#endif /* defined(ARM_MULTILIB_ARCH_V4) */
111
112/*
113 * The ARM uses the PIC interrupt model.
114 */
115#define CPU_SIMPLE_VECTORED_INTERRUPTS FALSE
116
117#define CPU_ISR_PASSES_FRAME_POINTER FALSE
118
119#define CPU_HARDWARE_FP FALSE
120
121#define CPU_SOFTWARE_FP FALSE
122
123#define CPU_ALL_TASKS_ARE_FP FALSE
124
125#define CPU_IDLE_TASK_IS_FP FALSE
126
127#define CPU_USE_DEFERRED_FP_SWITCH FALSE
128
129#define CPU_ENABLE_ROBUST_THREAD_DISPATCH TRUE
130
131#define CPU_STACK_GROWS_UP FALSE
132
133#if defined(ARM_MULTILIB_CACHE_LINE_MAX_64)
134 #define CPU_CACHE_LINE_BYTES 64
135#else
136 #define CPU_CACHE_LINE_BYTES 32
137#endif
138
139#define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
140
141#define CPU_MODES_INTERRUPT_MASK 0x1
142
143#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
144
145#define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE
146
147#define CPU_STACK_MINIMUM_SIZE (1024 * 4)
148
149/* AAPCS, section 4.1, Fundamental Data Types */
150#define CPU_SIZEOF_POINTER 4
151
152/* AAPCS, section 4.1, Fundamental Data Types */
153#define CPU_ALIGNMENT 8
154
155#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
156
157/* AAPCS, section 5.2.1.2, Stack constraints at a public interface */
158#define CPU_STACK_ALIGNMENT 8
159
160#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
161
162/*
163 * Bitfield handler macros.
164 *
165 * If we had a particularly fast function for finding the first
166 * bit set in a word, it would go here. Since we don't (*), we'll
167 * just use the universal macros.
168 *
169 * (*) On ARM V5 and later, there's a CLZ function which could be
170 * used to implement much quicker than the default macro.
171 */
172
173#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
174
175#define CPU_USE_LIBC_INIT_FINI_ARRAY TRUE
176
177#define CPU_MAXIMUM_PROCESSORS 32
178
179#define ARM_CONTEXT_CONTROL_THREAD_ID_OFFSET 44
180
181#ifdef ARM_MULTILIB_VFP
182 #define ARM_CONTEXT_CONTROL_D8_OFFSET 48
183#endif
184
185#ifdef ARM_MULTILIB_ARCH_V4
186 #define ARM_CONTEXT_CONTROL_ISR_DISPATCH_DISABLE 40
187#endif
188
189#ifdef RTEMS_SMP
190 #if defined(ARM_MULTILIB_VFP)
191 #define ARM_CONTEXT_CONTROL_IS_EXECUTING_OFFSET 112
192 #else
193 #define ARM_CONTEXT_CONTROL_IS_EXECUTING_OFFSET 48
194 #endif
195#endif
196
197#define ARM_EXCEPTION_FRAME_SIZE 80
198
199#define ARM_EXCEPTION_FRAME_REGISTER_R8_OFFSET 32
200
201#define ARM_EXCEPTION_FRAME_REGISTER_SP_OFFSET 52
202
203#define ARM_EXCEPTION_FRAME_REGISTER_PC_OFFSET 60
204
205#if defined(ARM_MULTILIB_ARCH_V4)
206 #define ARM_EXCEPTION_FRAME_REGISTER_CPSR_OFFSET 64
207#elif defined(ARM_MULTILIB_ARCH_V6M) || defined(ARM_MULTILIB_ARCH_V7M)
208 #define ARM_EXCEPTION_FRAME_REGISTER_XPSR_OFFSET 64
209#endif
210
211#define ARM_EXCEPTION_FRAME_VFP_CONTEXT_OFFSET 72
212
213#define ARM_VFP_CONTEXT_SIZE 264
214
215#ifndef ASM
216
217#ifdef __cplusplus
218extern "C" {
219#endif
220
221typedef struct {
222#if defined(ARM_MULTILIB_ARCH_V4)
223 uint32_t register_r4;
224 uint32_t register_r5;
225 uint32_t register_r6;
226 uint32_t register_r7;
227 uint32_t register_r8;
228 uint32_t register_r9;
229 uint32_t register_r10;
230 uint32_t register_fp;
231 uint32_t register_sp;
232 uint32_t register_lr;
233 uint32_t isr_dispatch_disable;
234#elif defined(ARM_MULTILIB_ARCH_V6M) || defined(ARM_MULTILIB_ARCH_V7M)
235 uint32_t register_r4;
236 uint32_t register_r5;
237 uint32_t register_r6;
238 uint32_t register_r7;
239 uint32_t register_r8;
240 uint32_t register_r9;
241 uint32_t register_r10;
242 uint32_t register_r11;
243 void *register_lr;
244 void *register_sp;
245 uint32_t isr_nest_level;
246#else
247 void *register_sp;
248#endif
249 uint32_t thread_id;
250#ifdef ARM_MULTILIB_VFP
251 uint64_t register_d8;
252 uint64_t register_d9;
253 uint64_t register_d10;
254 uint64_t register_d11;
255 uint64_t register_d12;
256 uint64_t register_d13;
257 uint64_t register_d14;
258 uint64_t register_d15;
259#endif
260#ifdef RTEMS_SMP
261 volatile bool is_executing;
262#endif
264
265static inline void _ARM_Data_memory_barrier( void )
266{
267#ifdef ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
268 __asm__ volatile ( "dmb" : : : "memory" );
269#else
271#endif
272}
273
274static inline void _ARM_Data_synchronization_barrier( void )
275{
276#ifdef ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
277 __asm__ volatile ( "dsb" : : : "memory" );
278#else
280#endif
281}
282
283static inline void _ARM_Instruction_synchronization_barrier( void )
284{
285#ifdef ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
286 __asm__ volatile ( "isb" : : : "memory" );
287#else
289#endif
290}
291
292#if defined(ARM_DISABLE_INLINE_ISR_DISABLE_ENABLE)
293uint32_t arm_interrupt_disable( void );
294void arm_interrupt_enable( uint32_t level );
295void arm_interrupt_flash( uint32_t level );
296#else
297static inline uint32_t arm_interrupt_disable( void )
298{
299 uint32_t level;
300
301#if defined(ARM_MULTILIB_ARCH_V4)
302 /*
303 * Disable only normal interrupts (IRQ).
304 *
305 * In order to support fast interrupts (FIQ) such that they can do something
306 * useful, we have to disable the operating system support for FIQs. Having
307 * operating system support for them would require that FIQs are disabled
308 * during critical sections of the operating system and application. At this
309 * level IRQs and FIQs would be equal. It is true that FIQs could interrupt
310 * the non critical sections of IRQs, so here they would have a small
311 * advantage. Without operating system support, the FIQs can execute at any
312 * time (of course not during the service of another FIQ). If someone needs
313 * operating system support for a FIQ, she can trigger a software interrupt and
314 * service the request in a two-step process.
315 */
316#if __ARM_ARCH >= 7
317 __asm__ volatile (
318 "mrs %0, cpsr\n"
319 "cpsid i\n"
320 "isb"
321 : "=&r" (level)
322 );
323#else
324 uint32_t arm_switch_reg;
325
326 __asm__ volatile (
327 ARM_SWITCH_TO_ARM
328 "mrs %[level], cpsr\n"
329 "orr %[arm_switch_reg], %[level], #0x80\n"
330 "msr cpsr, %[arm_switch_reg]\n"
331 ARM_SWITCH_BACK
332 : [arm_switch_reg] "=&r" (arm_switch_reg), [level] "=&r" (level)
333 );
334#endif
335#elif defined(ARM_MULTILIB_ARCH_V7M)
336 uint32_t basepri = 0x80;
337
338 __asm__ volatile (
339 "mrs %[level], basepri\n"
340 "msr basepri_max, %[basepri]\n"
341 : [level] "=&r" (level)
342 : [basepri] "r" (basepri)
343 );
344#endif
345
346 return level;
347}
348
349static inline void arm_interrupt_enable( uint32_t level )
350{
351#if defined(ARM_MULTILIB_ARCH_V4)
352 ARM_SWITCH_REGISTERS;
353
354 __asm__ volatile (
355 ARM_SWITCH_TO_ARM
356 "msr cpsr, %[level]\n"
357 ARM_SWITCH_BACK
358 : ARM_SWITCH_OUTPUT
359 : [level] "r" (level)
360 );
361#elif defined(ARM_MULTILIB_ARCH_V7M)
362 __asm__ volatile (
363 "msr basepri, %[level]\n"
364 :
365 : [level] "r" (level)
366 );
367#endif
368}
369
370static inline void arm_interrupt_flash( uint32_t level )
371{
372#if defined(ARM_MULTILIB_ARCH_V4)
373 uint32_t arm_switch_reg;
374
375 __asm__ volatile (
376 ARM_SWITCH_TO_ARM
377 "mrs %[arm_switch_reg], cpsr\n"
378 "msr cpsr, %[level]\n"
379 "msr cpsr, %[arm_switch_reg]\n"
380 ARM_SWITCH_BACK
381 : [arm_switch_reg] "=&r" (arm_switch_reg)
382 : [level] "r" (level)
383 );
384#elif defined(ARM_MULTILIB_ARCH_V7M)
385 uint32_t basepri;
386
387 __asm__ volatile (
388 "mrs %[basepri], basepri\n"
389 "msr basepri, %[level]\n"
390 "msr basepri, %[basepri]\n"
391 : [basepri] "=&r" (basepri)
392 : [level] "r" (level)
393 );
394#endif
395}
396#endif /* !ARM_DISABLE_INLINE_ISR_DISABLE_ENABLE */
397
398#define _CPU_ISR_Disable( _isr_cookie ) \
399 do { \
400 _isr_cookie = arm_interrupt_disable(); \
401 } while (0)
402
403#define _CPU_ISR_Enable( _isr_cookie ) \
404 arm_interrupt_enable( _isr_cookie )
405
406#define _CPU_ISR_Flash( _isr_cookie ) \
407 arm_interrupt_flash( _isr_cookie )
408
409static inline bool _CPU_ISR_Is_enabled( uint32_t level )
410{
411#if defined(ARM_MULTILIB_ARCH_V4)
412 return ( level & 0x80 ) == 0;
413#elif defined(ARM_MULTILIB_ARCH_V7M)
414 return level == 0;
415#endif
416}
417
418void _CPU_ISR_Set_level( uint32_t level );
419
420uint32_t _CPU_ISR_Get_level( void );
421
422void _CPU_Context_Initialize(
423 Context_Control *the_context,
424 void *stack_area_begin,
425 size_t stack_area_size,
426 uint32_t new_level,
427 void (*entry_point)( void ),
428 bool is_fp,
429 void *tls_area
430);
431
432#define _CPU_Context_Get_SP( _context ) \
433 (uintptr_t)(_context)->register_sp
434
435#ifdef RTEMS_SMP
436 static inline bool _CPU_Context_Get_is_executing(
437 const Context_Control *context
438 )
439 {
440 return context->is_executing;
441 }
442
443 static inline void _CPU_Context_Set_is_executing(
444 Context_Control *context,
445 bool is_executing
446 )
447 {
448 context->is_executing = is_executing;
449 }
450
451 RTEMS_NO_RETURN void _ARM_Start_multitasking( Context_Control *heir );
452
453 #define _CPU_Start_multitasking( _heir ) _ARM_Start_multitasking( _heir )
454#endif
455
456#define _CPU_Context_Restart_self( _the_context ) \
457 _CPU_Context_restore( (_the_context) );
458
459#define _CPU_Context_Initialize_fp( _destination ) \
460 do { \
461 *(*(_destination)) = _CPU_Null_fp_context; \
462 } while (0)
463
467void _CPU_Initialize( void );
468
469typedef void ( *CPU_ISR_handler )( void );
470
472 uint32_t vector,
473 CPU_ISR_handler new_handler,
474 CPU_ISR_handler *old_handler
475);
476
481
482RTEMS_NO_RETURN void _CPU_Context_switch_no_return(
483 Context_Control *executing,
484 Context_Control *heir
485);
486
487RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
488
489#if defined(ARM_MULTILIB_ARCH_V7M)
490 RTEMS_NO_RETURN void _ARMV7M_Start_multitasking( Context_Control *heir );
491 #define _CPU_Start_multitasking _ARMV7M_Start_multitasking
492#endif
493
494#ifdef RTEMS_SMP
495 uint32_t _CPU_SMP_Initialize( void );
496
497 bool _CPU_SMP_Start_processor( uint32_t cpu_index );
498
499 void _CPU_SMP_Finalize_initialization( uint32_t cpu_count );
500
501 void _CPU_SMP_Prepare_start_multitasking( void );
502
503 static inline uint32_t _CPU_SMP_Get_current_processor( void )
504 {
505 uint32_t mpidr;
506
507 /* Use ARMv7 Multiprocessor Affinity Register (MPIDR) */
508 __asm__ volatile (
509 "mrc p15, 0, %[mpidr], c0, c0, 5\n"
510 : [mpidr] "=&r" (mpidr)
511 );
512
513 return mpidr & 0xffU;
514 }
515
516 void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );
517
518 static inline void _ARM_Send_event( void )
519 {
520 __asm__ volatile ( "sev" : : : "memory" );
521 }
522
523 static inline void _ARM_Wait_for_event( void )
524 {
525 __asm__ volatile ( "wfe" : : : "memory" );
526 }
527#endif
528
529
530static inline uint32_t CPU_swap_u32( uint32_t value )
531{
532#if defined(__thumb2__)
533 __asm__ volatile (
534 "rev %0, %0"
535 : "=r" (value)
536 : "0" (value)
537 );
538 return value;
539#elif defined(__thumb__)
540 uint32_t byte1, byte2, byte3, byte4, swapped;
541
542 byte4 = (value >> 24) & 0xff;
543 byte3 = (value >> 16) & 0xff;
544 byte2 = (value >> 8) & 0xff;
545 byte1 = value & 0xff;
546
547 swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
548 return swapped;
549#else
550 uint32_t tmp = value; /* make compiler warnings go away */
551 __asm__ volatile ("EOR %1, %0, %0, ROR #16\n"
552 "BIC %1, %1, #0xff0000\n"
553 "MOV %0, %0, ROR #8\n"
554 "EOR %0, %0, %1, LSR #8\n"
555 : "=r" (value), "=r" (tmp)
556 : "0" (value), "1" (tmp));
557 return value;
558#endif
559}
560
561static inline uint16_t CPU_swap_u16( uint16_t value )
562{
563#if defined(__thumb2__)
564 __asm__ volatile (
565 "rev16 %0, %0"
566 : "=r" (value)
567 : "0" (value)
568 );
569 return value;
570#else
571 return (uint16_t) (((value & 0xffU) << 8) | ((value >> 8) & 0xffU));
572#endif
573}
574
575typedef uint32_t CPU_Counter_ticks;
576
577uint32_t _CPU_Counter_frequency( void );
578
579CPU_Counter_ticks _CPU_Counter_read( void );
580
581RTEMS_NO_RETURN void *_CPU_Thread_Idle_body( uintptr_t ignored );
582
583#if defined(ARM_MULTILIB_ARCH_V4)
584
585typedef enum {
586 ARM_EXCEPTION_RESET = 0,
587 ARM_EXCEPTION_UNDEF = 1,
588 ARM_EXCEPTION_SWI = 2,
589 ARM_EXCEPTION_PREF_ABORT = 3,
590 ARM_EXCEPTION_DATA_ABORT = 4,
591 ARM_EXCEPTION_RESERVED = 5,
592 ARM_EXCEPTION_IRQ = 6,
593 ARM_EXCEPTION_FIQ = 7,
594 MAX_EXCEPTIONS = 8,
595 ARM_EXCEPTION_MAKE_ENUM_32_BIT = 0x7fffffff
596} Arm_symbolic_exception_name;
597
598#endif /* defined(ARM_MULTILIB_ARCH_V4) */
599
600typedef struct {
601 uint32_t register_fpexc;
602 uint32_t register_fpscr;
603 uint64_t register_d0;
604 uint64_t register_d1;
605 uint64_t register_d2;
606 uint64_t register_d3;
607 uint64_t register_d4;
608 uint64_t register_d5;
609 uint64_t register_d6;
610 uint64_t register_d7;
611 uint64_t register_d8;
612 uint64_t register_d9;
613 uint64_t register_d10;
614 uint64_t register_d11;
615 uint64_t register_d12;
616 uint64_t register_d13;
617 uint64_t register_d14;
618 uint64_t register_d15;
619 uint64_t register_d16;
620 uint64_t register_d17;
621 uint64_t register_d18;
622 uint64_t register_d19;
623 uint64_t register_d20;
624 uint64_t register_d21;
625 uint64_t register_d22;
626 uint64_t register_d23;
627 uint64_t register_d24;
628 uint64_t register_d25;
629 uint64_t register_d26;
630 uint64_t register_d27;
631 uint64_t register_d28;
632 uint64_t register_d29;
633 uint64_t register_d30;
634 uint64_t register_d31;
636
637typedef struct {
638 union {
639 struct {
640 uint32_t register_r0;
641 uint32_t register_r1;
642 uint32_t register_r2;
643 uint32_t register_r3;
644 uint32_t register_r4;
645 uint32_t register_r5;
646 uint32_t register_r6;
647 uint32_t register_r7;
648 uint32_t register_r8;
649 uint32_t register_r9;
650 uint32_t register_r10;
651 uint32_t register_r11;
652 uint32_t register_r12;
653 uint32_t register_sp;
654 void *register_lr;
655 void *register_pc;
656 };
657
658 uint32_t registers[ 16 ];
659 };
660#if defined(ARM_MULTILIB_ARCH_V4)
661 uint32_t register_cpsr;
662 Arm_symbolic_exception_name vector;
663#elif defined(ARM_MULTILIB_ARCH_V6M) || defined(ARM_MULTILIB_ARCH_V7M)
664 uint32_t register_xpsr;
665 uint32_t vector;
666#endif
667 const ARM_VFP_context *vfp_context;
668 uint32_t reserved_for_stack_alignment;
670
672
673RTEMS_NO_RETURN void _ARM_Exception_default( CPU_Exception_frame *frame );
674
676typedef uintptr_t CPU_Uint32ptr;
677
678#ifdef __cplusplus
679}
680#endif
681
682#endif /* ASM */
683
686#endif /* _RTEMS_SCORE_CPU_H */
This header file provides defines derived from ARM multilib defines.
This header file provides basic definitions used by the API and the implementation.
#define RTEMS_COMPILER_MEMORY_BARRIER()
This macro forbids the compiler to reorder read and write commands around it.
Definition: basedefs.h:258
#define RTEMS_NO_RETURN
Tells the compiler in a function declaration that this function does not return.
Definition: basedefs.h:386
uint32_t _CPU_ISR_Get_level(void)
Returns the interrupt level of the executing thread.
Definition: cpu.c:167
void * _CPU_Thread_Idle_body(uintptr_t ignored)
Definition: m68kidle.c:39
void _CPU_Initialize(void)
CPU initialization.
Definition: cpu.c:47
uintptr_t CPU_Uint32ptr
Definition: cpu.h:611
void _CPU_Exception_frame_print(const CPU_Exception_frame *frame)
Prints the exception frame via printk().
Definition: vectorexceptions.c:64
uint32_t _CPU_Counter_frequency(void)
Gets the current CPU counter frequency in Hz.
Definition: system-clocks.c:125
void _CPU_Context_switch(Context_Control *run, Context_Control *heir)
CPU switch context.
Definition: cpu_asm.c:110
CPU_Counter_ticks _CPU_Counter_read(void)
Gets the current CPU counter value.
Definition: system-clocks.c:130
void _CPU_ISR_install_vector(uint32_t vector, CPU_ISR_handler hdl, CPU_ISR_handler *oldHdl)
SPARC specific RTEMS ISR installer.
Definition: idt.c:108
Definition: cpu.h:600
The set of registers that specifies the complete processor state.
Definition: cpu.h:500
Thread register context.
Definition: cpu.h:173