source: rtems/doc/cpu_supplement/mips.t @ 83fb86f

4.104.114.84.95
Last change on this file since 83fb86f was 83fb86f, checked in by Joel Sherrill <joel.sherrill@…>, on 08/23/06 at 19:11:14

2006-08-23 Joel Sherrill <joel@…>

  • Makefile.am, configure.ac, FAQ/stamp-vti, FAQ/version.texi, common/cpright.texi: Merging CPU Supplements into a single document. As part of this removed the obsolete and impossible to maintain size and timing information.
  • cpu_supplement/.cvsignore, cpu_supplement/Makefile.am, cpu_supplement/arm.t, cpu_supplement/i386.t, cpu_supplement/m68k.t, cpu_supplement/mips.t, cpu_supplement/powerpc.t, cpu_supplement/preface.texi, cpu_supplement/sh.t, cpu_supplement/sparc.t, cpu_supplement/tic4x.t: New files.
  • supplements/.cvsignore, supplements/Makefile.am, supplements/supplement.am, supplements/arm/.cvsignore, supplements/arm/BSP_TIMES, supplements/arm/ChangeLog, supplements/arm/Makefile.am, supplements/arm/arm.texi, supplements/arm/bsp.t, supplements/arm/callconv.t, supplements/arm/cpumodel.t, supplements/arm/cputable.t, supplements/arm/fatalerr.t, supplements/arm/intr_NOTIMES.t, supplements/arm/memmodel.t, supplements/arm/preface.texi, supplements/arm/timeBSP.t, supplements/c4x/.cvsignore, supplements/c4x/BSP_TIMES, supplements/c4x/ChangeLog, supplements/c4x/Makefile.am, supplements/c4x/bsp.t, supplements/c4x/c4x.texi, supplements/c4x/callconv.t, supplements/c4x/cpumodel.t, supplements/c4x/cputable.t, supplements/c4x/fatalerr.t, supplements/c4x/intr_NOTIMES.t, supplements/c4x/memmodel.t, supplements/c4x/preface.texi, supplements/c4x/timeBSP.t, supplements/i386/.cvsignore, supplements/i386/ChangeLog, supplements/i386/FORCE386_TIMES, supplements/i386/Makefile.am, supplements/i386/bsp.t, supplements/i386/callconv.t, supplements/i386/cpumodel.t, supplements/i386/cputable.t, supplements/i386/fatalerr.t, supplements/i386/i386.texi, supplements/i386/intr_NOTIMES.t, supplements/i386/memmodel.t, supplements/i386/preface.texi, supplements/i386/timeFORCE386.t, supplements/m68k/.cvsignore, supplements/m68k/ChangeLog, supplements/m68k/MVME136_TIMES, supplements/m68k/Makefile.am, supplements/m68k/bsp.t, supplements/m68k/callconv.t, supplements/m68k/cpumodel.t, supplements/m68k/cputable.t, supplements/m68k/fatalerr.t, supplements/m68k/intr_NOTIMES.t, supplements/m68k/m68k.texi, supplements/m68k/memmodel.t, supplements/m68k/preface.texi, supplements/m68k/timeMVME136.t, supplements/m68k/timedata.t, supplements/mips/.cvsignore, supplements/mips/BSP_TIMES, supplements/mips/ChangeLog, supplements/mips/Makefile.am, supplements/mips/bsp.t, supplements/mips/callconv.t, supplements/mips/cpumodel.t, supplements/mips/cputable.t, supplements/mips/fatalerr.t, supplements/mips/intr_NOTIMES.t, supplements/mips/memmodel.t, supplements/mips/mips.texi, supplements/mips/preface.texi, supplements/mips/timeBSP.t, supplements/powerpc/.cvsignore, supplements/powerpc/ChangeLog, supplements/powerpc/DMV177_TIMES, supplements/powerpc/Makefile.am, supplements/powerpc/PSIM_TIMES, supplements/powerpc/bsp.t, supplements/powerpc/callconv.t, supplements/powerpc/cpumodel.t, supplements/powerpc/cputable.t, supplements/powerpc/fatalerr.t, supplements/powerpc/intr_NOTIMES.t, supplements/powerpc/memmodel.t, supplements/powerpc/powerpc.texi, supplements/powerpc/preface.texi, supplements/powerpc/timeDMV177.t, supplements/powerpc/timePSIM.t, supplements/sh/.cvsignore, supplements/sh/BSP_TIMES, supplements/sh/ChangeLog, supplements/sh/Makefile.am, supplements/sh/bsp.t, supplements/sh/callconv.t, supplements/sh/cpumodel.t, supplements/sh/cputable.t, supplements/sh/fatalerr.t, supplements/sh/intr_NOTIMES.t, supplements/sh/memmodel.t, supplements/sh/preface.texi, supplements/sh/sh.texi, supplements/sh/timeBSP.t, supplements/sparc/.cvsignore, supplements/sparc/ChangeLog, supplements/sparc/ERC32_TIMES, supplements/sparc/Makefile.am, supplements/sparc/bsp.t, supplements/sparc/callconv.t, supplements/sparc/cpumodel.t, supplements/sparc/cputable.t, supplements/sparc/fatalerr.t, supplements/sparc/intr_NOTIMES.t, supplements/sparc/memmodel.t, supplements/sparc/preface.texi, supplements/sparc/sparc.texi, supplements/sparc/timeERC32.t, supplements/template/.cvsignore, supplements/template/BSP_TIMES, supplements/template/ChangeLog, supplements/template/Makefile.am, supplements/template/bsp.t, supplements/template/callconv.t, supplements/template/cpumodel.t, supplements/template/cputable.t, supplements/template/fatalerr.t, supplements/template/intr_NOTIMES.t, supplements/template/memmodel.t, supplements/template/preface.texi, supplements/template/template.texi, supplements/template/timeBSP.t: Removed.
  • Property mode set to 100644
File size: 23.1 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-2002.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
9@ifinfo
10@end ifinfo
11@chapter MIPS Specific Information
12
13The Real Time Executive for Multiprocessor Systems (RTEMS)
14is designed to be portable across multiple processor
15architectures.  However, the nature of real-time systems makes
16it essential that the application designer understand certain
17processor dependent implementation details.  These processor
18dependencies include calling convention, board support package
19issues, interrupt processing, exact RTEMS memory requirements,
20performance data, header files, and the assembly language
21interface to the executive.
22
23This document discusses the VENDOR XXX
24architecture dependencies in this port of RTEMS.  The XXX
25family has a wide variety of CPU models within it.  The part
26numbers ...
27
28XXX fill in some things here
29
30It is highly recommended that the XXX
31RTEMS application developer obtain and become familiar with the
32documentation for the processor being used as well as the
33documentation for the family as a whole.
34
35@subheading Architecture Documents
36
37IDT docs are online at http://www.idt.com/products/risc/Welcome.html
38
39For information on the XXX architecture,
40refer to the following documents available from VENDOR
41(@file{http//www.XXX.com/}):
42
43@itemize @bullet
44@item @cite{XXX Family Reference, VENDOR, PART NUMBER}.
45@end itemize
46
47@subheading MODEL SPECIFIC DOCUMENTS
48
49For information on specific processor models and
50their associated coprocessors, refer to the following documents:
51
52@itemize  @bullet
53@item @cite{XXX MODEL Manual, VENDOR, PART NUMBER}.
54@item @cite{XXX MODEL Manual, VENDOR, PART NUMBER}.
55@end itemize
56
57@c
58@c  COPYRIGHT (c) 1988-2002.
59@c  On-Line Applications Research Corporation (OAR).
60@c  All rights reserved.
61@c
62@c  $Id$
63@c
64
65@section CPU Model Dependent Features
66
67
68Microprocessors are generally classified into
69families with a variety of CPU models or implementations within
70that family.  Within a processor family, there is a high level
71of binary compatibility.  This family may be based on either an
72architectural specification or on maintaining compatibility with
73a popular processor.  Recent microprocessor families such as the
74SPARC or PowerPC are based on an architectural specification
75which is independent or any particular CPU model or
76implementation.  Older families such as the M68xxx and the iX86
77evolved as the manufacturer strived to produce higher
78performance processor models which maintained binary
79compatibility with older models.
80
81RTEMS takes advantage of the similarity of the
82various models within a CPU family.  Although the models do vary
83in significant ways, the high level of compatibility makes it
84possible to share the bulk of the CPU dependent executive code
85across the entire family.  Each processor family supported by
86RTEMS has a list of features which vary between CPU models
87within a family.  For example, the most common model dependent
88feature regardless of CPU family is the presence or absence of a
89floating point unit or coprocessor.  When defining the list of
90features present on a particular CPU model, one simply notes
91that floating point hardware is or is not present and defines a
92single constant appropriately.  Conditional compilation is
93utilized to include the appropriate source code for this CPU
94model's feature set.  It is important to note that this means
95that RTEMS is thus compiled using the appropriate feature set
96and compilation flags optimal for this CPU model used.  The
97alternative would be to generate a binary which would execute on
98all family members using only the features which were always
99present.
100
101This chapter presents the set of features which vary
102across SPARC implementations and are of importance to RTEMS.
103The set of CPU model feature macros are defined in the file
104cpukit/score/cpu/XXX/XXX.h based upon the particular CPU
105model defined on the compilation command line.
106
107@subsection CPU Model Name
108
109The macro CPU_MODEL_NAME is a string which designates
110the name of this CPU model.  For example, for the MODEL
111processor, this macro is set to the string "XXX".
112
113@subsection Floating Point Unit
114
115The macro XXX_HAS_FPU is set to 1 to indicate that
116this CPU model has a hardware floating point unit and 0
117otherwise.  It does not matter whether the hardware floating
118point support is incorporated on-chip or is an external
119coprocessor.
120
121@subsection Another Optional Feature
122
123The macro XXX
124@c
125@c  COPYRIGHT (c) 1988-2002.
126@c  On-Line Applications Research Corporation (OAR).
127@c  All rights reserved.
128@c
129@c  $Id$
130@c
131
132@section Calling Conventions
133
134
135Each high-level language compiler generates
136subroutine entry and exit code based upon a set of rules known
137as the compiler's calling convention.   These rules address the
138following issues:
139
140@itemize @bullet
141@item register preservation and usage
142@item parameter passing
143@item call and return mechanism
144@end itemize
145
146A compiler's calling convention is of importance when
147interfacing to subroutines written in another language either
148assembly or high-level.  Even when the high-level language and
149target processor are the same, different compilers may use
150different calling conventions.  As a result, calling conventions
151are both processor and compiler dependent.
152
153@subsection Processor Background
154
155The MC68xxx architecture supports a simple yet
156effective call and return mechanism.  A subroutine is invoked
157via the branch to subroutine (@code{XXX}) or the jump to subroutine
158(@code{XXX}) instructions.  These instructions push the return address
159on the current stack.  The return from subroutine (@code{XXX})
160instruction pops the return address off the current stack and
161transfers control to that instruction.  It is is important to
162note that the XXX call and return mechanism does not
163automatically save or restore any registers.  It is the
164responsibility of the high-level language compiler to define the
165register preservation and usage convention.
166
167@subsection Calling Mechanism
168
169All RTEMS directives are invoked using either a @code{XXX}
170or @code{XXX} instruction and return to the user application via the
171@code{XXX} instruction.
172
173@subsection Register Usage
174
175As discussed above, the @code{XXX} and @code{XXX} instructions do
176not automatically save any registers.  RTEMS uses the registers
177@b{D0}, @b{D1}, @b{A0}, and @b{A1} as scratch registers.  These registers are
178not preserved by RTEMS directives therefore, the contents of
179these registers should not be assumed upon return from any RTEMS
180directive.
181
182@subsection Parameter Passing
183
184RTEMS assumes that arguments are placed on the
185current stack before the directive is invoked via the @code{XXX} or @code{XXX}
186instruction.  The first argument is assumed to be closest to the
187return address on the stack.  This means that the first argument
188of the C calling sequence is pushed last.  The following
189pseudo-code illustrates the typical sequence used to call a
190RTEMS directive with three (3) arguments:
191
192@example
193@group
194push third argument
195push second argument
196push first argument
197invoke directive
198remove arguments from the stack
199@end group
200@end example
201
202The arguments to RTEMS are typically pushed onto the
203stack using a move instruction with a pre-decremented stack
204pointer as the destination.  These arguments must be removed
205from the stack after control is returned to the caller.  This
206removal is typically accomplished by adding the size of the
207argument list in bytes to the current stack pointer.
208
209@subsection User-Provided Routines
210
211All user-provided routines invoked by RTEMS, such as
212user extensions, device drivers, and MPCI routines, must also
213adhere to these calling conventions.
214
215@c
216@c  COPYRIGHT (c) 1988-2002.
217@c  On-Line Applications Research Corporation (OAR).
218@c  All rights reserved.
219@c
220@c  $Id$
221@c
222
223@section Memory Model
224
225
226A processor may support any combination of memory
227models ranging from pure physical addressing to complex demand
228paged virtual memory systems.  RTEMS supports a flat memory
229model which ranges contiguously over the processor's allowable
230address space.  RTEMS does not support segmentation or virtual
231memory of any kind.  The appropriate memory model for RTEMS
232provided by the targeted processor and related characteristics
233of that model are described in this chapter.
234
235@subsection Flat Memory Model
236
237The XXX family supports a flat 32-bit address
238space with addresses ranging from 0x00000000 to 0xFFFFFFFF (4
239gigabytes).  Each address is represented by a 32-bit value and
240is byte addressable.  The address may be used to reference a
241single byte, word (2-bytes), or long word (4 bytes).  Memory
242accesses within this address space are performed in big endian
243fashion by the processors in this family.
244
245Some of the XXX family members such as the
246XXX, XXX, and XXX support virtual memory and
247segmentation.  The XXX requires external hardware support
248such as the XXX Paged Memory Management Unit coprocessor
249which is typically used to perform address translations for
250these systems.  RTEMS does not support virtual memory or
251segmentation on any of the XXX family members.
252
253@c
254@c  Interrupt Stack Frame Picture
255@c
256@c  COPYRIGHT (c) 1988-2002.
257@c  On-Line Applications Research Corporation (OAR).
258@c  All rights reserved.
259@c
260@c  $Id$
261@c
262
263@section Interrupt Processing
264
265
266Different types of processors respond to the
267occurrence of an interrupt in its own unique fashion. In
268addition, each processor type provides a control mechanism to
269allow for the proper handling of an interrupt.  The processor
270dependent response to the interrupt modifies the current
271execution state and results in a change in the execution stream.
272Most processors require that an interrupt handler utilize some
273special control mechanisms to return to the normal processing
274stream.  Although RTEMS hides many of the processor dependent
275details of interrupt processing, it is important to understand
276how the RTEMS interrupt manager is mapped onto the processor's
277unique architecture. Discussed in this chapter are the XXX's
278interrupt response and control mechanisms as they pertain to
279RTEMS.
280
281@subsection Vectoring of an Interrupt Handler
282
283Depending on whether or not the particular CPU
284supports a separate interrupt stack, the XXX family has two
285different interrupt handling models.
286
287@subsubsection Models Without Separate Interrupt Stacks
288
289Upon receipt of an interrupt the XXX family
290members without separate interrupt stacks automatically perform
291the following actions:
292
293@itemize @bullet
294@item To Be Written
295@end itemize
296
297@subsubsection Models With Separate Interrupt Stacks
298
299Upon receipt of an interrupt the XXX family
300members with separate interrupt stacks automatically perform the
301following actions:
302
303@itemize @bullet
304@item saves the current status register (SR),
305
306@item clears the master/interrupt (M) bit of the SR to
307indicate the switch from master state to interrupt state,
308
309@item sets the privilege mode to supervisor,
310
311@item suppresses tracing,
312
313@item sets the interrupt mask level equal to the level of the
314interrupt being serviced,
315
316@item pushes an interrupt stack frame (ISF), which includes
317the program counter (PC), the status register (SR), and the
318format/exception vector offset (FVO) word, onto the supervisor
319and interrupt stacks,
320
321@item switches the current stack to the interrupt stack and
322vectors to an interrupt service routine (ISR).  If the ISR was
323installed with the interrupt_catch directive, then the RTEMS
324interrupt handler will begin execution.  The RTEMS interrupt
325handler saves all registers which are not preserved according to
326the calling conventions and invokes the application's ISR.
327@end itemize
328
329A nested interrupt is processed similarly by these
330CPU models with the exception that only a single ISF is placed
331on the interrupt stack and the current stack need not be
332switched.
333
334The FVO word in the Interrupt Stack Frame is examined
335by RTEMS to determine when an outer most interrupt is being
336exited. Since the FVO is used by RTEMS for this purpose, the
337user application code MUST NOT modify this field.
338
339The following shows the Interrupt Stack Frame for
340XXX CPU models with separate interrupt stacks:
341
342@ifset use-ascii
343@example
344@group
345               +----------------------+
346               |    Status Register   | 0x0
347               +----------------------+   
348               | Program Counter High | 0x2
349               +----------------------+   
350               | Program Counter Low  | 0x4
351               +----------------------+   
352               | Format/Vector Offset | 0x6
353               +----------------------+   
354@end group
355@end example
356@end ifset
357
358@ifset use-tex
359@sp 1
360@tex
361\centerline{\vbox{\offinterlineskip\halign{
362\strut\vrule#&
363\hbox to 2.00in{\enskip\hfil#\hfil}&
364\vrule#&
365\hbox to 0.50in{\enskip\hfil#\hfil}
366\cr
367\multispan{3}\hrulefill\cr
368& Status Register && 0x0\cr
369\multispan{3}\hrulefill\cr
370& Program Counter High && 0x2\cr
371\multispan{3}\hrulefill\cr
372& Program Counter Low && 0x4\cr
373\multispan{3}\hrulefill\cr
374& Format/Vector Offset && 0x6\cr
375\multispan{3}\hrulefill\cr
376}}\hfil}
377@end tex
378@end ifset
379
380@ifset use-html
381@html
382<CENTER>
383  <TABLE COLS=2 WIDTH="40%" BORDER=2>
384<TR><TD ALIGN=center><STRONG>Status Register</STRONG></TD>
385    <TD ALIGN=center>0x0</TD></TR>
386<TR><TD ALIGN=center><STRONG>Program Counter High</STRONG></TD>
387    <TD ALIGN=center>0x2</TD></TR>
388<TR><TD ALIGN=center><STRONG>Program Counter Low</STRONG></TD>
389    <TD ALIGN=center>0x4</TD></TR>
390<TR><TD ALIGN=center><STRONG>Format/Vector Offset</STRONG></TD>
391    <TD ALIGN=center>0x6</TD></TR>
392  </TABLE>
393</CENTER>
394@end html
395@end ifset
396
397@subsection Interrupt Levels
398
399Eight levels (0-7) of interrupt priorities are
400supported by XXX family members with level seven (7) being
401the highest priority.  Level zero (0) indicates that interrupts
402are fully enabled.  Interrupt requests for interrupts with
403priorities less than or equal to the current interrupt mask
404level are ignored.
405
406Although RTEMS supports 256 interrupt levels, the
407XXX family only supports eight.  RTEMS interrupt levels 0
408through 7 directly correspond to XXX interrupt levels.  All
409other RTEMS interrupt levels are undefined and their behavior is
410unpredictable.
411
412@subsection Disabling of Interrupts by RTEMS
413
414During the execution of directive calls, critical
415sections of code may be executed.  When these sections are
416encountered, RTEMS disables interrupts to level seven (7) before
417the execution of this section and restores them to the previous
418level upon completion of the section.  RTEMS has been optimized
419to insure that interrupts are disabled for less than
420RTEMS_MAXIMUM_DISABLE_PERIOD microseconds on a
421RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz processor with
422zero wait states.  These numbers will vary based the
423number of wait states and processor speed present on the target board.
424[NOTE:  The maximum period with interrupts disabled is hand calculated.  This
425calculation was last performed for Release
426RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
427
428Non-maskable interrupts (NMI) cannot be disabled, and
429ISRs which execute at this level MUST NEVER issue RTEMS system
430calls.  If a directive is invoked, unpredictable results may
431occur due to the inability of RTEMS to protect its critical
432sections.  However, ISRs that make no system calls may safely
433execute as non-maskable interrupts.
434
435@subsection Interrupt Stack
436
437RTEMS allocates the interrupt stack from the
438Workspace Area.  The amount of memory allocated for the
439interrupt stack is determined by the interrupt_stack_size field
440in the CPU Configuration Table.  During the initialization
441process, RTEMS will install its interrupt stack.
442
443The mips port of RTEMS supports a software managed
444dedicated interrupt stack on those CPU models which do not
445support a separate interrupt stack in hardware.
446
447
448@c
449@c  COPYRIGHT (c) 1988-2002.
450@c  On-Line Applications Research Corporation (OAR).
451@c  All rights reserved.
452@c
453@c  $Id$
454@c
455
456@section Default Fatal Error Processing
457
458
459Upon detection of a fatal error by either the
460application or RTEMS the fatal error manager is invoked.  The
461fatal error manager will invoke the user-supplied fatal error
462handlers.  If no user-supplied handlers are configured,  the
463RTEMS provided default fatal error handler is invoked.  If the
464user-supplied fatal error handlers return to the executive the
465default fatal error handler is then invoked.  This chapter
466describes the precise operations of the default fatal error
467handler.
468
469@subsection Default Fatal Error Handler Operations
470
471The default fatal error handler which is invoked by
472the @code{rtems_fatal_error_occurred} directive when there is
473no user handler configured or the user handler returns control to
474RTEMS.  The default fatal error handler disables processor interrupts,
475places the error code in @b{XXX}, and executes a @code{XXX}
476instruction to simulate a halt processor instruction.
477
478@c
479@c  COPYRIGHT (c) 1988-2002.
480@c  On-Line Applications Research Corporation (OAR).
481@c  All rights reserved.
482@c
483@c  $Id$
484@c
485
486@section Board Support Packages
487
488
489An RTEMS Board Support Package (BSP) must be designed
490to support a particular processor and target board combination.
491This chapter presents a discussion of XXX specific BSP
492issues.   For more information on developing a BSP, refer to the
493chapter titled Board Support Packages in the RTEMS
494Applications User's Guide.
495
496@subsection System Reset
497
498An RTEMS based application is initiated or
499re-initiated when the XXX processor is reset.  When the
500XXX is reset, the processor performs the following actions:
501
502@itemize @bullet
503@item The tracing bits of the status register are cleared to
504disable tracing.
505
506@item The supervisor interrupt state is entered by setting the
507supervisor (S) bit and clearing the master/interrupt (M) bit of
508the status register.
509
510@item The interrupt mask of the status register is set to
511level 7 to effectively disable all maskable interrupts.
512
513@item The vector base register (VBR) is set to zero.
514
515@item The cache control register (CACR) is set to zero to
516disable and freeze the processor cache.
517
518@item The interrupt stack pointer (ISP) is set to the value
519stored at vector 0 (bytes 0-3) of the exception vector table
520(EVT).
521
522@item The program counter (PC) is set to the value stored at
523vector 1 (bytes 4-7) of the EVT.
524
525@item The processor begins execution at the address stored in
526the PC.
527@end itemize
528
529@subsection Processor Initialization
530
531The address of the application's initialization code
532should be stored in the first vector of the EVT which will allow
533the immediate vectoring to the application code.  If the
534application requires that the VBR be some value besides zero,
535then it should be set to the required value at this point.  All
536tasks share the same XXX's VBR value.  Because interrupts
537are enabled automatically by RTEMS as part of the initialize
538executive directive, the VBR MUST be set before this directive
539is invoked to insure correct interrupt vectoring.  If processor
540caching is to be utilized, then it should be enabled during the
541reset application initialization code.
542
543In addition to the requirements described in the
544Board Support Packages chapter of the Applications User's
545Manual for the reset code which is executed before the call to
546initialize executive, the XXX version has the following
547specific requirements:
548
549@itemize @bullet
550@item Must leave the S bit of the status register set so that
551the XXX remains in the supervisor state.
552
553@item Must set the M bit of the status register to remove the
554XXX from the interrupt state.
555
556@item Must set the master stack pointer (MSP) such that a
557minimum stack size of MINIMUM_STACK_SIZE bytes is provided for
558the initialize executive directive.
559
560@item Must initialize the XXX's vector table.
561@end itemize
562
563Note that the BSP is not responsible for allocating
564or installing the interrupt stack.  RTEMS does this
565automatically as part of initialization.  If the BSP does not
566install an interrupt stack and -- for whatever reason -- an
567interrupt occurs before initialize_executive is invoked, then
568the results are unpredictable.
569
570@c
571@c  COPYRIGHT (c) 1988-2002.
572@c  On-Line Applications Research Corporation (OAR).
573@c  All rights reserved.
574@c
575@c  $Id$
576@c
577
578@section Processor Dependent Information Table
579
580
581Any highly processor dependent information required
582to describe a processor to RTEMS is provided in the CPU
583Dependent Information Table.  This table is not required for all
584processors supported by RTEMS.  This chapter describes the
585contents, if any, for a particular processor type.
586
587@subsection CPU Dependent Information Table
588
589The XXX version of the RTEMS CPU Dependent
590Information Table contains the information required to interface
591a Board Support Package and RTEMS on the XXX.  This
592information is provided to allow RTEMS to interoperate
593effectively with the BSP.  The C structure definition is given
594here:
595
596@example
597@group
598typedef struct @{
599  void       (*pretasking_hook)( void );
600  void       (*predriver_hook)( void );
601  void       (*postdriver_hook)( void );
602  void       (*idle_task)( void );
603  boolean      do_zero_of_workspace;
604  unsigned32   idle_task_stack_size;
605  unsigned32   interrupt_stack_size;
606  unsigned32   extra_mpci_receive_server_stack;
607  void *     (*stack_allocate_hook)( unsigned32 );
608  void       (*stack_free_hook)( void* );
609  /* end of fields required on all CPUs */
610
611  /* XXX CPU family dependent stuff */
612@} rtems_cpu_table;
613@end group
614@end example
615
616@table @code
617@item pretasking_hook
618is the address of the user provided routine which is invoked
619once RTEMS APIs are initialized.  This routine will be invoked
620before any system tasks are created.  Interrupts are disabled.
621This field may be NULL to indicate that the hook is not utilized.
622
623@item predriver_hook
624is the address of the user provided
625routine that is invoked immediately before the
626the device drivers and MPCI are initialized. RTEMS
627initialization is complete but interrupts and tasking are disabled.
628This field may be NULL to indicate that the hook is not utilized.
629
630@item postdriver_hook
631is the address of the user provided
632routine that is invoked immediately after the
633the device drivers and MPCI are initialized. RTEMS
634initialization is complete but interrupts and tasking are disabled.
635This field may be NULL to indicate that the hook is not utilized.
636
637@item idle_task
638is the address of the optional user
639provided routine which is used as the system's IDLE task.  If
640this field is not NULL, then the RTEMS default IDLE task is not
641used.  This field may be NULL to indicate that the default IDLE
642is to be used.
643
644@item do_zero_of_workspace
645indicates whether RTEMS should
646zero the Workspace as part of its initialization.  If set to
647TRUE, the Workspace is zeroed.  Otherwise, it is not.
648
649@item idle_task_stack_size
650is the size of the RTEMS idle task stack in bytes. 
651If this number is less than MINIMUM_STACK_SIZE, then the
652idle task's stack will be MINIMUM_STACK_SIZE in byte.
653
654@item interrupt_stack_size
655is the size of the RTEMS
656allocated interrupt stack in bytes.  This value must be at least
657as large as MINIMUM_STACK_SIZE.
658
659@item extra_mpci_receive_server_stack
660is the extra stack space allocated for the RTEMS MPCI receive server task
661in bytes.  The MPCI receive server may invoke nearly all directives and
662may require extra stack space on some targets.
663
664@item stack_allocate_hook
665is the address of the optional user provided routine which allocates
666memory for task stacks.  If this hook is not NULL, then a stack_free_hook
667must be provided as well.
668
669@item stack_free_hook
670is the address of the optional user provided routine which frees
671memory for task stacks.  If this hook is not NULL, then a stack_allocate_hook
672must be provided as well.
673
674@item XXX
675is where the CPU family dependent stuff goes.
676
677@end table
Note: See TracBrowser for help on using the repository browser.