]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
43866e37 | 6 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. |
1c79356b | 7 | * |
43866e37 A |
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 | |
1c79356b A |
17 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
18 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
43866e37 A |
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. | |
1c79356b A |
22 | * |
23 | * @APPLE_LICENSE_HEADER_END@ | |
24 | */ | |
25 | /* | |
26 | * @OSF_FREE_COPYRIGHT@ | |
27 | */ | |
28 | /* | |
29 | * @APPLE_FREE_COPYRIGHT@ | |
30 | */ | |
31 | ||
32 | /* | |
33 | * Here are the Diagnostic interface interfaces | |
34 | * Lovingly crafted by Bill Angell using traditional methods | |
35 | */ | |
36 | ||
37 | #ifndef _DIAGNOSTICS_H_ | |
38 | #define _DIAGNOSTICS_H_ | |
39 | ||
40 | #ifndef __ppc__ | |
41 | #error This file is only useful on PowerPC. | |
42 | #endif | |
55e303ae | 43 | #include <ppc/savearea.h> |
1c79356b A |
44 | |
45 | int diagCall(struct savearea *save); | |
46 | ||
47 | #define diagSCnum 0x00006000 | |
48 | ||
49 | #define dgAdjTB 0 | |
50 | #define dgLRA 1 | |
51 | #define dgpcpy 2 | |
52 | #define dgreset 3 | |
53 | #define dgtest 4 | |
0b4e3aa0 A |
54 | #define dgBMphys 5 |
55 | #define dgUnMap 6 | |
56 | #define dgBootScreen 7 | |
9bccf70c A |
57 | #define dgFlush 8 |
58 | #define dgAlign 9 | |
55e303ae A |
59 | #define dgprw 10 |
60 | #define dgmck 11 | |
61 | #define dg64 12 | |
62 | #define dgProbeRead 13 | |
63 | #define dgCPNull 14 | |
64 | #define dgPerfMon 15 | |
65 | #define dgMapPage 16 | |
66 | #define dgScom 17 | |
0b4e3aa0 | 67 | |
1c79356b A |
68 | |
69 | typedef struct diagWork { /* Diagnostic work area */ | |
70 | ||
71 | unsigned int dgLock; /* Lock if needed */ | |
72 | unsigned int dgFlags; /* Flags */ | |
73 | #define enaExpTrace 0x00000001 | |
74 | #define enaExpTraceb 31 | |
75 | #define enaUsrFCall 0x00000002 | |
76 | #define enaUsrFCallb 30 | |
77 | #define enaUsrPhyMp 0x00000004 | |
78 | #define enaUsrPhyMpb 29 | |
79 | #define enaDiagSCs 0x00000008 | |
80 | #define enaDiagSCsb 28 | |
81 | #define enaDiagDM 0x00000010 | |
82 | #define enaDiagSDMb 27 | |
9bccf70c A |
83 | #define enaDiagEM 0x00000020 |
84 | #define enaDiagEMb 26 | |
55e303ae A |
85 | #define enaDiagTrap 0x00000040 |
86 | #define enaDiagTrapb 25 | |
87 | #define enaNotifyEM 0x00000080 | |
88 | #define enaNotifyEMb 24 | |
1c79356b A |
89 | /* Suppress lock checks */ |
90 | #define disLkType 0x80000000 | |
91 | #define disLktypeb 0 | |
92 | #define disLkThread 0x40000000 | |
93 | #define disLkThreadb 1 | |
94 | #define disLkNmSimp 0x20000000 | |
95 | #define disLkNmSimpb 2 | |
96 | #define disLkMyLck 0x10000000 | |
97 | #define disLkMyLckb 3 | |
98 | ||
99 | unsigned int dgMisc0; | |
100 | unsigned int dgMisc1; | |
101 | unsigned int dgMisc2; | |
102 | unsigned int dgMisc3; | |
103 | unsigned int dgMisc4; | |
104 | unsigned int dgMisc5; | |
105 | ||
106 | } diagWork; | |
107 | ||
55e303ae A |
108 | typedef struct scomcomm { |
109 | uint16_t scomcpu; /* CPU number */ | |
110 | uint16_t scomfunc; /* 0 = read; 1 = write */ | |
111 | uint32_t scomreg; /* SCOM register */ | |
112 | uint64_t scomstat; /* returned status */ | |
113 | uint64_t scomdata; /* input for write, output for read */ | |
114 | } scomcomm; | |
115 | ||
1c79356b | 116 | extern diagWork dgWork; |
55e303ae | 117 | extern int diagTrap(struct savearea *, unsigned int); |
1c79356b A |
118 | |
119 | ||
120 | #endif /* _DIAGNOSTICS_H_ */ |