source: rtems/doc/supplements/i386/bsp.texi @ ae68ff0

4.104.114.84.95
Last change on this file since ae68ff0 was ae68ff0, checked in by Joel Sherrill <joel.sherrill@…>, on 05/27/97 at 12:40:11

Initial revision

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