]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/Diagnostics.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
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
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
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
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.
23 * @APPLE_LICENSE_HEADER_END@
26 * @OSF_FREE_COPYRIGHT@
29 * @APPLE_FREE_COPYRIGHT@
33 * Here are the Diagnostic interface interfaces
34 * Lovingly crafted by Bill Angell using traditional methods
37 #ifndef _DIAGNOSTICS_H_
38 #define _DIAGNOSTICS_H_
41 #error This file is only useful on PowerPC.
44 int diagCall(struct savearea
*save
);
46 #define diagSCnum 0x00006000
55 #define dgBootScreen 7
61 #define dgProbeRead 13
68 typedef struct diagWork
{ /* Diagnostic work area */
70 unsigned int dgLock
; /* Lock if needed */
71 unsigned int dgFlags
; /* Flags */
72 #define enaExpTrace 0x00000001
73 #define enaExpTraceb 31
74 #define enaUsrFCall 0x00000002
75 #define enaUsrFCallb 30
76 #define enaUsrPhyMp 0x00000004
77 #define enaUsrPhyMpb 29
78 #define enaDiagSCs 0x00000008
79 #define enaDiagSCsb 28
80 #define enaDiagDM 0x00000010
81 #define enaDiagSDMb 27
82 #define enaDiagEM 0x00000020
84 #define enaDiagTrap 0x00000040
85 #define enaDiagTrapb 25
86 #define enaNotifyEM 0x00000080
87 #define enaNotifyEMb 24
88 /* Suppress lock checks */
89 #define disLkType 0x80000000
91 #define disLkThread 0x40000000
92 #define disLkThreadb 1
93 #define disLkNmSimp 0x20000000
94 #define disLkNmSimpb 2
95 #define disLkMyLck 0x10000000
100 unsigned int dgMisc2
;
101 unsigned int dgMisc3
;
102 unsigned int dgMisc4
;
103 unsigned int dgMisc5
;
107 typedef struct scomcomm
{
108 uint16_t scomcpu
; /* CPU number */
109 uint16_t scomfunc
; /* 0 = read; 1 = write */
110 uint32_t scomreg
; /* SCOM register */
111 uint64_t scomstat
; /* returned status */
112 uint64_t scomdata
; /* input for write, output for read */
115 extern diagWork dgWork
;
116 extern int diagTrap(struct savearea
*, unsigned int);
119 #endif /* _DIAGNOSTICS_H_ */