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