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