1 | .. comment SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
2 | |
---|
3 | .. COMMENT: COPYRIGHT (c) 1988-2002. |
---|
4 | .. COMMENT: On-Line Applications Research Corporation (OAR). |
---|
5 | .. COMMENT: All rights reserved. |
---|
6 | |
---|
7 | PowerPC Specific Information |
---|
8 | **************************** |
---|
9 | |
---|
10 | Multilibs |
---|
11 | ========= |
---|
12 | |
---|
13 | The following multilibs are available: |
---|
14 | |
---|
15 | #. ``.``: 32-bit PowerPC with FPU |
---|
16 | |
---|
17 | #. ``nof``: 32-bit PowerPC with software floating point support |
---|
18 | |
---|
19 | #. ``m403``: Instruction set for PPC403 with FPU |
---|
20 | |
---|
21 | #. ``m505``: Instruction set for MPC505 with FPU |
---|
22 | |
---|
23 | #. ``m603e``: Instruction set for MPC603e with FPU |
---|
24 | |
---|
25 | #. ``m603e/nof``: Instruction set for MPC603e with software floating |
---|
26 | point support |
---|
27 | |
---|
28 | #. ``m604``: Instruction set for MPC604 with FPU |
---|
29 | |
---|
30 | #. ``m604/nof``: Instruction set for MPC604 with software floating point |
---|
31 | support |
---|
32 | |
---|
33 | #. ``m860``: Instruction set for MPC860 with FPU |
---|
34 | |
---|
35 | #. ``m7400``: Instruction set for MPC7500 with FPU |
---|
36 | |
---|
37 | #. ``m7400/nof``: Instruction set for MPC7500 with software floating |
---|
38 | point support |
---|
39 | |
---|
40 | #. ``m8540``: Instruction set for e200, e500 and e500v2 cores with |
---|
41 | single-precision FPU and SPE |
---|
42 | |
---|
43 | #. ``m8540/gprsdouble``: Instruction set for e200, e500 and e500v2 cores |
---|
44 | with double-precision FPU and SPE |
---|
45 | |
---|
46 | #. ``m8540/nof/nospe``: Instruction set for e200, e500 and e500v2 cores |
---|
47 | with software floating point support and no SPE |
---|
48 | |
---|
49 | #. ``me6500/m32``: 32-bit instruction set for e6500 core with FPU and |
---|
50 | AltiVec |
---|
51 | |
---|
52 | #. ``me6500/m32/nof/noaltivec``: 32-bit instruction set for e6500 core |
---|
53 | with software floating point support and no AltiVec |
---|
54 | |
---|
55 | #. ``me6500/m64``: 64-bit instruction set for e6500 core with FPU and |
---|
56 | AltiVec |
---|
57 | |
---|
58 | #. ``me6500/m64/nof/noaltivec``: 64-bit instruction set for e6500 core |
---|
59 | with software floating point support and no AltiVec |
---|
60 | |
---|
61 | Application Binary Interface |
---|
62 | ============================ |
---|
63 | |
---|
64 | In 32-bit PowerPC configurations the ABI defined by |
---|
65 | `Power Architecture 32-bit Application Binary Interface Supplement 1.0 - Embedded <https://ftp.rtems.org/pub/rtems/people/sebh/Power-Arch-32-bit-ABI-supp-1.0-Embedded.pdf>`_ |
---|
66 | is used. |
---|
67 | |
---|
68 | In 64-bit PowerPC configurations the ABI defined by |
---|
69 | `Power Architecture 64-Bit ELF V2 ABI Specification, Version 1.1 <https://ftp.rtems.org/pub/rtems/people/sebh/ABI64BitOpenPOWERv1.1_16July2015_pub.pdf>`_ |
---|
70 | is used. |
---|
71 | |
---|
72 | Special Registers |
---|
73 | ================= |
---|
74 | |
---|
75 | The following special-purpose registers are used by RTEMS: |
---|
76 | |
---|
77 | *Special-Purpose Register General 0 (SPRG0)* |
---|
78 | In SMP configurations, this register contains the address of the per-CPU |
---|
79 | control of the processor. |
---|
80 | |
---|
81 | *Special-Purpose Register General 1 (SPRG1)* |
---|
82 | This register contains the interrupt stack pointer for the outer-most |
---|
83 | interrupt service routine. |
---|
84 | |
---|
85 | *Special-Purpose Register General 2 (SPRG2)* |
---|
86 | This register contains the address of interrupt stack area begin. |
---|
87 | |
---|
88 | Memory Model |
---|
89 | ============ |
---|
90 | |
---|
91 | The memory model is flat. |
---|
92 | |
---|
93 | Interrupt Processing |
---|
94 | ==================== |
---|
95 | |
---|
96 | Interrupt Levels |
---|
97 | ---------------- |
---|
98 | |
---|
99 | There are exactly two interrupt levels on PowerPC with respect to RTEMS. Level |
---|
100 | zero corresponds to interrupts enabled. Level one corresponds to interrupts |
---|
101 | disabled. |
---|
102 | |
---|
103 | Interrupt Stack |
---|
104 | --------------- |
---|
105 | |
---|
106 | The interrupt stack size can be configured via the |
---|
107 | ``CONFIGURE_INTERRUPT_STACK_SIZE`` application configuration option. |
---|
108 | |
---|
109 | Default Fatal Error Processing |
---|
110 | ============================== |
---|
111 | |
---|
112 | The default fatal error handler is BSP-specific. |
---|
113 | |
---|
114 | Symmetric Multiprocessing |
---|
115 | ========================= |
---|
116 | |
---|
117 | SMP is supported. Available platforms are the Freescale QorIQ P series (e.g. |
---|
118 | P1020) and T series (e.g. T2080, T4240). |
---|
119 | |
---|
120 | Thread-Local Storage |
---|
121 | ==================== |
---|
122 | |
---|
123 | Thread-local storage is supported. |
---|
124 | |
---|
125 | 64-bit Caveats |
---|
126 | ============== |
---|
127 | |
---|
128 | * The thread pointer is ``r13`` in contrast to ``r2`` used in the 32-bit ABI. |
---|
129 | |
---|
130 | * The TOC pointer is ``r2``. It must be initialized as part of the C run-time |
---|
131 | setup. A valid stack pointer is not enough to call C functions. They may |
---|
132 | use the TOC to get addresses and constants. |
---|
133 | |
---|
134 | * The TOC must be within the first 2GiB of the address space. This simplifies |
---|
135 | the interrupt prologue, since the ``r2`` can be set to ``.TOC.`` via the |
---|
136 | usual ``lis`` followed by ``ori`` combination. The ``lis`` is subject to |
---|
137 | sign-extension. |
---|
138 | |
---|
139 | * The ``PPC_REG_LOAD``, ``PPC_REG_STORE``, ``PPC_REG_STORE_UPDATE``, and |
---|
140 | ``PPC_REG_CMP`` macros are available for assembly code to provide register |
---|
141 | size operations selected by the GCC ``-m32`` and ``-m64`` options. |
---|
142 | |
---|
143 | * The ``MSR[CM]`` bit must be set all the time, otherwise the MMU translation |
---|
144 | my yield unexpected results. The ``EPCR[ICM]`` or ``EPCR[GICM]`` bits may be |
---|
145 | used to enable the 64-bit compute mode for exceptions. |
---|