source: rtems/doc/supplements/i386/bsp.t @ 139b2e4a

4.104.114.84.95
Last change on this file since 139b2e4a was 139b2e4a, checked in by Joel Sherrill <joel.sherrill@…>, on 06/04/97 at 18:32:07

added CVS Id string

  • Property mode set to 100644
File size: 4.3 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-1997.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
9@ifinfo
10@node Board Support Packages, Board Support Packages Introduction, Default Fatal Error Processing Default Fatal Error Handler Operations, Top
11@end ifinfo
12@chapter Board Support Packages
13@ifinfo
14@menu
15* Board Support Packages Introduction::
16* Board Support Packages System Reset::
17* Board Support Packages Processor Initialization::
18@end menu
19@end ifinfo
20
21@ifinfo
22@node Board Support Packages Introduction, Board Support Packages System Reset, Board Support Packages, Board Support Packages
23@end ifinfo
24@section Introduction
25
26An RTEMS Board Support Package (BSP) must be designed
27to support a particular processor and target board combination.
28This chapter presents a discussion of i386 specific BSP issues.
29For more information on developing a BSP, refer to the chapter
30titled Board Support Packages in the RTEMS
31Applications User's Guide.
32
33@ifinfo
34@node Board Support Packages System Reset, Board Support Packages Processor Initialization, Board Support Packages Introduction, Board Support Packages
35@end ifinfo
36@section System Reset
37
38An RTEMS based application is initiated when the i386
39processor is reset.  When the i386 is reset,
40
41@itemize @bullet
42@item The EAX register is set to indicate the results of the
43processor's power-up self test.   If the self-test was not
44executed, the contents of this register are undefined.
45Otherwise, a non-zero value indicates the processor is faulty
46and a zero value indicates a successful self-test.
47
48@item The DX register holds a component identifier and
49revision level.  DH contains 3 to indicate an i386 component and
50DL contains a unique revision level indicator.
51
52@item Control register zero (CR0) is set such that the
53processor is in real mode with paging disabled.   Other portions
54of CR0 are used to indicate the presence of a numeric
55coprocessor.
56
57@item All bits in the extended flags register (EFLAG) which
58are not permanently set are cleared.  This inhibits all maskable
59interrupts.
60
61@item The Interrupt Descriptor Register (IDTR) is set to point
62at address zero.
63
64@item All segment registers are set to zero.
65
66@item The instruction pointer is set to 0x0000FFF0.   The
67first instruction executed after a reset is actually at
680xFFFFFFF0 because the i386 asserts the upper twelve address
69until the first intersegment (FAR) JMP or CALL instruction.
70When a JMP or CALL is executed, the upper twelve address lines
71are lowered and the processor begins executing in the first
72megabyte of memory.
73@end itemize
74
75Typically, an intersegment JMP to the application's
76initialization code is placed at address 0xFFFFFFF0.
77
78@ifinfo
79@node Board Support Packages Processor Initialization, Processor Dependent Information Table, Board Support Packages System Reset, Board Support Packages
80@end ifinfo
81@section Processor Initialization
82
83This initialization code is responsible for
84initializing all data structures required by the i386 in
85protected mode and for actually entering protected mode.  The
86i386 must be placed in protected mode and the segment registers
87and associated selectors must be initialized before the
88initialize_executive directive is invoked.
89
90The initialization code is responsible for
91initializing the Global Descriptor Table such that the i386 is
92in the thirty-two bit flat memory model with paging disabled.
93In this mode, the i386 automatically converts every address from
94a logical to a physical address each time it is used.  For more
95information on the memory model used by RTEMS, please refer to
96the Memory Model chapter in this document.
97
98If the application requires that the IDTR be some
99value besides zero, then it should set it to the required value
100at this point.  All tasks share the same i386 IDTR value.
101Because interrupts are enabled automatically by RTEMS as part of
102the initialize_executive directive, the IDTR MUST be set
103properly before this directive is invoked to insure correct
104interrupt vectoring.  If processor caching is to be utilized,
105then it should be enabled during the reset application
106initialization code.  The reset code which is executed before
107the call to initialize_executive has the following requirements:
108
109For more information regarding the i386s data
110structures and their contents, refer to Intel's 386
111Programmer's Reference Manual.
112
Note: See TracBrowser for help on using the repository browser.