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 #ifdef KERNEL_PRIVATE
34
35 #ifndef _DIAGNOSTICS_H_
36 #define _DIAGNOSTICS_H_
37
38 #ifndef __ppc__
39 #error This file is only useful on PowerPC.
40 #endif
41 #include <ppc/savearea.h>
42
43 int diagCall(struct savearea *save);
44
45 #define diagSCnum 0x00006000
46
47 #define dgAdjTB 0
48 #define dgLRA 1
49 #define dgpcpy 2
50 #define dgreset 3
51 #define dgtest 4
52 #define dgBMphys 5
53 #define dgUnMap 6
54 #define dgBootScreen 7
55 #define dgFlush 8
56 #define dgAlign 9
57 #define dgprw 10
58 #define dgmck 11
59 #define dg64 12
60 #define dgProbeRead 13
61 #define dgCPNull 14
62 #define dgPerfMon 15
63 #define dgMapPage 16
64 #define dgScom 17
65 #define dgBind 18
66 #define dgPproc 19
67 #define dgAcntg 20
68 #define dgKlra 21
69 #define dgKfree 22
70 #define dgWar 23
71
72
73 typedef struct diagWork { /* Diagnostic work area */
74
75 unsigned int dgLock; /* Lock if needed */
76 unsigned int dgFlags; /* Flags */
77 #define enaExpTrace 0x00000001
78 #define enaExpTraceb 31
79 #define enaUsrFCall 0x00000002
80 #define enaUsrFCallb 30
81 #define enaUsrPhyMp 0x00000004
82 #define enaUsrPhyMpb 29
83 #define enaDiagSCs 0x00000008
84 #define enaDiagSCsb 28
85 #define enaDiagDM 0x00000010
86 #define enaDiagSDMb 27
87 #define enaDiagEM 0x00000020
88 #define enaDiagEMb 26
89 #define enaDiagTrap 0x00000040
90 #define enaDiagTrapb 25
91 #define enaNotifyEM 0x00000080
92 #define enaNotifyEMb 24
93
94 unsigned int dgMisc0;
95 unsigned int dgMisc1;
96 unsigned int dgMisc2;
97 unsigned int dgMisc3;
98 unsigned int dgMisc4;
99 unsigned int dgMisc5;
100
101 } diagWork;
102
103 typedef struct scomcomm {
104 uint16_t scomcpu; /* CPU number */
105 uint16_t scomfunc; /* 0 = read; 1 = write */
106 uint32_t scomreg; /* SCOM register */
107 uint64_t scomstat; /* returned status */
108 uint64_t scomdata; /* input for write, output for read */
109 } scomcomm;
110
111 extern diagWork dgWork;
112 extern int diagTrap(struct savearea *, unsigned int);
113
114
115 #endif /* _DIAGNOSTICS_H_ */
116
117 #endif /* KERNEL_PRIVATE */
Cache object: 917004c745d4b68fd029cacb616cce8b
|