]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
e5568f75 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 | * |
e5568f75 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, | |
e5568f75 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 | |
1c79356b | 43 | extern int kdp_flag; |
9bccf70c A |
44 | #define KDP_READY 0x1 |
45 | #define KDP_ARP 0x2 | |
46 | #define KDP_BP_DIS 0x4 | |
55e303ae A |
47 | #define KDP_GETC_ENA 0x8 |
48 | #define KDP_PANIC_DUMP_ENABLED 0x10 | |
49 | #define PANIC_CORE_ON_NMI 0x20 | |
50 | #define DBG_POST_CORE 0x40 | |
51 | #define PANIC_LOG_DUMP 0x80 | |
1c79356b A |
52 | typedef boolean_t |
53 | (*kdp_dispatch_t) ( | |
54 | kdp_pkt_t *, | |
55 | int *, | |
56 | unsigned short * | |
57 | ); | |
58 | ||
59 | boolean_t | |
60 | kdp_packet( | |
61 | unsigned char *, | |
62 | int *, | |
63 | unsigned short * | |
64 | ); | |
65 | ||
9bccf70c A |
66 | boolean_t |
67 | kdp_remove_all_breakpoints (); | |
68 | ||
1c79356b A |
69 | void |
70 | kdp_exception( | |
71 | unsigned char *, | |
72 | int *, | |
73 | unsigned short *, | |
74 | unsigned int, | |
75 | unsigned int, | |
76 | unsigned int | |
77 | ); | |
78 | ||
79 | boolean_t | |
80 | kdp_exception_ack( | |
81 | unsigned char *, | |
82 | int | |
83 | ); | |
84 | ||
85 | void | |
86 | kdp_panic( | |
87 | const char *msg | |
88 | ); | |
89 | ||
90 | void | |
91 | kdp_reset( | |
92 | void | |
93 | ); | |
94 | ||
95 | void | |
96 | kdp_reboot( | |
97 | void | |
98 | ); | |
99 | ||
100 | void | |
101 | kdp_us_spin( | |
102 | int usec | |
103 | ); | |
104 | ||
105 | int | |
106 | kdp_intr_disbl( | |
107 | void | |
108 | ); | |
109 | ||
110 | void | |
111 | kdp_intr_enbl( | |
112 | int s | |
113 | ); | |
114 | ||
115 | kdp_error_t | |
116 | kdp_machine_read_regs( | |
117 | unsigned int cpu, | |
118 | unsigned int flavor, | |
119 | char *data, | |
120 | int *size | |
121 | ); | |
122 | ||
123 | kdp_error_t | |
124 | kdp_machine_write_regs( | |
125 | unsigned int cpu, | |
126 | unsigned int flavor, | |
127 | char *data, | |
128 | int *size | |
129 | ); | |
130 | ||
131 | void | |
132 | kdp_machine_hostinfo( | |
133 | kdp_hostinfo_t *hostinfo | |
134 | ); | |
135 | ||
136 | void | |
137 | kdp_sync_cache( | |
138 | void | |
139 | ); | |
140 |