]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - doc/html/ref/hal-default-synchronous-exception-handling.html
Initial revision
[karo-tx-redboot.git] / doc / html / ref / hal-default-synchronous-exception-handling.html
1 <!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2 <!-- This material may be distributed only subject to the terms      -->
3 <!-- and conditions set forth in the Open Publication License, v1.0  -->
4 <!-- or later (the latest version is presently available at          -->
5 <!-- http://www.opencontent.org/openpub/).                           -->
6 <!-- Distribution of the work or derivative of the work in any       -->
7 <!-- standard (paper) book form is prohibited unless prior           -->
8 <!-- permission is obtained from the copyright holder.               -->
9 <HTML
10 ><HEAD
11 ><TITLE
12 >Default Synchronous Exception Handling</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
14 <META
15 NAME="GENERATOR"
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17 "><LINK
18 REL="HOME"
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
21 REL="UP"
22 TITLE="Exception Handling"
23 HREF="hal-exception-handling.html"><LINK
24 REL="PREVIOUS"
25 TITLE="Vectors and VSRs"
26 HREF="hal-vectors-and-vsrs.html"><LINK
27 REL="NEXT"
28 TITLE="Default Interrupt Handling"
29 HREF="hal-default-interrupt-handling.html"></HEAD
30 ><BODY
31 CLASS="SECTION"
32 BGCOLOR="#FFFFFF"
33 TEXT="#000000"
34 LINK="#0000FF"
35 VLINK="#840084"
36 ALINK="#0000FF"
37 ><DIV
38 CLASS="NAVHEADER"
39 ><TABLE
40 SUMMARY="Header navigation table"
41 WIDTH="100%"
42 BORDER="0"
43 CELLPADDING="0"
44 CELLSPACING="0"
45 ><TR
46 ><TH
47 COLSPAN="3"
48 ALIGN="center"
49 >eCos Reference Manual</TH
50 ></TR
51 ><TR
52 ><TD
53 WIDTH="10%"
54 ALIGN="left"
55 VALIGN="bottom"
56 ><A
57 HREF="hal-vectors-and-vsrs.html"
58 ACCESSKEY="P"
59 >Prev</A
60 ></TD
61 ><TD
62 WIDTH="80%"
63 ALIGN="center"
64 VALIGN="bottom"
65 >Chapter 10. Exception Handling</TD
66 ><TD
67 WIDTH="10%"
68 ALIGN="right"
69 VALIGN="bottom"
70 ><A
71 HREF="hal-default-interrupt-handling.html"
72 ACCESSKEY="N"
73 >Next</A
74 ></TD
75 ></TR
76 ></TABLE
77 ><HR
78 ALIGN="LEFT"
79 WIDTH="100%"></DIV
80 ><DIV
81 CLASS="SECTION"
82 ><H1
83 CLASS="SECTION"
84 ><A
85 NAME="HAL-DEFAULT-SYNCHRONOUS-EXCEPTION-HANDLING">Default Synchronous Exception Handling</H1
86 ><P
87 >Most synchronous exception VSR table entries will point to a default
88 exception VSR which is responsible for handling all exceptions in a
89 generic manner. The default VSR simply saves the CPU state, makes any
90 adjustments to the CPU state that is necessary, and calls
91 <TT
92 CLASS="FUNCTION"
93 >cyg_hal_exception_handler()</TT
94 >.</P
95 ><P
96 ><TT
97 CLASS="FUNCTION"
98 >cyg_hal_exception_handler()</TT
99 > needs to pass the
100 exception on to some handling code.  There are two basic destinations:
101 enter GDB or pass the exception up to eCos. Exactly which
102 destination is taken depends on the configuration. When the GDB stubs are
103 included then the exception is passed to them, otherwise it is passed
104 to eCos.</P
105 ><P
106 >If an eCos application has been loaded by RedBoot then the VSR table
107 entries will all point into RedBoot's exception VSR, and will
108 therefore enter GDB if an exception occurs. If the eCos application
109 wants to handle an exception itself, it needs to replace the the VSR
110 table entry with one pointing to its own VSR. It can do this with the
111 <TT
112 CLASS="FUNCTION"
113 >HAL_VSR_SET_TO_ECOS_HANDLER()</TT
114 > macro.</P
115 ></DIV
116 ><DIV
117 CLASS="NAVFOOTER"
118 ><HR
119 ALIGN="LEFT"
120 WIDTH="100%"><TABLE
121 SUMMARY="Footer navigation table"
122 WIDTH="100%"
123 BORDER="0"
124 CELLPADDING="0"
125 CELLSPACING="0"
126 ><TR
127 ><TD
128 WIDTH="33%"
129 ALIGN="left"
130 VALIGN="top"
131 ><A
132 HREF="hal-vectors-and-vsrs.html"
133 ACCESSKEY="P"
134 >Prev</A
135 ></TD
136 ><TD
137 WIDTH="34%"
138 ALIGN="center"
139 VALIGN="top"
140 ><A
141 HREF="ecos-ref.html"
142 ACCESSKEY="H"
143 >Home</A
144 ></TD
145 ><TD
146 WIDTH="33%"
147 ALIGN="right"
148 VALIGN="top"
149 ><A
150 HREF="hal-default-interrupt-handling.html"
151 ACCESSKEY="N"
152 >Next</A
153 ></TD
154 ></TR
155 ><TR
156 ><TD
157 WIDTH="33%"
158 ALIGN="left"
159 VALIGN="top"
160 >Vectors and VSRs</TD
161 ><TD
162 WIDTH="34%"
163 ALIGN="center"
164 VALIGN="top"
165 ><A
166 HREF="hal-exception-handling.html"
167 ACCESSKEY="U"
168 >Up</A
169 ></TD
170 ><TD
171 WIDTH="33%"
172 ALIGN="right"
173 VALIGN="top"
174 >Default Interrupt Handling</TD
175 ></TR
176 ></TABLE
177 ></DIV
178 ></BODY
179 ></HTML
180 >