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