]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
37839358 A |
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. | |
1c79356b | 11 | * |
37839358 A |
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 | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
37839358 A |
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. | |
1c79356b A |
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 | */ | |
91447636 | 33 | #ifdef KERNEL_PRIVATE |
1c79356b A |
34 | |
35 | #ifndef _DIAGNOSTICS_H_ | |
36 | #define _DIAGNOSTICS_H_ | |
37 | ||
38 | #ifndef __ppc__ | |
39 | #error This file is only useful on PowerPC. | |
40 | #endif | |
55e303ae | 41 | #include <ppc/savearea.h> |
1c79356b A |
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 | |
0b4e3aa0 A |
52 | #define dgBMphys 5 |
53 | #define dgUnMap 6 | |
54 | #define dgBootScreen 7 | |
9bccf70c A |
55 | #define dgFlush 8 |
56 | #define dgAlign 9 | |
55e303ae A |
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 | |
91447636 A |
65 | #define dgBind 18 |
66 | #define dgPproc 19 | |
67 | #define dgAcntg 20 | |
68 | #define dgKlra 21 | |
69 | #define dgKfree 22 | |
70 | #define dgWar 23 | |
0b4e3aa0 | 71 | |
1c79356b A |
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 | |
9bccf70c A |
87 | #define enaDiagEM 0x00000020 |
88 | #define enaDiagEMb 26 | |
55e303ae A |
89 | #define enaDiagTrap 0x00000040 |
90 | #define enaDiagTrapb 25 | |
91 | #define enaNotifyEM 0x00000080 | |
92 | #define enaNotifyEMb 24 | |
1c79356b A |
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 | ||
55e303ae A |
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 | ||
1c79356b | 111 | extern diagWork dgWork; |
55e303ae | 112 | extern int diagTrap(struct savearea *, unsigned int); |
1c79356b A |
113 | |
114 | ||
115 | #endif /* _DIAGNOSTICS_H_ */ | |
91447636 A |
116 | |
117 | #endif /* KERNEL_PRIVATE */ |