summaryrefslogtreecommitdiffstats
path: root/porting/cpu_init.rst
diff options
context:
space:
mode:
authorAmar Takhar <amar@rtems.org>2016-01-16 19:08:48 -0500
committerAmar Takhar <verm@darkbeer.org>2016-05-02 20:51:23 -0400
commit6733466adf26030f781c2779747472150238cadd (patch)
tree3d04d21658ddf18562cefa4d9c8f18dd1d6b4459 /porting/cpu_init.rst
parent7526578599a75c155dd0a97243a2b2289268d836 (diff)
downloadrtems-docs-6733466adf26030f781c2779747472150238cadd.tar.bz2
Split document into seperate files by section.
Diffstat (limited to 'porting/cpu_init.rst')
-rw-r--r--porting/cpu_init.rst51
1 files changed, 51 insertions, 0 deletions
diff --git a/porting/cpu_init.rst b/porting/cpu_init.rst
new file mode 100644
index 0000000..0406c35
--- /dev/null
+++ b/porting/cpu_init.rst
@@ -0,0 +1,51 @@
+CPU Initialization
+##################
+
+This section describes the general CPU and system initialization sequence
+as it pertains to the CPU dependent code.
+
+Introduction
+============
+
+XXX general startup sequence description rewritten to make it more
+applicable to CPU depdent code in executive
+
+Initializing the CPU
+====================
+
+The _CPU_Initialize routine performs processor dependent initialization.
+.. code:: c
+
+ void _CPU_Initialize(
+ void (\*thread_dispatch) /* may be ignored \*/
+ )
+
+The thread_dispatch argument is the address of the entry point for the
+routine called at the end of an ISR once it has been decided a context
+switch is necessary. On some compilation systems it is difficult to call
+a high-level language routine from assembly. Providing the address of the
+_Thread_ISR_Dispatch routine allows the porter an easy way to obtain this
+critical address and thus provides an easy way to work around this
+limitation on these systems.
+
+If you encounter this problem save the entry point in a CPU dependent
+variable as shown below:
+.. code:: c
+
+ _CPU_Thread_dispatch_pointer = thread_dispatch;
+
+During the initialization of the context for tasks with floating point,
+the CPU dependent code is responsible for initializing the floating point
+context. If there is not an easy way to initialize the FP context during
+Context_Initialize, then it is usually easier to save an "uninitialized"
+FP context here and copy it to the task’s during Context_Initialize. If
+this technique is used to initialize the FP contexts, then it is important
+to ensure that the state of the floating point unit is in a coherent,
+initialized state.
+
+.. COMMENT: COPYRIGHT (c) 1988-2002.
+
+.. COMMENT: On-Line Applications Research Corporation (OAR).
+
+.. COMMENT: All rights reserved.
+