]> git.saurik.com Git - apple/xnu.git/blob - osfmk/kdp/kdp_internal.h
eedbcd1f072cb090c0493db7e8dc9111e42a1b40
[apple/xnu.git] / osfmk / kdp / kdp_internal.h
1 /*
2 * Copyright (c) 2000 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 * Copyright (c) 1993 NeXT Computer, Inc. All rights reserved.
24 *
25 * kdp_internal.h -- internal definitions for kdp module
26 *
27 */
28
29 #include <kdp/kdp.h>
30 #include <kdp/kdp_protocol.h>
31
32 typedef struct {
33 unsigned short reply_port;
34 unsigned int conn_seq;
35 boolean_t is_conn;
36 void *saved_state;
37 boolean_t is_halted;
38 unsigned short exception_port;
39 unsigned char exception_seq;
40 boolean_t exception_ack_needed;
41 } kdp_glob_t;
42
43 extern kdp_glob_t kdp;
44 extern int kdp_flag;
45
46 typedef boolean_t
47 (*kdp_dispatch_t) (
48 kdp_pkt_t *,
49 int *,
50 unsigned short *
51 );
52
53 boolean_t
54 kdp_packet(
55 unsigned char *,
56 int *,
57 unsigned short *
58 );
59
60 void
61 kdp_exception(
62 unsigned char *,
63 int *,
64 unsigned short *,
65 unsigned int,
66 unsigned int,
67 unsigned int
68 );
69
70 boolean_t
71 kdp_exception_ack(
72 unsigned char *,
73 int
74 );
75
76 void
77 kdp_panic(
78 const char *msg
79 );
80
81 void
82 kdp_reset(
83 void
84 );
85
86 void
87 kdp_reboot(
88 void
89 );
90
91 void
92 kdp_us_spin(
93 int usec
94 );
95
96 int
97 kdp_intr_disbl(
98 void
99 );
100
101 void
102 kdp_intr_enbl(
103 int s
104 );
105
106 kdp_error_t
107 kdp_machine_read_regs(
108 unsigned int cpu,
109 unsigned int flavor,
110 char *data,
111 int *size
112 );
113
114 kdp_error_t
115 kdp_machine_write_regs(
116 unsigned int cpu,
117 unsigned int flavor,
118 char *data,
119 int *size
120 );
121
122 void
123 kdp_machine_hostinfo(
124 kdp_hostinfo_t *hostinfo
125 );
126
127 void
128 kdp_sync_cache(
129 void
130 );
131
132