source: rtems/doc/cpu_supplement/powerpc.t @ 19078dc6

5
Last change on this file since 19078dc6 was 19078dc6, checked in by Sebastian Huber <sebastian.huber@…>, on 07/23/15 at 06:36:30

doc: Add SMP section to CPU Arch Supplement

  • Property mode set to 100644
File size: 24.8 KB
Line 
1@c
2@c  COPYRIGHT (c) 1989-2007.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5
6@ifinfo
7@end ifinfo
8@chapter PowerPC Specific Information
9
10This chapter discusses the PowerPC architecture dependencies
11in this port of RTEMS.  The PowerPC family has a wide variety
12of implementations by a range of vendors.  Consequently,
13there are many, many CPU models within it.
14
15It is highly recommended that the PowerPC RTEMS
16application developer obtain and become familiar with the
17documentation for the processor being used as well as the
18specification for the revision of the PowerPC architecture which
19corresponds to that processor.
20
21@subheading PowerPC Architecture Documents
22
23For information on the PowerPC architecture, refer to
24the following documents available from Motorola and IBM:
25
26@itemize @bullet
27
28@item @cite{PowerPC Microprocessor Family: The Programming Environment}
29(Motorola Document MPRPPCFPE-01).
30
31@item @cite{IBM PPC403GB Embedded Controller User's Manual}.
32
33@item @cite{PoweRisControl MPC500 Family RCPU RISC Central Processing
34Unit Reference Manual} (Motorola Document RCPUURM/AD).
35
36@item @cite{PowerPC 601 RISC Microprocessor User's Manual}
37(Motorola Document MPR601UM/AD).
38
39@item @cite{PowerPC 603 RISC Microprocessor User's Manual}
40(Motorola Document MPR603UM/AD).
41
42@item @cite{PowerPC 603e RISC Microprocessor User's Manual}
43(Motorola Document MPR603EUM/AD).
44
45@item @cite{PowerPC 604 RISC Microprocessor User's Manual}
46(Motorola Document MPR604UM/AD).
47
48@item @cite{PowerPC MPC821 Portable Systems Microprocessor User's Manual}
49(Motorola Document MPC821UM/AD).
50
51@item @cite{PowerQUICC MPC860 User's Manual} (Motorola Document MPC860UM/AD).
52
53@end itemize
54
55Motorola maintains an on-line electronic library for the PowerPC
56at the following URL:
57
58@itemize @code{ }
59@item @cite{http://www.mot.com/powerpc/library/library.html}
60@end itemize
61
62This site has a a wealth of information and examples.  Many of the
63manuals are available from that site in electronic format.
64
65@subheading PowerPC Processor Simulator Information
66
67PSIM is a program which emulates the Instruction Set Architecture
68of the PowerPC microprocessor family.  It is reely available in source
69code form under the terms of the GNU General Public License (version
702 or later).  PSIM can be integrated with the GNU Debugger (gdb) to
71execute and debug PowerPC executables on non-PowerPC hosts.  PSIM
72supports the addition of user provided device models which can be
73used to allow one to develop and debug embedded applications using
74the simulator.
75
76The latest version of PSIM is included in GDB and enabled on pre-built
77binaries provided by the RTEMS Project.
78
79@c
80@c
81@c
82@section CPU Model Dependent Features
83
84This section presents the set of features which vary
85across PowerPC implementations and are of importance to RTEMS.
86The set of CPU model feature macros are defined in the file
87@code{cpukit/score/cpu/powerpc/powerpc.h} based upon the particular CPU
88model specified on the compilation command line.
89
90@subsection Alignment
91
92The macro PPC_ALIGNMENT is set to the PowerPC model's worst case alignment
93requirement for data types on a byte boundary.  This value is used
94to derive the alignment restrictions for memory allocated from
95regions and partitions.
96
97@subsection Cache Alignment
98
99The macro PPC_CACHE_ALIGNMENT is set to the line size of the cache.  It is
100used to align the entry point of critical routines so that as much code
101as possible can be retrieved with the initial read into cache.  This
102is done for the interrupt handler as well as the context switch routines.
103
104In addition, the "shortcut" data structure used by the PowerPC implementation
105to ease access to data elements frequently accessed by RTEMS routines
106implemented in assembly language is aligned using this value.
107
108@subsection Maximum Interrupts
109
110The macro PPC_INTERRUPT_MAX is set to the number of exception sources
111supported by this PowerPC model.
112
113@subsection Has Double Precision Floating Point
114
115The macro PPC_HAS_DOUBLE is set to 1 to indicate that the PowerPC model
116has support for double precision floating point numbers.  This is
117important because the floating point registers need only be four bytes
118wide (not eight) if double precision is not supported.
119
120@subsection Critical Interrupts
121
122The macro PPC_HAS_RFCI is set to 1 to indicate that the PowerPC model
123has the Critical Interrupt capability as defined by the IBM 403 models.
124
125@subsection Use Multiword Load/Store Instructions
126
127The macro PPC_USE_MULTIPLE is set to 1 to indicate that multiword load and
128store instructions should be used to perform context switch operations.
129The relative efficiency of multiword load and store instructions versus
130an equivalent set of single word load and store instructions varies based
131upon the PowerPC model.
132
133@subsection Instruction Cache Size
134
135The macro PPC_I_CACHE is set to the size in bytes of the instruction cache.
136
137@subsection Data Cache Size
138
139The macro PPC_D_CACHE is set to the size in bytes of the data cache.
140
141@subsection Debug Model
142
143The macro PPC_DEBUG_MODEL is set to indicate the debug support features
144present in this CPU model.  The following debug support feature sets
145are currently supported:
146
147@table @b
148
149@item @code{PPC_DEBUG_MODEL_STANDARD}
150indicates that the single-step trace enable (SE) and branch trace
151enable (BE) bits in the MSR are supported by this CPU model.
152
153@item @code{PPC_DEBUG_MODEL_SINGLE_STEP_ONLY}
154indicates that only the single-step trace enable (SE) bit in the MSR
155is supported by this CPU model.
156
157@item @code{PPC_DEBUG_MODEL_IBM4xx}
158indicates that the debug exception enable (DE) bit in the MSR is supported
159by this CPU model.  At this time, this particular debug feature set
160has only been seen in the IBM 4xx series.
161
162@end table
163
164@subsubsection Low Power Model
165
166The macro PPC_LOW_POWER_MODE is set to indicate the low power model
167supported by this CPU model.  The following low power modes are currently
168supported.
169
170@table @b
171
172@item @code{PPC_LOW_POWER_MODE_NONE}
173indicates that this CPU model has no low power mode support.
174
175@item @code{PPC_LOW_POWER_MODE_STANDARD}
176indicates that this CPU model follows the low power model defined for
177the PPC603e.
178
179@end table
180
181@c
182@c
183@c
184@section Multilibs
185
186The following multilibs are available:
187
188@enumerate
189@item @code{.}: 32-bit PowerPC with FPU
190@item @code{nof}: 32-bit PowerPC with software floating point support
191@item @code{m403}: Instruction set for PPC403 with FPU
192@item @code{m505}: Instruction set for MPC505 with FPU
193@item @code{m603e}: Instruction set for MPC603e with FPU
194@item @code{m603e/nof}: Instruction set for MPC603e with software floating
195point support
196@item @code{m604}: Instruction set for MPC604 with FPU
197@item @code{m604/nof}: Instruction set for MPC604 with software floating point
198support
199@item @code{m860}: Instruction set for MPC860 with FPU
200@item @code{m7400}: Instruction set for MPC7500 with FPU
201@item @code{m7400/nof}: Instruction set for MPC7500 with software floating
202point support
203@item @code{m8540}: Instruction set for e200, e500 and e500v2 cores with
204single-precision FPU and SPE
205@item @code{m8540/gprsdouble}: Instruction set for e200, e500 and e500v2 cores
206with double-precision FPU and SPE
207@item @code{m8540/nof/nospe}: Instruction set for e200, e500 and e500v2 cores
208with software floating point support and no SPE
209@item @code{me6500/m32}: 32-bit instruction set for e6500 core with FPU and
210AltiVec
211@item @code{me6500/m32/nof/noaltivec}: 32-bit instruction set for e6500 core
212with software floating point support and no AltiVec
213@end enumerate
214
215@c
216@c
217@c
218
219@section Calling Conventions
220
221RTEMS supports the Embedded Application Binary Interface (EABI)
222calling convention.  Documentation for EABI is available by sending
223a message with a subject line of "EABI" to eabi@@goth.sis.mot.com.
224
225@subsection Programming Model
226
227This section discusses the programming model for the
228PowerPC architecture.
229
230@subsubsection Non-Floating Point Registers
231
232The PowerPC architecture defines thirty-two non-floating point registers
233directly visible to the programmer.  In thirty-two bit implementations, each
234register is thirty-two bits wide.  In sixty-four bit implementations, each
235register is sixty-four bits wide.
236
237These registers are referred to as @code{gpr0} to @code{gpr31}.
238
239Some of the registers serve defined roles in the EABI programming model. 
240The following table describes the role of each of these registers:
241
242@ifset use-ascii
243@example
244@group
245     +---------------+----------------+------------------------------+
246     | Register Name | Alternate Name |         Description          |
247     +---------------+----------------+------------------------------+
248     |      r1       |      sp        |         stack pointer        |
249     +---------------+----------------+------------------------------+
250     |               |                |  global pointer to the Small |
251     |      r2       |      na        |     Constant Area (SDA2)     |
252     +---------------+----------------+------------------------------+
253     |    r3 - r12   |      na        | parameter and result passing |
254     +---------------+----------------+------------------------------+
255     |               |                |  global pointer to the Small |
256     |      r13      |      na        |         Data Area (SDA)      |
257     +---------------+----------------+------------------------------+
258@end group
259@end example
260@end ifset
261
262@ifset use-tex
263@sp 1
264@tex
265\centerline{\vbox{\offinterlineskip\halign{
266\vrule\strut#&
267\hbox to 1.75in{\enskip\hfil#\hfil}&
268\vrule#&
269\hbox to 1.75in{\enskip\hfil#\hfil}&
270\vrule#&
271\hbox to 2.50in{\enskip\hfil#\hfil}&
272\vrule#\cr
273\noalign{\hrule}
274&\bf Register Name &&\bf Alternate Names&&\bf Description&\cr\noalign{\hrule}
275&r1&&sp&&stack pointer&\cr\noalign{\hrule}
276&r2&&NA&&global pointer to the Small&\cr
277&&&&&Constant Area (SDA2)&\cr\noalign{\hrule}
278&r3 - r12&&NA&&parameter and result passing&\cr\noalign{\hrule}
279&r13&&NA&&global pointer to the Small&\cr
280&&&&&Data Area (SDA2)&\cr\noalign{\hrule}
281}}\hfil}
282@end tex
283@end ifset
284 
285@ifset use-html
286@html
287<CENTER>
288  <TABLE COLS=3 WIDTH="80%" BORDER=2>
289<TR><TD ALIGN=center><STRONG>Register Name</STRONG></TD>
290    <TD ALIGN=center><STRONG>Alternate Name</STRONG></TD>
291    <TD ALIGN=center><STRONG>Description</STRONG></TD></TR>
292<TR><TD ALIGN=center>r1</TD>
293    <TD ALIGN=center>sp</TD>
294    <TD ALIGN=center>stack pointer</TD></TR>
295<TR><TD ALIGN=center>r2</TD>
296    <TD ALIGN=center>na</TD>
297    <TD ALIGN=center>global pointer to the Small Constant Area (SDA2)</TD></TR>
298<TR><TD ALIGN=center>r3 - r12</TD>
299    <TD ALIGN=center>NA</TD>
300    <TD ALIGN=center>parameter and result passing</TD></TR>
301<TR><TD ALIGN=center>r13</TD>
302    <TD ALIGN=center>NA</TD>
303    <TD ALIGN=center>global pointer to the Small Data Area (SDA)</TD></TR>
304  </TABLE>
305</CENTER>
306@end html
307@end ifset
308
309
310@subsubsection Floating Point Registers
311
312The PowerPC architecture includes thirty-two, sixty-four bit
313floating point registers.  All PowerPC floating point instructions
314interpret these registers as 32 double precision floating point registers,
315regardless of whether the processor has 64-bit or 32-bit implementation.
316
317The floating point status and control register (fpscr) records exceptions
318and the type of result generated by floating-point operations.
319Additionally, it controls the rounding mode of operations and allows the
320reporting of floating exceptions to be enabled or disabled.
321
322@subsubsection Special Registers
323
324The PowerPC architecture includes a number of special registers
325which are critical to the programming model:
326
327@table @b
328
329@item Machine State Register
330
331The MSR contains the processor mode, power management mode, endian mode,
332exception information, privilege level, floating point available and
333floating point excepiton mode, address translation information and
334the exception prefix.
335
336@item Link Register
337
338The LR contains the return address after a function call.  This register
339must be saved before a subsequent subroutine call can be made.  The
340use of this register is discussed further in the @b{Call and Return
341Mechanism} section below.
342
343@item Count Register
344
345The CTR contains the iteration variable for some loops.  It may also be used
346for indirect function calls and jumps.
347
348@end table
349
350@subsection Call and Return Mechanism
351
352The PowerPC architecture supports a simple yet effective call
353and return mechanism.  A subroutine is invoked
354via the "branch and link" (@code{bl}) and
355"brank and link absolute" (@code{bla})
356instructions.  This instructions place the return address
357in the Link Register (LR).  The callee returns to the caller by
358executing a "branch unconditional to the link register" (@code{blr})
359instruction.  Thus the callee returns to the caller via a jump
360to the return address which is stored in the LR.
361
362The previous contents of the LR are not automatically saved
363by either the @code{bl} or @code{bla}.  It is the responsibility
364of the callee to save the contents of the LR before invoking
365another subroutine.  If the callee invokes another subroutine,
366it must restore the LR before executing the @code{blr} instruction
367to return to the caller.
368
369It is important to note that the PowerPC subroutine
370call and return mechanism does not automatically save and
371restore any registers.
372
373The LR may be accessed as special purpose register 8 (@code{SPR8}) using the
374"move from special register" (@code{mfspr}) and
375"move to special register" (@code{mtspr}) instructions.
376
377@subsection Calling Mechanism
378
379All RTEMS directives are invoked using the regular
380PowerPC EABI calling convention via the @code{bl} or
381@code{bla} instructions.
382
383@subsection Register Usage
384
385As discussed above, the call instruction does not
386automatically save any registers.  It is the responsibility
387of the callee to save and restore any registers which must be preserved
388across subroutine calls.  The callee is responsible for saving
389callee-preserved registers to the program stack and restoring them
390before returning to the caller.
391
392@subsection Parameter Passing
393
394RTEMS assumes that arguments are placed in the
395general purpose registers with the first argument in
396register 3 (@code{r3}), the second argument in general purpose
397register 4 (@code{r4}), and so forth until the seventh
398argument is in general purpose register 10 (@code{r10}). 
399If there are more than seven arguments, then subsequent arguments
400are placed on the program stack.  The following pseudo-code
401illustrates the typical sequence used to call a RTEMS directive
402with three (3) arguments:
403
404@example
405load third argument into r5
406load second argument into r4
407load first argument into r3
408invoke directive
409@end example
410
411@c
412@c
413@c
414
415@section Memory Model
416
417@subsection Flat Memory Model
418
419The PowerPC architecture supports a variety of memory models.
420RTEMS supports the PowerPC using a flat memory model with
421paging disabled.  In this mode, the PowerPC automatically
422converts every address from a logical to a physical address
423each time it is used.  The PowerPC uses information provided
424in the Block Address Translation (BAT) to convert these addresses.
425
426Implementations of the PowerPC architecture may be thirty-two or sixty-four bit.
427The PowerPC architecture supports a flat thirty-two or sixty-four bit address
428space with addresses ranging from 0x00000000 to 0xFFFFFFFF (4
429gigabytes) in thirty-two bit implementations or to 0xFFFFFFFFFFFFFFFF
430in sixty-four bit implementations.  Each address is represented
431by either a thirty-two bit or sixty-four bit value and is byte addressable. 
432The address may be used to reference a single byte, half-word
433(2-bytes), word (4 bytes), or in sixty-four bit implementations a
434doubleword (8 bytes).  Memory accesses within the address space are
435performed in big or little endian fashion by the PowerPC based
436upon the current setting of the Little-endian mode enable bit (LE)
437in the Machine State Register (MSR).  While the processor is in
438big endian mode, memory accesses which are not properly aligned
439generate an "alignment exception" (vector offset 0x00600).  In
440little endian mode, the PowerPC architecture does not require
441the processor to generate alignment exceptions.
442
443The following table lists the alignment requirements for a variety
444of data accesses:
445
446@ifset use-ascii
447@example
448@group
449          +--------------+-----------------------+
450          |   Data Type  | Alignment Requirement |
451          +--------------+-----------------------+
452          |     byte     |          1            |
453          |   half-word  |          2            |
454          |     word     |          4            |
455          |  doubleword  |          8            |
456          +--------------+-----------------------+
457@end group
458@end example
459@end ifset
460
461@ifset use-tex
462@sp 1
463@tex
464\centerline{\vbox{\offinterlineskip\halign{
465\vrule\strut#&
466\hbox to 1.75in{\enskip\hfil#\hfil}&
467\vrule#&
468\hbox to 1.75in{\enskip\hfil#\hfil}&
469\vrule#\cr
470\noalign{\hrule}
471&\bf Data Type &&\bf Alignment Requirement&\cr\noalign{\hrule}
472&byte&&1&\cr\noalign{\hrule}
473&half-word&&2&\cr\noalign{\hrule}
474&word&&4&\cr\noalign{\hrule}
475&doubleword&&8&\cr\noalign{\hrule}
476}}\hfil}
477@end tex
478@end ifset
479 
480@ifset use-html
481@html
482<CENTER>
483  <TABLE COLS=2 WIDTH="60%" BORDER=2>
484<TR><TD ALIGN=center><STRONG>Data Type</STRONG></TD>
485    <TD ALIGN=center><STRONG>Alignment Requirement</STRONG></TD></TR>
486<TR><TD ALIGN=center>byte</TD>
487    <TD ALIGN=center>1</TD></TR>
488<TR><TD ALIGN=center>half-word</TD>
489    <TD ALIGN=center>2</TD></TR>
490<TR><TD ALIGN=center>word</TD>
491    <TD ALIGN=center>4</TD></TR>
492<TR><TD ALIGN=center>doubleword</TD>
493    <TD ALIGN=center>8</TD></TR>
494  </TABLE>
495</CENTER>
496@end html
497@end ifset
498
499Doubleword load and store operations are only available in
500PowerPC CPU models which are sixty-four bit implementations.
501
502RTEMS does not directly support any PowerPC Memory Management
503Units, therefore, virtual memory or segmentation systems
504involving the PowerPC  are not supported.
505
506@c
507@c  COPYRIGHT (c) 1989-2007.
508@c  On-Line Applications Research Corporation (OAR).
509@c  All rights reserved.
510
511@section Interrupt Processing
512
513Although RTEMS hides many of the processor dependent
514details of interrupt processing, it is important to understand
515how the RTEMS interrupt manager is mapped onto the processor's
516unique architecture. Discussed in this chapter are the PowerPC's
517interrupt response and control mechanisms as they pertain to
518RTEMS.
519
520RTEMS and associated documentation uses the terms interrupt and vector.
521In the PowerPC architecture, these terms correspond to exception and
522exception handler, respectively.  The terms will be used interchangeably
523in this manual.
524
525@subsection Synchronous Versus Asynchronous Exceptions
526
527In the PowerPC architecture exceptions can be either precise or
528imprecise and either synchronous or asynchronous.  Asynchronous
529exceptions occur when an external event interrupts the processor.
530Synchronous exceptions are caused by the actions of an
531instruction. During an exception SRR0 is used to calculate where
532instruction processing should resume.  All instructions prior to
533the resume instruction will have completed execution.  SRR1 is used to
534store the machine status.
535
536There are two asynchronous nonmaskable, highest-priority exceptions
537system reset and machine check.  There are two asynchrononous maskable
538low-priority exceptions external interrupt and decrementer.  Nonmaskable
539execptions are never delayed, therefore if two nonmaskable, asynchronous
540exceptions occur in immediate succession, the state information saved by
541the first exception may be overwritten when the subsequent exception occurs.
542
543The PowerPC arcitecure defines one imprecise exception, the imprecise
544floating point enabled exception.  All other synchronous exceptions are
545precise.  The synchronization occuring during asynchronous precise
546exceptions conforms to the requirements for context synchronization.
547
548@subsection Vectoring of Interrupt Handler
549
550Upon determining that an exception can be taken the PowerPC automatically
551performs the following actions:
552
553@itemize @bullet
554@item an instruction address is loaded into SRR0
555
556@item bits 33-36 and 42-47 of SRR1 are loaded with information
557specific to the exception.
558
559@item bits 0-32, 37-41, and 48-63 of SRR1 are loaded with corresponding
560bits from the MSR.
561
562@item the MSR is set based upon the exception type.
563
564@item instruction fetch and execution resumes, using the new MSR value, at a location specific to the execption type.
565
566@end itemize
567
568If the interrupt handler was installed as an RTEMS
569interrupt handler, then upon receipt of the interrupt, the
570processor passes control to the RTEMS interrupt handler which
571performs the following actions:
572
573@itemize @bullet
574@item saves the state of the interrupted task on it's stack,
575
576@item saves all registers which are not normally preserved
577by the calling sequence so the user's interrupt service
578routine can be written in a high-level language.
579
580@item if this is the outermost (i.e. non-nested) interrupt,
581then the RTEMS interrupt handler switches from the current stack
582to the interrupt stack,
583
584@item enables exceptions,
585
586@item invokes the vectors to a user interrupt service routine (ISR).
587@end itemize
588
589Asynchronous interrupts are ignored while exceptions are
590disabled.  Synchronous interrupts which occur while are
591disabled result in the CPU being forced into an error mode.
592
593A nested interrupt is processed similarly with the
594exception that the current stack need not be switched to the
595interrupt stack.
596
597@subsection Interrupt Levels
598
599The PowerPC architecture supports only a single external
600asynchronous interrupt source.  This interrupt source
601may be enabled and disabled via the External Interrupt Enable (EE)
602bit in the Machine State Register (MSR).  Thus only two level (enabled
603and disabled) of external device interrupt priorities are
604directly supported by the PowerPC architecture. 
605
606Some PowerPC implementations include a Critical Interrupt capability
607which is often used to receive interrupts from high priority external
608devices.
609
610The RTEMS interrupt level mapping scheme for the PowerPC is not
611a numeric level as on most RTEMS ports.  It is a bit mapping in
612which the least three significiant bits of the interrupt level
613are mapped directly to the enabling of specific interrupt
614sources as follows:
615
616@table @b
617
618@item Critical Interrupt
619Setting bit 0 (the least significant bit) of the interrupt level
620enables the Critical Interrupt source, if it is available on this
621CPU model.
622
623@item Machine Check
624Setting bit 1 of the interrupt level enables Machine Check execptions.
625
626@item External Interrupt
627Setting bit 2 of the interrupt level enables External Interrupt execptions.
628
629@end table
630
631All other bits in the RTEMS task interrupt level are ignored.
632
633@c
634@c
635@c
636
637@section Default Fatal Error Processing
638
639The default fatal error handler for this architecture performs the
640following actions:
641
642@itemize @bullet
643
644@item places the error code in r3, and
645
646@item executes a trap instruction which results in a Program Exception.
647
648@end itemize
649
650If the Program Exception returns, then the following actions are performed:
651
652@itemize @bullet
653
654@item disables all processor exceptions by loading a 0 into the MSR, and
655
656@item goes into an infinite loop to simulate a halt processor instruction.
657
658@end itemize
659
660@section Symmetric Multiprocessing
661
662SMP is supported.  Available platforms are the Freescale QorIQ P series (e.g.
663P1020) and T series (e.g. T2080, T4240).
664
665@section Thread-Local Storage
666
667Thread-local storage is supported.
668
669@c
670@c
671@c
672
673@section Board Support Packages
674
675@subsection System Reset
676
677An RTEMS based application is initiated or
678re-initiated when the PowerPC processor is reset.  The PowerPC
679architecture defines a Reset Exception, but leaves the
680details of the CPU state as implementation specific.  Please
681refer to the User's Manual for the CPU model in question.
682
683In general, at power-up the PowerPC begin execution at address
6840xFFF00100 in supervisor mode with all exceptions disabled.  For
685soft resets, the CPU will vector to either 0xFFF00100 or 0x00000100
686depending upon the setting of the Exception Prefix bit in the MSR.
687If during a soft reset, a Machine Check Exception occurs, then the
688CPU may execute a hard reset.
689
690@subsection Processor Initialization
691
692If this PowerPC implementation supports on-chip caching
693and this is to be utilized, then it should be enabled during the
694reset application initialization code.  On-chip caching has been
695observed to prevent some emulators from working properly, so it
696may be necessary to run with caching disabled to use these emulators.
697
698In addition to the requirements described in the
699@b{Board Support Packages} chapter of the RTEMS C
700Applications User's Manual for the reset code
701which is executed before the call to @code{rtems_initialize_executive},
702the PowrePC version has the following specific requirements:
703
704@itemize @bullet
705@item Must leave the PR bit of the Machine State Register (MSR) set
706to 0 so the PowerPC remains in the supervisor state.
707
708@item Must set stack pointer (sp or r1) such that a minimum stack
709size of MINIMUM_STACK_SIZE bytes is provided for the RTEMS initialization
710sequence.
711
712@item Must disable all external interrupts (i.e. clear the EI (EE)
713bit of the machine state register).
714
715@item Must enable traps so window overflow and underflow
716conditions can be properly handled.
717
718@item Must initialize the PowerPC's initial Exception Table with default
719handlers.
720
721@end itemize
Note: See TracBrowser for help on using the repository browser.