]>
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 * 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
32 * Keep selectors in sync with the x86 version where possible.
36 #ifndef _DIAGNOSTICS_H_
37 #define _DIAGNOSTICS_H_
40 #error This file is only useful on PowerPC.
42 #include <ppc/savearea.h>
44 int diagCall(struct savearea
*save
);
46 #define diagSCnum 0x00006000
55 #define dgBootScreen 7
61 #define dgProbeRead 13
74 typedef struct diagWork
{ /* Diagnostic work area */
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
88 #define enaDiagEM 0x00000020
90 #define enaDiagTrap 0x00000040
91 #define enaDiagTrapb 25
92 #define enaNotifyEM 0x00000080
93 #define enaNotifyEMb 24
100 unsigned int dgMisc5
;
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 */
112 extern diagWork dgWork
;
113 extern int diagTrap(struct savearea
*, unsigned int);
116 #endif /* _DIAGNOSTICS_H_ */
118 #endif /* KERNEL_PRIVATE */