]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
91447636 | 2 | * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. |
1c79356b A |
3 | * |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
37839358 A |
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. | |
1c79356b | 11 | * |
37839358 A |
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 | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
37839358 A |
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. | |
1c79356b A |
19 | * |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
9bccf70c | 22 | |
1c79356b | 23 | /* |
9bccf70c | 24 | * Internal definitions for kdp module |
1c79356b A |
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; | |
9bccf70c | 42 | |
c0fea474 A |
43 | extern volatile int kdp_flag; |
44 | ||
9bccf70c A |
45 | #define KDP_READY 0x1 |
46 | #define KDP_ARP 0x2 | |
47 | #define KDP_BP_DIS 0x4 | |
55e303ae A |
48 | #define KDP_GETC_ENA 0x8 |
49 | #define KDP_PANIC_DUMP_ENABLED 0x10 | |
50 | #define PANIC_CORE_ON_NMI 0x20 | |
51 | #define DBG_POST_CORE 0x40 | |
52 | #define PANIC_LOG_DUMP 0x80 | |
1c79356b A |
53 | typedef boolean_t |
54 | (*kdp_dispatch_t) ( | |
55 | kdp_pkt_t *, | |
56 | int *, | |
57 | unsigned short * | |
58 | ); | |
59 | ||
91447636 | 60 | extern |
1c79356b A |
61 | boolean_t |
62 | kdp_packet( | |
63 | unsigned char *, | |
64 | int *, | |
65 | unsigned short * | |
66 | ); | |
67 | ||
91447636 | 68 | extern |
9bccf70c | 69 | boolean_t |
91447636 | 70 | kdp_remove_all_breakpoints (void); |
9bccf70c | 71 | |
91447636 | 72 | extern |
1c79356b A |
73 | void |
74 | kdp_exception( | |
75 | unsigned char *, | |
76 | int *, | |
77 | unsigned short *, | |
78 | unsigned int, | |
79 | unsigned int, | |
80 | unsigned int | |
81 | ); | |
82 | ||
91447636 | 83 | extern |
1c79356b A |
84 | boolean_t |
85 | kdp_exception_ack( | |
86 | unsigned char *, | |
87 | int | |
88 | ); | |
89 | ||
91447636 | 90 | extern |
1c79356b A |
91 | void |
92 | kdp_panic( | |
93 | const char *msg | |
94 | ); | |
95 | ||
91447636 | 96 | extern |
1c79356b A |
97 | void |
98 | kdp_reboot( | |
99 | void | |
100 | ); | |
101 | ||
91447636 | 102 | extern |
1c79356b A |
103 | void |
104 | kdp_us_spin( | |
105 | int usec | |
106 | ); | |
107 | ||
91447636 | 108 | extern |
1c79356b A |
109 | int |
110 | kdp_intr_disbl( | |
111 | void | |
112 | ); | |
113 | ||
91447636 | 114 | extern |
1c79356b A |
115 | void |
116 | kdp_intr_enbl( | |
117 | int s | |
118 | ); | |
119 | ||
91447636 | 120 | extern |
1c79356b A |
121 | kdp_error_t |
122 | kdp_machine_read_regs( | |
123 | unsigned int cpu, | |
124 | unsigned int flavor, | |
125 | char *data, | |
126 | int *size | |
127 | ); | |
128 | ||
91447636 | 129 | extern |
1c79356b A |
130 | kdp_error_t |
131 | kdp_machine_write_regs( | |
132 | unsigned int cpu, | |
133 | unsigned int flavor, | |
134 | char *data, | |
135 | int *size | |
136 | ); | |
137 | ||
91447636 | 138 | extern |
1c79356b A |
139 | void |
140 | kdp_machine_hostinfo( | |
141 | kdp_hostinfo_t *hostinfo | |
142 | ); | |
143 | ||
91447636 | 144 | extern |
1c79356b A |
145 | void |
146 | kdp_sync_cache( | |
147 | void | |
148 | ); | |
149 | ||
91447636 A |
150 | unsigned int |
151 | kdp_ml_get_breakinsn( | |
152 | void | |
153 | ); |