]> git.saurik.com Git - apple/xnu.git/blame - osfmk/kdp/kdp_internal.h
xnu-124.13.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 *
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
32typedef 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
43extern kdp_glob_t kdp;
44extern int kdp_flag;
45
46typedef boolean_t
47(*kdp_dispatch_t) (
48 kdp_pkt_t *,
49 int *,
50 unsigned short *
51);
52
53boolean_t
54kdp_packet(
55 unsigned char *,
56 int *,
57 unsigned short *
58);
59
60void
61kdp_exception(
62 unsigned char *,
63 int *,
64 unsigned short *,
65 unsigned int,
66 unsigned int,
67 unsigned int
68);
69
70boolean_t
71kdp_exception_ack(
72 unsigned char *,
73 int
74);
75
76void
77kdp_panic(
78 const char *msg
79);
80
81void
82kdp_reset(
83 void
84);
85
86void
87kdp_reboot(
88 void
89);
90
91void
92kdp_us_spin(
93 int usec
94);
95
96int
97kdp_intr_disbl(
98 void
99);
100
101void
102kdp_intr_enbl(
103 int s
104);
105
106kdp_error_t
107kdp_machine_read_regs(
108 unsigned int cpu,
109 unsigned int flavor,
110 char *data,
111 int *size
112);
113
114kdp_error_t
115kdp_machine_write_regs(
116 unsigned int cpu,
117 unsigned int flavor,
118 char *data,
119 int *size
120);
121
122void
123kdp_machine_hostinfo(
124 kdp_hostinfo_t *hostinfo
125);
126
127void
128kdp_sync_cache(
129 void
130);
131
132