source: rtems/cpukit/score/cpu/lm32/include/rtems/score/cpuimpl.h @ 03e4d1e9

Last change on this file since 03e4d1e9 was 03e4d1e9, checked in by Sebastian Huber <sebastian.huber@…>, on 06/29/22 at 12:37:47

score: Add _CPU_Use_thread_local_storage()

At some point during system initialization, the idle threads are created.
Afterwards, the boot processor basically executes within the context of an idle
thread with thread dispatching disabled. On some architectures, the
thread-local storage area of the associated thread must be set in dedicated
processor registers. Add the new CPU port function to do this:

void _CPU_Use_thread_local_storage( const Context_Control *context )

Close #4672.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/**
2 * @file
3 *
4 * @brief CPU Port Implementation API
5 */
6
7/*
8 * Copyright (c) 2013 embedded brains GmbH
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifndef _RTEMS_SCORE_CPUIMPL_H
16#define _RTEMS_SCORE_CPUIMPL_H
17
18#include <rtems/score/cpu.h>
19
20/**
21 * @defgroup RTEMSScoreCPUlm32 LatticeMicro32 (lm32)
22 *
23 * @ingroup RTEMSScoreCPU
24 *
25 * @brief LatticeMicro32 (lm32) Architecture Support
26 */
27/** @{ */
28
29#define CPU_PER_CPU_CONTROL_SIZE 0
30
31#ifndef ASM
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37RTEMS_NO_RETURN void _CPU_Fatal_halt( uint32_t source, CPU_Uint32ptr error );
38
39RTEMS_INLINE_ROUTINE void _CPU_Context_volatile_clobber( uintptr_t pattern )
40{
41  /* TODO */
42}
43
44RTEMS_INLINE_ROUTINE void _CPU_Context_validate( uintptr_t pattern )
45{
46  while (1) {
47    /* TODO */
48  }
49}
50
51RTEMS_INLINE_ROUTINE void _CPU_Instruction_illegal( void )
52{
53  __asm__ volatile ( ".word 0" );
54}
55
56RTEMS_INLINE_ROUTINE void _CPU_Instruction_no_operation( void )
57{
58  __asm__ volatile ( "nop" );
59}
60
61RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage(
62  const Context_Control *context
63)
64{
65  (void) context;
66}
67
68#ifdef __cplusplus
69}
70#endif
71
72#endif /* ASM */
73
74#endif /* _RTEMS_SCORE_CPUIMPL_H */
75
76/** @} */
Note: See TracBrowser for help on using the repository browser.