]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/Diagnostics.h
c06672f838fcbd0e03cd4e50ff8f8b785c5746ce
[apple/xnu.git] / osfmk / ppc / Diagnostics.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /*
23 * @OSF_FREE_COPYRIGHT@
24 */
25 /*
26 * @APPLE_FREE_COPYRIGHT@
27 */
28
29 /*
30 * Here are the Diagnostic interface interfaces
31 * Lovingly crafted by Bill Angell using traditional methods
32 */
33
34 #ifndef _DIAGNOSTICS_H_
35 #define _DIAGNOSTICS_H_
36
37 #ifndef __ppc__
38 #error This file is only useful on PowerPC.
39 #endif
40
41 int diagCall(struct savearea *save);
42
43 #define diagSCnum 0x00006000
44
45 #define dgAdjTB 0
46 #define dgLRA 1
47 #define dgpcpy 2
48 #define dgreset 3
49 #define dgtest 4
50
51 typedef struct diagWork { /* Diagnostic work area */
52
53 unsigned int dgLock; /* Lock if needed */
54 unsigned int dgFlags; /* Flags */
55 #define enaExpTrace 0x00000001
56 #define enaExpTraceb 31
57 #define enaUsrFCall 0x00000002
58 #define enaUsrFCallb 30
59 #define enaUsrPhyMp 0x00000004
60 #define enaUsrPhyMpb 29
61 #define enaDiagSCs 0x00000008
62 #define enaDiagSCsb 28
63 #define enaDiagDM 0x00000010
64 #define enaDiagSDMb 27
65 /* Suppress lock checks */
66 #define disLkType 0x80000000
67 #define disLktypeb 0
68 #define disLkThread 0x40000000
69 #define disLkThreadb 1
70 #define disLkNmSimp 0x20000000
71 #define disLkNmSimpb 2
72 #define disLkMyLck 0x10000000
73 #define disLkMyLckb 3
74
75 unsigned int dgMisc0;
76 unsigned int dgMisc1;
77 unsigned int dgMisc2;
78 unsigned int dgMisc3;
79 unsigned int dgMisc4;
80 unsigned int dgMisc5;
81
82 } diagWork;
83
84 extern diagWork dgWork;
85
86
87 #endif /* _DIAGNOSTICS_H_ */