]> git.saurik.com Git - apple/xnu.git/blame - osfmk/kdp/kdp_internal.h
xnu-344.21.73.tar.gz
[apple/xnu.git] / osfmk / kdp / kdp_internal.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
d7e50217 6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
1c79356b 7 *
d7e50217
A
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
13 * file.
14 *
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
1c79356b
A
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
d7e50217
A
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.
1c79356b
A
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
9bccf70c 25
1c79356b 26/*
9bccf70c 27 * Internal definitions for kdp module
1c79356b
A
28 */
29
30#include <kdp/kdp.h>
31#include <kdp/kdp_protocol.h>
32
33typedef struct {
34 unsigned short reply_port;
35 unsigned int conn_seq;
36 boolean_t is_conn;
37 void *saved_state;
38 boolean_t is_halted;
39 unsigned short exception_port;
40 unsigned char exception_seq;
41 boolean_t exception_ack_needed;
42} kdp_glob_t;
43
44extern kdp_glob_t kdp;
9bccf70c 45
1c79356b 46extern int kdp_flag;
9bccf70c
A
47#define KDP_READY 0x1
48#define KDP_ARP 0x2
49#define KDP_BP_DIS 0x4
50
1c79356b
A
51
52typedef boolean_t
53(*kdp_dispatch_t) (
54 kdp_pkt_t *,
55 int *,
56 unsigned short *
57);
58
59boolean_t
60kdp_packet(
61 unsigned char *,
62 int *,
63 unsigned short *
64);
65
9bccf70c
A
66boolean_t
67kdp_remove_all_breakpoints ();
68
1c79356b
A
69void
70kdp_exception(
71 unsigned char *,
72 int *,
73 unsigned short *,
74 unsigned int,
75 unsigned int,
76 unsigned int
77);
78
79boolean_t
80kdp_exception_ack(
81 unsigned char *,
82 int
83);
84
85void
86kdp_panic(
87 const char *msg
88);
89
90void
91kdp_reset(
92 void
93);
94
95void
96kdp_reboot(
97 void
98);
99
100void
101kdp_us_spin(
102 int usec
103);
104
105int
106kdp_intr_disbl(
107 void
108);
109
110void
111kdp_intr_enbl(
112 int s
113);
114
115kdp_error_t
116kdp_machine_read_regs(
117 unsigned int cpu,
118 unsigned int flavor,
119 char *data,
120 int *size
121);
122
123kdp_error_t
124kdp_machine_write_regs(
125 unsigned int cpu,
126 unsigned int flavor,
127 char *data,
128 int *size
129);
130
131void
132kdp_machine_hostinfo(
133 kdp_hostinfo_t *hostinfo
134);
135
136void
137kdp_sync_cache(
138 void
139);
140