OLD | NEW |
1 //------------------------------------------------------------------------------ | 1 //------------------------------------------------------------------------------ |
2 // <copyright file="regdump.h" company="Atheros"> | 2 // <copyright file="regdump.h" company="Atheros"> |
3 // Copyright (c) 2004-2007 Atheros Corporation. All rights reserved. | 3 // Copyright (c) 2004-2010 Atheros Corporation. All rights reserved. |
4 // | 4 // |
5 // This program is free software; you can redistribute it and/or modify | |
6 // it under the terms of the GNU General Public License version 2 as | |
7 // published by the Free Software Foundation; | |
8 // | 5 // |
9 // Software distributed under the License is distributed on an "AS | 6 // Permission to use, copy, modify, and/or distribute this software for any |
10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | 7 // purpose with or without fee is hereby granted, provided that the above |
11 // implied. See the License for the specific language governing | 8 // copyright notice and this permission notice appear in all copies. |
12 // rights and limitations under the License. | 9 // |
| 10 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 11 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 12 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 13 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 14 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 15 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 16 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
13 // | 17 // |
14 // | 18 // |
15 //------------------------------------------------------------------------------ | 19 //------------------------------------------------------------------------------ |
16 //============================================================================== | 20 //============================================================================== |
17 // Author(s): ="Atheros" | 21 // Author(s): ="Atheros" |
18 //============================================================================== | 22 //============================================================================== |
19 | 23 |
20 #ifndef __REGDUMP_H__ | 24 #ifndef __REGDUMP_H__ |
21 #define __REGDUMP_H__ | 25 #define __REGDUMP_H__ |
| 26 |
| 27 #ifndef ATH_TARGET |
| 28 #include "athstartpack.h" |
| 29 #endif |
| 30 |
22 #if defined(AR6001) | 31 #if defined(AR6001) |
23 #include "AR6001/AR6001_regdump.h" | 32 #include "AR6001/AR6001_regdump.h" |
24 #endif | 33 #endif |
25 #if defined(AR6002) | 34 #if defined(AR6002) |
26 #include "AR6002/AR6002_regdump.h" | 35 #include "AR6002/AR6002_regdump.h" |
27 #endif | 36 #endif |
28 | 37 |
29 #if !defined(__ASSEMBLER__) | 38 #if !defined(__ASSEMBLER__) |
30 /* | 39 /* |
31 * Target CPU state at the time of failure is reflected | 40 * Target CPU state at the time of failure is reflected |
32 * in a register dump, which the Host can fetch through | 41 * in a register dump, which the Host can fetch through |
33 * the diagnostic window. | 42 * the diagnostic window. |
34 */ | 43 */ |
35 struct register_dump_s { | 44 PREPACK struct register_dump_s { |
36 A_UINT32 target_id; /* Target ID */ | 45 A_UINT32 target_id; /* Target ID */ |
37 A_UINT32 assline; /* Line number (if assertion failure) */ | 46 A_UINT32 assline; /* Line number (if assertion failure) */ |
38 A_UINT32 pc; /* Program Counter at time of exception */ | 47 A_UINT32 pc; /* Program Counter at time of exception */ |
39 A_UINT32 badvaddr; /* Virtual address causing exception */ | 48 A_UINT32 badvaddr; /* Virtual address causing exception */ |
40 CPU_exception_frame_t exc_frame; /* CPU-specific exception info */ | 49 CPU_exception_frame_t exc_frame; /* CPU-specific exception info */ |
41 | 50 |
42 /* Could copy top of stack here, too.... */ | 51 /* Could copy top of stack here, too.... */ |
43 }; | 52 } POSTPACK; |
44 #endif /* __ASSEMBLER__ */ | 53 #endif /* __ASSEMBLER__ */ |
| 54 |
| 55 #ifndef ATH_TARGET |
| 56 #include "athendpack.h" |
| 57 #endif |
| 58 |
45 #endif /* __REGDUMP_H__ */ | 59 #endif /* __REGDUMP_H__ */ |
OLD | NEW |