source: rtems-docs/porting/cpu_init.rst @ d389819

4.115
Last change on this file since d389819 was d389819, checked in by Amar Takhar <amar@…>, on 01/18/16 at 05:37:40

Convert all Unicode to ASCII(128)

  • Property mode set to 100644
File size: 1.8 KB
Line 
1CPU Initialization
2##################
3
4This section describes the general CPU and system initialization sequence
5as it pertains to the CPU dependent code.
6
7Introduction
8============
9
10XXX general startup sequence description rewritten to make it more
11applicable to CPU depdent code in executive
12
13Initializing the CPU
14====================
15
16The _CPU_Initialize routine performs processor dependent initialization.
17.. code:: c
18
19    void _CPU_Initialize(
20    void            (\*thread_dispatch)  /* may be ignored \*/
21    )
22
23The thread_dispatch argument is the address of the entry point for the
24routine called at the end of an ISR once it has been decided a context
25switch is necessary.  On some compilation systems it is difficult to call
26a high-level language routine from assembly.  Providing the address of the
27_Thread_ISR_Dispatch routine allows the porter an easy way to obtain this
28critical address and thus provides an easy way to work around this
29limitation on these systems.
30
31If you encounter this problem save the entry point in a CPU dependent
32variable as shown below:
33.. code:: c
34
35    _CPU_Thread_dispatch_pointer = thread_dispatch;
36
37During the initialization of the context for tasks with floating point,
38the CPU dependent code is responsible for initializing the floating point
39context.  If there is not an easy way to initialize the FP context during
40Context_Initialize, then it is usually easier to save an "uninitialized"
41FP context here and copy it to the task's during Context_Initialize.  If
42this technique is used to initialize the FP contexts, then it is important
43to ensure that the state of the floating point unit is in a coherent,
44initialized state.
45
46.. COMMENT: COPYRIGHT (c) 1988-2002.
47
48.. COMMENT: On-Line Applications Research Corporation (OAR).
49
50.. COMMENT: All rights reserved.
51
Note: See TracBrowser for help on using the repository browser.