]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/low_trace.h
xnu-1228.3.13.tar.gz
[apple/xnu.git] / osfmk / ppc / low_trace.h
index 3f7515a2ad9c4ea18adb763874b06fa03debc421..e5a81d7a963ebfff5ba070a69b7eddfb8d872212 100644 (file)
@@ -1,23 +1,29 @@
 /*
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
 /*
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
- * @APPLE_LICENSE_HEADER_START@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
  * 
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License").  You may not use this file except in compliance with the
- * License.  Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
  * 
  * 
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
  * 
  * 
- * @APPLE_LICENSE_HEADER_END@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  */
 /*
  * @OSF_COPYRIGHT@
  */
 /*
  * @OSF_COPYRIGHT@
@@ -36,6 +42,7 @@
 #ifndef _LOW_TRACE_H_
 #define _LOW_TRACE_H_
 
 #ifndef _LOW_TRACE_H_
 #define _LOW_TRACE_H_
 
+#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct LowTraceRecord {
 
        unsigned short  LTR_cpu;                        /* 0000 - CPU address */
 typedef struct LowTraceRecord {
 
        unsigned short  LTR_cpu;                        /* 0000 - CPU address */
@@ -43,33 +50,43 @@ typedef struct LowTraceRecord {
        unsigned int    LTR_timeHi;                     /* 0004 - High order time */
        unsigned int    LTR_timeLo;                     /* 0008 - Low order time */
        unsigned int    LTR_cr;                         /* 000C - CR */
        unsigned int    LTR_timeHi;                     /* 0004 - High order time */
        unsigned int    LTR_timeLo;                     /* 0008 - Low order time */
        unsigned int    LTR_cr;                         /* 000C - CR */
-       unsigned int    LTR_srr0;                       /* 0010 - SRR0 */
-       unsigned int    LTR_srr1;                       /* 0014 - SRR1 */
-       unsigned int    LTR_dar;                        /* 0018 - DAR */
-       unsigned int    LTR_save;                       /* 001C - savearea */
-       
-       unsigned int    LTR_lr;                         /* 0020 - LR */
-       unsigned int    LTR_ctr;                        /* 0024 - CTR */
-       unsigned int    LTR_r0;                         /* 0028 - R0 */
-       unsigned int    LTR_r1;                         /* 002C - R1 */
-       unsigned int    LTR_r2;                         /* 0030 - R2 */
-       unsigned int    LTR_r3;                         /* 0034 - R3 */
-       unsigned int    LTR_r4;                         /* 0038 - R4 */
-       unsigned int    LTR_r5;                         /* 003C - R5 */
+       unsigned int    LTR_dsisr;                      /* 0010 - DSISR */
+       unsigned int    LTR_rsvd0;                      /* 0014 - reserved */
+       uint64_t                LTR_srr0;                       /* 0018 - SRR0 */
+
+       uint64_t                LTR_srr1;                       /* 0020 - SRR1 */
+       uint64_t                LTR_dar;                        /* 0028 - DAR */
+       uint64_t                LTR_save;                       /* 0030 - savearea */
+       uint64_t                LTR_lr;                         /* 0038 - LR */
+
+       uint64_t                LTR_ctr;                        /* 0040 - CTR */
+       uint64_t                LTR_r0;                         /* 0048 - R0 */
+       uint64_t                LTR_r1;                         /* 0050 - R1 */
+       uint64_t                LTR_r2;                         /* 0058 - R2 */
+
+       uint64_t                LTR_r3;                         /* 0060 - R3 */
+       uint64_t                LTR_r4;                         /* 0068 - R4 */
+       uint64_t                LTR_r5;                         /* 0070 - R5 */
+       uint64_t                LTR_r6;                         /* 0078 - R6 */
 
 } LowTraceRecord;              
 
 } LowTraceRecord;              
+#pragma pack()
 
 
+#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct traceWork {
 
 typedef struct traceWork {
 
-       unsigned int traceMask;                         /* Types to be traced */
        unsigned int traceCurr;                         /* Address of next slot */
        unsigned int traceCurr;                         /* Address of next slot */
+       unsigned int traceMask;                         /* Types to be traced */
        unsigned int traceStart;                        /* Start of trace table */
        unsigned int traceEnd;                          /* End of trace table */
        unsigned int traceMsnd;                         /* Saved trace mask */
        unsigned int traceStart;                        /* Start of trace table */
        unsigned int traceEnd;                          /* End of trace table */
        unsigned int traceMsnd;                         /* Saved trace mask */
-       unsigned int traceGas[3];
+       unsigned int traceSize;                         /* Size of trace table. Min 1 page */
+       unsigned int traceGas[2];
 } traceWork;
 } traceWork;
+#pragma pack()
 
 extern traceWork trcWork;
 
 extern traceWork trcWork;
+extern unsigned int lastTrace;                 /* Value of low-level exception trace controls */
 
 
 #endif /* ifndef _LOW_TRACE_H_ */
 
 
 #endif /* ifndef _LOW_TRACE_H_ */