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