]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/Diagnostics.h
7983b9bb2e5a624bc95e11b0580f71a921c22062
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
23 * @OSF_FREE_COPYRIGHT@
26 * @APPLE_FREE_COPYRIGHT@
30 * Here are the Diagnostic interface interfaces
31 * Lovingly crafted by Bill Angell using traditional methods
35 #ifndef _DIAGNOSTICS_H_
36 #define _DIAGNOSTICS_H_
39 #error This file is only useful on PowerPC.
41 #include <ppc/savearea.h>
43 int diagCall(struct savearea
*save
);
45 #define diagSCnum 0x00006000
54 #define dgBootScreen 7
60 #define dgProbeRead 13
73 typedef struct diagWork
{ /* Diagnostic work area */
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
89 #define enaDiagTrap 0x00000040
90 #define enaDiagTrapb 25
91 #define enaNotifyEM 0x00000080
92 #define enaNotifyEMb 24
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 */
111 extern diagWork dgWork
;
112 extern int diagTrap(struct savearea
*, unsigned int);
115 #endif /* _DIAGNOSTICS_H_ */
117 #endif /* KERNEL_PRIVATE */