]> git.saurik.com Git - apple/xnu.git/blame - osfmk/i386/Diagnostics.h
xnu-792.25.20.tar.gz
[apple/xnu.git] / osfmk / i386 / Diagnostics.h
CommitLineData
0c530ab8
A
1/*
2 * Copyright (c) 2005 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 * Keep selectors in sync with the PPC version where possible.
33 */
34#ifdef KERNEL_PRIVATE
35
36#ifndef _DIAGNOSTICS_H_
37#define _DIAGNOSTICS_H_
38
39#ifdef __ppc__
40#error This file is not useful on PowerPC.
41#endif
42
43int diagCall(x86_saved_state_t *regs);
44int diagCall64(x86_saved_state_t *regs);
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
53#define dgBMphys 5
54#define dgUnMap 6
55#define dgBootScreen 7
56#define dgFlush 8
57#define dgAlign 9
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
66#define dgBind 18
67#define dgPproc 19
68#define dgAcntg 20
69#define dgKlra 21
70#define dgKfree 22
71#define dgWar 23
72#define dgNapStat 24
73#define dgRuptStat 25
74
75
76typedef struct diagWork { /* Diagnostic work area */
77
78 unsigned int dgLock; /* Lock if needed */
79 unsigned int dgFlags; /* Flags */
80#define enaExpTrace 0x00000001
81#define enaExpTraceb 31
82#define enaUsrFCall 0x00000002
83#define enaUsrFCallb 30
84#define enaUsrPhyMp 0x00000004
85#define enaUsrPhyMpb 29
86#define enaDiagSCs 0x00000008
87#define enaDiagSCsb 28
88#define enaDiagDM 0x00000010
89#define enaDiagSDMb 27
90#define enaDiagEM 0x00000020
91#define enaDiagEMb 26
92#define enaDiagTrap 0x00000040
93#define enaDiagTrapb 25
94#define enaNotifyEM 0x00000080
95#define enaNotifyEMb 24
96
97 unsigned int dgMisc0;
98 unsigned int dgMisc1;
99 unsigned int dgMisc2;
100 unsigned int dgMisc3;
101 unsigned int dgMisc4;
102 unsigned int dgMisc5;
103
104} diagWork;
105
106extern diagWork dgWork;
107
108
109#endif /* _DIAGNOSTICS_H_ */
110
111#endif /* KERNEL_PRIVATE */