]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/low_trace.h
db5d30635acde6942373ee5b9d3f078ab90ea1f5
[apple/xnu.git] / osfmk / ppc / low_trace.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * @OSF_COPYRIGHT@
25 */
26
27 /*
28 *
29 * These are the structures and constants used for the low-level trace
30 */
31
32
33
34
35
36
37 #ifndef _LOW_TRACE_H_
38 #define _LOW_TRACE_H_
39
40 #pragma pack(4) /* Make sure the structure stays as we defined it */
41 typedef struct LowTraceRecord {
42
43 unsigned short LTR_cpu; /* 0000 - CPU address */
44 unsigned short LTR_excpt; /* 0002 - Exception code */
45 unsigned int LTR_timeHi; /* 0004 - High order time */
46 unsigned int LTR_timeLo; /* 0008 - Low order time */
47 unsigned int LTR_cr; /* 000C - CR */
48 unsigned int LTR_dsisr; /* 0010 - DSISR */
49 unsigned int LTR_rsvd0; /* 0014 - reserved */
50 uint64_t LTR_srr0; /* 0018 - SRR0 */
51
52 uint64_t LTR_srr1; /* 0020 - SRR1 */
53 uint64_t LTR_dar; /* 0028 - DAR */
54 uint64_t LTR_save; /* 0030 - savearea */
55 uint64_t LTR_lr; /* 0038 - LR */
56
57 uint64_t LTR_ctr; /* 0040 - CTR */
58 uint64_t LTR_r0; /* 0048 - R0 */
59 uint64_t LTR_r1; /* 0050 - R1 */
60 uint64_t LTR_r2; /* 0058 - R2 */
61
62 uint64_t LTR_r3; /* 0060 - R3 */
63 uint64_t LTR_r4; /* 0068 - R4 */
64 uint64_t LTR_r5; /* 0070 - R5 */
65 uint64_t LTR_r6; /* 0078 - R6 */
66
67 } LowTraceRecord;
68 #pragma pack()
69
70 #pragma pack(4) /* Make sure the structure stays as we defined it */
71 typedef struct traceWork {
72
73 unsigned int traceCurr; /* Address of next slot */
74 unsigned int traceMask; /* Types to be traced */
75 unsigned int traceStart; /* Start of trace table */
76 unsigned int traceEnd; /* End of trace table */
77 unsigned int traceMsnd; /* Saved trace mask */
78 unsigned int traceSize; /* Size of trace table. Min 1 page */
79 unsigned int traceGas[2];
80 } traceWork;
81 #pragma pack()
82
83 extern traceWork trcWork;
84 extern unsigned int lastTrace; /* Value of low-level exception trace controls */
85
86
87 #endif /* ifndef _LOW_TRACE_H_ */