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