Commit | Line | Data |
---|---|---|
93fac324 MM |
1 | /* This file is part of the program psim. |
2 | ||
eada1efc | 3 | Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au> |
93fac324 MM |
4 | |
5 | This program is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 2 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
16 | along with this program; if not, write to the Free Software | |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
18 | ||
19 | */ | |
20 | ||
21 | ||
22 | #ifndef _EMUL_BUGAPI_C_ | |
23 | #define _EMUL_BUGAPI_C_ | |
24 | ||
262faa54 MM |
25 | /* Note: this module is called via a table. There is no benefit in |
26 | making it inline */ | |
27 | ||
28 | #include "emul_generic.h" | |
29 | #include "emul_bugapi.h" | |
30 | ||
31 | #ifdef HAVE_UNISTD_H | |
32 | #include <unistd.h> | |
33 | #endif | |
34 | ||
35 | #ifdef HAVE_STDLIB_H | |
36 | #include <stdlib.h> | |
37 | #endif | |
38 | ||
93fac324 | 39 | |
ad836e02 MM |
40 | /* from PowerPCBug Debugging Package User's Manual, part 2 of 2 and also bug.S - Dale Rahn */ |
41 | #define _INCHR 0x000 /* Input character */ | |
42 | #define _INSTAT 0x001 /* Input serial port status */ | |
43 | #define _INLN 0x002 /* Input line (pointer / pointer format) */ | |
44 | #define _READSTR 0x003 /* Input string (pointer / count format) */ | |
45 | #define _READLN 0x004 /* Input line (pointer / count format) */ | |
46 | #define _CHKBRK 0x005 /* Check for break */ | |
47 | #define _DSKRD 0x010 /* Disk read */ | |
48 | #define _DKSWR 0x011 /* Disk write */ | |
49 | #define _DSKCFIG 0x012 /* Disk configure */ | |
50 | #define _DSKFMT 0x014 /* Disk format */ | |
51 | #define _DSKCTRL 0x015 /* Disk control */ | |
52 | #define _NETRD 0x018 /* Read from host */ | |
53 | #define _NETWR 0x019 /* Write to host */ | |
54 | #define _NETCFIG 0x01a /* Configure network parameters */ | |
55 | #define _NETOPN 0x01b /* Open file for reading */ | |
56 | #define _NETFRD 0x01c /* Retreive specified file blocks */ | |
57 | #define _NETCTRL 0x01d /* Implement special control functions */ | |
58 | #define _OUTCHR 0x020 /* Output character (pointer / pointer format) */ | |
59 | #define _OUTSTR 0x021 /* Output string (pointer / pointer format) */ | |
60 | #define _OUTLN 0x022 /* Output line (pointer / pointer format) */ | |
61 | #define _WRITE 0x023 /* Output string (pointer / count format) */ | |
62 | #define _WRITELN 0x024 /* Output line (pointer / count format) */ | |
63 | #define _WRITDLN 0x025 /* Output line with data (pointer / count format) */ | |
64 | #define _PCRLF 0x026 /* Output carriage return and line feed */ | |
65 | #define _ERASLN 0x027 /* Erase line */ | |
66 | #define _WRITD 0x028 /* Output string with data (pointer / count format) */ | |
67 | #define _SNDBRK 0x029 /* Send break */ | |
68 | #define _DELAY 0x043 /* Timer delay */ | |
69 | #define _RTC_TM 0x050 /* Time initialization for RTC */ | |
70 | #define _RTC_DT 0x051 /* Date initialization for RTC */ | |
71 | #define _RTC_DSP 0x052 /* Display RTC time and date */ | |
72 | #define _RTC_RD 0x053 /* Read the RTC registers */ | |
73 | #define _REDIR 0x060 /* Redirect I/O of a system call function */ | |
74 | #define _REDIR_I 0x061 /* Redirect input */ | |
75 | #define _REDIR_O 0x062 /* Redirect output */ | |
76 | #define _RETURN 0x063 /* Return to PPCbug */ | |
77 | #define _BINDEC 0x064 /* Convert binary to binary coded decimal (BCD) */ | |
78 | #define _CHANGEV 0x067 /* Parse value */ | |
79 | #define _STRCMP 0x068 /* Compare two strings (pointer / count format) */ | |
80 | #define _MULU32 0x069 /* Multiply two 32-bit unsigned integers */ | |
81 | #define _DIVU32 0x06a /* Divide two 32-bit unsigned integers */ | |
82 | #define _CHK_SUM 0x06b /* Generate checksum */ | |
83 | #define _BRD_ID 0x070 /* Return pointer to board ID packet */ | |
84 | #define _ENVIRON 0x071 /* Access boot environment parameters */ | |
85 | #define _DIAGFCN 0x074 /* Diagnostic function(s) */ | |
86 | #define _SIOPEPS 0x090 /* Retrieve SCSI pointers */ | |
87 | #define _IOINQ 0x120 /* Port inquire */ | |
88 | #define _IOINFORM 0x124 /* Port inform */ | |
89 | #define _IOCONFIG 0x128 /* Port configure */ | |
90 | #define _IODELETE 0x12c /* Port delete */ | |
91 | #define _SYMBOLTA 0x130 /* Attach symbol table */ | |
92 | #define _SYMBOLDA 0x131 /* Detach symbol table */ | |
93 | ||
94 | struct bug_map { | |
95 | int value; | |
96 | const char *info; | |
97 | }; | |
98 | ||
99 | static const struct bug_map bug_mapping[] = { | |
100 | { _INCHR, ".INCHR -- Input character" }, | |
101 | { _INSTAT, ".INSTAT -- Input serial port status" }, | |
102 | { _INLN, ".INLN -- Input line (pointer / pointer format)" }, | |
103 | { _READSTR, ".READSTR -- Input string (pointer / count format)" }, | |
104 | { _READLN, ".READLN -- Input line (pointer / count format)" }, | |
105 | { _CHKBRK, ".CHKBRK -- Check for break" }, | |
106 | { _DSKRD, ".DSKRD -- Disk read" }, | |
107 | { _DKSWR, ".DKSWR -- Disk write" }, | |
108 | { _DSKCFIG, ".DSKCFIG -- Disk configure" }, | |
109 | { _DSKFMT, ".DSKFMT -- Disk format" }, | |
110 | { _DSKCTRL, ".DSKCTRL -- Disk control" }, | |
111 | { _NETRD, ".NETRD -- Read from host" }, | |
112 | { _NETWR, ".NETWR -- Write to host" }, | |
113 | { _NETCFIG, ".NETCFIG -- Configure network parameters" }, | |
114 | { _NETOPN, ".NETOPN -- Open file for reading" }, | |
115 | { _NETFRD, ".NETFRD -- Retreive specified file blocks" }, | |
116 | { _NETCTRL, ".NETCTRL -- Implement special control functions" }, | |
117 | { _OUTCHR, ".OUTCHR -- Output character" }, | |
118 | { _OUTSTR, ".OUTSTR -- Output string (pointer / pointer format)" }, | |
119 | { _OUTLN, ".OUTLN -- Output line (pointer / pointer format)" }, | |
120 | { _WRITE, ".WRITE -- Output string (pointer / count format)" }, | |
121 | { _WRITELN, ".WRITELN -- Output line (pointer / count format)" }, | |
122 | { _WRITDLN, ".WRITDLN -- Output line with data (pointer / count format)" }, | |
123 | { _PCRLF, ".PCRLF -- Output carriage return and line feed" }, | |
124 | { _ERASLN, ".ERASLN -- Erase line" }, | |
125 | { _WRITD, ".WRITD -- Output string with data (pointer / count format)" }, | |
126 | { _SNDBRK, ".SNDBRK -- Send break" }, | |
127 | { _DELAY, ".DELAY -- Timer delay" }, | |
128 | { _RTC_TM, ".RTC_TM -- Time initialization for RTC" }, | |
129 | { _RTC_DT, ".RTC_DT -- Date initialization for RTC" }, | |
130 | { _RTC_DSP, ".RTC_DSP -- Display RTC time and date" }, | |
131 | { _RTC_RD, ".RTC_RD -- Read the RTC registers" }, | |
132 | { _REDIR, ".REDIR -- Redirect I/O of a system call function" }, | |
133 | { _REDIR, ".REDIR -- Redirect input" }, | |
134 | { _REDIR, ".REDIR -- Redirect output" }, | |
135 | { _RETURN, ".RETURN -- Return to PPCbug" }, | |
136 | { _BINDEC, ".BINDEC -- Convert binary to binary coded decimal (BCD)" }, | |
137 | { _CHANGEV, ".CHANGEV -- Parse value" }, | |
138 | { _STRCMP, ".STRCMP -- Compare two strings (pointer / count format)" }, | |
139 | { _MULU32, ".MULU32 -- Multiply two 32-bit unsigned integers" }, | |
140 | { _DIVU32, ".DIVU32 -- Divide two 32-bit unsigned integers" }, | |
141 | { _CHK_SUM, ".CHK_SUM -- Generate checksum" }, | |
142 | { _BRD_ID, ".BRD_ID -- Return pointer to board ID packet" }, | |
143 | { _ENVIRON, ".ENVIRON -- Access boot environment parameters" }, | |
144 | { _DIAGFCN, ".DIAGFCN -- Diagnostic function(s)" }, | |
145 | { _SIOPEPS, ".SIOPEPS -- Retrieve SCSI pointers" }, | |
146 | { _IOINQ, ".IOINQ -- Port inquire" }, | |
147 | { _IOINFORM, ".IOINFORM -- Port inform" }, | |
148 | { _IOCONFIG, ".IOCONFIG -- Port configure" }, | |
149 | { _IODELETE, ".IODELETE -- Port delete" }, | |
150 | { _SYMBOLTA, ".SYMBOLTA -- Attach symbol table" }, | |
151 | { _SYMBOLDA, ".SYMBOLDA -- Detach symbol table" }, | |
152 | }; | |
979c3c25 | 153 | |
eada1efc MM |
154 | #ifndef OEA_START_ADDRESS |
155 | #define OEA_START_ADDRESS 0x100000 | |
93fac324 MM |
156 | #endif |
157 | ||
979c3c25 | 158 | |
979c3c25 | 159 | |
eada1efc MM |
160 | struct _os_emul_data { |
161 | unsigned_word memory_size; | |
162 | unsigned_word top_of_stack; | |
163 | int interrupt_prefix; | |
164 | unsigned_word interrupt_vector_address; | |
165 | unsigned_word system_call_address; | |
166 | unsigned_word stall_cpu_loop_address; | |
167 | int little_endian; | |
168 | int floating_point_available; | |
d6103e8e MM |
169 | /* I/O devices */ |
170 | device_instance *output; | |
171 | device_instance *input; | |
eada1efc | 172 | }; |
979c3c25 MM |
173 | |
174 | ||
93fac324 MM |
175 | static os_emul_data * |
176 | emul_bugapi_create(device *root, | |
177 | bfd *image, | |
178 | const char *name) | |
179 | { | |
eada1efc MM |
180 | int elf_binary; |
181 | device *node; | |
182 | os_emul_data *bugapi; | |
93fac324 MM |
183 | |
184 | /* check it really is for us */ | |
185 | if (name != NULL | |
979c3c25 MM |
186 | && strcmp(name, "bugapi") != 0 |
187 | && strcmp(name, "bug") != 0) | |
93fac324 MM |
188 | return NULL; |
189 | if (image != NULL | |
979c3c25 | 190 | && name == NULL |
93fac324 MM |
191 | && bfd_get_start_address(image) > OEA_START_ADDRESS) |
192 | return NULL; | |
193 | ||
eada1efc MM |
194 | bugapi = ZALLOC(os_emul_data); |
195 | ||
196 | /* some defaults */ | |
197 | elf_binary = image->xvec->flavour == bfd_target_elf_flavour; | |
198 | ||
199 | /* options */ | |
200 | emul_add_tree_options(root, image, "bug", "oea", | |
201 | 1 /*oea-interrupt-prefix*/); | |
202 | ||
203 | /* add some real hardware */ | |
204 | emul_add_tree_hardware(root); | |
205 | ||
206 | bugapi->memory_size | |
207 | = device_find_integer_property(root, "/openprom/options/oea-memory-size"); | |
208 | bugapi->interrupt_prefix = | |
209 | device_find_integer_property(root, "/openprom/options/oea-interrupt-prefix"); | |
210 | bugapi->interrupt_vector_address = (bugapi->interrupt_prefix | |
211 | ? MASK(0, 43) | |
212 | : 0); | |
213 | bugapi->system_call_address = (bugapi->interrupt_vector_address + 0x00c00); | |
214 | bugapi->stall_cpu_loop_address = (bugapi->system_call_address + 0x000f0); | |
215 | bugapi->top_of_stack = bugapi->memory_size - 0x1000; | |
216 | bugapi->little_endian | |
217 | = device_find_boolean_property(root, "/options/little-endian?"); | |
218 | bugapi->floating_point_available | |
219 | = device_find_boolean_property(root, "/openprom/options/floating-point?"); | |
d6103e8e MM |
220 | bugapi->input |
221 | = device_find_ihandle_property(root, "/chosen/stdin"); | |
222 | bugapi->output | |
223 | = device_find_ihandle_property(root, "/chosen/stdout"); | |
eada1efc MM |
224 | |
225 | /* initialization */ | |
226 | device_tree_add_parsed(root, "/openprom/init/register/0.pc 0x%lx", | |
227 | (unsigned long)bfd_get_start_address(image)); | |
228 | device_tree_add_parsed(root, "/openprom/init/register/pc 0x%lx", | |
229 | (unsigned long)bugapi->stall_cpu_loop_address); | |
230 | device_tree_add_parsed(root, "/openprom/init/register/sp 0x%lx", | |
231 | (unsigned long)(bugapi->top_of_stack - 16)); | |
232 | device_tree_add_parsed(root, "/openprom/init/register/msr 0x%x", | |
233 | (msr_recoverable_interrupt | |
234 | | (bugapi->little_endian | |
235 | ? (msr_little_endian_mode | |
236 | | msr_interrupt_little_endian_mode) | |
237 | : 0) | |
238 | | (bugapi->floating_point_available | |
239 | ? msr_floating_point_available | |
240 | : 0) | |
241 | | (bugapi->interrupt_prefix | |
242 | ? msr_interrupt_prefix | |
243 | : 0) | |
244 | )); | |
245 | ||
246 | /* patch the system call instruction to call this emulation and then | |
247 | do an rfi */ | |
248 | node = device_tree_add_parsed(root, "/openprom/init/data@0x%lx", | |
d6103e8e | 249 | (unsigned long)bugapi->system_call_address); |
eada1efc | 250 | device_tree_add_parsed(node, "./real-address 0x%lx", |
d6103e8e | 251 | (unsigned long)bugapi->system_call_address); |
eada1efc MM |
252 | device_tree_add_parsed(node, "./data 0x%x", |
253 | emul_call_instruction); | |
254 | node = device_tree_add_parsed(root, "/openprom/init/data@0x%lx", | |
d6103e8e | 255 | (unsigned long)bugapi->system_call_address + 4); |
eada1efc | 256 | device_tree_add_parsed(node, "./real-address 0x%lx", |
d6103e8e | 257 | (unsigned long)bugapi->system_call_address + 4); |
eada1efc MM |
258 | device_tree_add_parsed(node, "./data 0x%x", |
259 | emul_rfi_instruction); | |
260 | ||
261 | /* patch the end of the system call instruction so that it contains | |
262 | a loop to self instruction and point all the cpu's at this */ | |
263 | node = device_tree_add_parsed(root, "/openprom/init/data@0x%lx", | |
264 | (unsigned long)bugapi->stall_cpu_loop_address); | |
265 | device_tree_add_parsed(node, "./real-address 0x%lx", | |
266 | (unsigned long)bugapi->stall_cpu_loop_address); | |
267 | device_tree_add_parsed(node, "./data 0x%lx", | |
268 | (unsigned long)emul_loop_instruction); | |
93fac324 | 269 | |
eada1efc MM |
270 | device_tree_add_parsed(root, "/openprom/init/stack/stack-type %s", |
271 | elf_binary ? "elf" : "aix"); | |
93fac324 | 272 | |
eada1efc MM |
273 | device_tree_add_parsed(root, "/openprom/init/load-binary/file-name \"%s", |
274 | bfd_get_filename(image)); | |
275 | ||
276 | return bugapi; | |
93fac324 MM |
277 | } |
278 | ||
279 | static void | |
280 | emul_bugapi_init(os_emul_data *emul_data, | |
281 | int nr_cpus) | |
282 | { | |
283 | /* nothing happens here */ | |
284 | } | |
285 | ||
ad836e02 MM |
286 | static const char * |
287 | emul_bugapi_instruction_name(int call_id) | |
288 | { | |
289 | static char buffer[40]; | |
290 | int i; | |
291 | ||
292 | for (i = 0; i < sizeof (bug_mapping) / sizeof (bug_mapping[0]); i++) | |
293 | { | |
294 | if (bug_mapping[i].value == call_id) | |
295 | return bug_mapping[i].info; | |
296 | } | |
297 | ||
298 | (void) sprintf (buffer, "Unknown bug call 0x%x", call_id); | |
299 | return buffer; | |
300 | } | |
301 | ||
262faa54 | 302 | static int |
d6103e8e MM |
303 | emul_bugapi_do_read(os_emul_data *bugapi, |
304 | cpu *processor, | |
262faa54 MM |
305 | unsigned_word cia, |
306 | unsigned_word buf, | |
307 | int nbytes) | |
308 | { | |
309 | unsigned char *scratch_buffer; | |
310 | int status; | |
311 | ||
312 | /* get a tempoary bufer */ | |
313 | scratch_buffer = (unsigned char *) zalloc(nbytes); | |
314 | ||
315 | /* check if buffer exists by reading it */ | |
316 | emul_read_buffer((void *)scratch_buffer, buf, nbytes, processor, cia); | |
317 | ||
318 | /* read */ | |
d6103e8e MM |
319 | status = device_instance_read(bugapi->input, |
320 | (void *)scratch_buffer, nbytes); | |
262faa54 | 321 | |
d6103e8e MM |
322 | /* -1 = error, -2 = nothing available - see "serial" [IEEE1275] */ |
323 | if (status < 0) { | |
262faa54 MM |
324 | status = 0; |
325 | } | |
326 | ||
327 | if (status > 0) { | |
328 | emul_write_buffer((void *)scratch_buffer, buf, status, processor, cia); | |
329 | ||
330 | /* Bugapi chops off the trailing n, but leaves it in the buffer */ | |
331 | if (scratch_buffer[status-1] == '\n' || scratch_buffer[status-1] == '\r') | |
332 | status--; | |
333 | } | |
334 | ||
335 | zfree(scratch_buffer); | |
336 | return status; | |
337 | } | |
338 | ||
ad836e02 | 339 | static void |
d6103e8e MM |
340 | emul_bugapi_do_write(os_emul_data *bugapi, |
341 | cpu *processor, | |
ad836e02 MM |
342 | unsigned_word cia, |
343 | unsigned_word buf, | |
344 | int nbytes, | |
345 | const char *suffix) | |
346 | { | |
347 | void *scratch_buffer = NULL; | |
ad836e02 MM |
348 | int nr_moved; |
349 | ||
350 | /* get a tempoary bufer */ | |
351 | if (nbytes > 0) | |
352 | { | |
353 | scratch_buffer = zalloc(nbytes); | |
354 | ||
355 | /* copy in */ | |
356 | nr_moved = vm_data_map_read_buffer(cpu_data_map(processor), | |
357 | scratch_buffer, | |
358 | buf, | |
359 | nbytes); | |
360 | if (nr_moved != nbytes) { | |
361 | /* FIXME - should handle better */ | |
362 | error("system_call()write copy failed (nr_moved=%d != nbytes=%d)\n", | |
363 | nr_moved, nbytes); | |
364 | } | |
365 | ||
366 | /* write */ | |
d6103e8e | 367 | device_instance_write(bugapi->output, scratch_buffer, nbytes); |
ad836e02 MM |
368 | |
369 | zfree(scratch_buffer); | |
370 | } | |
371 | ||
372 | if (suffix) | |
d6103e8e | 373 | device_instance_write(bugapi->output, suffix, strlen(suffix)); |
262faa54 MM |
374 | |
375 | flush_stdoutput (); | |
ad836e02 MM |
376 | } |
377 | ||
93fac324 MM |
378 | static int |
379 | emul_bugapi_instruction_call(cpu *processor, | |
380 | unsigned_word cia, | |
381 | unsigned_word ra, | |
d6103e8e | 382 | os_emul_data *bugapi) |
93fac324 | 383 | { |
979c3c25 | 384 | const int call_id = cpu_registers(processor)->gpr[10]; |
d6103e8e | 385 | const char *my_prefix UNUSED = "bugapi"; |
262faa54 | 386 | unsigned char uc; |
ad836e02 MM |
387 | |
388 | ITRACE (trace_os_emul,(" 0x%x %s, r3 = 0x%lx, r4 = 0x%lx\n", | |
389 | call_id, emul_bugapi_instruction_name (call_id), | |
390 | (long)cpu_registers(processor)->gpr[3], | |
391 | (long)cpu_registers(processor)->gpr[4]));; | |
392 | ||
979c3c25 | 393 | /* check that this isn't an invalid instruction */ |
d6103e8e | 394 | if (cia != bugapi->system_call_address) |
979c3c25 MM |
395 | return 0; |
396 | switch (call_id) { | |
ad836e02 MM |
397 | default: |
398 | error("emul-bugapi: unimplemented bugapi %s from address 0x%lx\n", | |
399 | emul_bugapi_instruction_name (call_id), SRR0); | |
400 | break; | |
262faa54 MM |
401 | /* read a single character, output r3 = byte */ |
402 | /* FIXME: Add support to unbuffer input */ | |
403 | case _INCHR: | |
d6103e8e | 404 | if (device_instance_read(bugapi->input, (void *)&uc, 1) <= 0) |
262faa54 MM |
405 | uc = 0; |
406 | cpu_registers(processor)->gpr[3] = uc; | |
407 | break; | |
408 | /* read a line of at most 256 bytes, r3 = ptr to 1st byte, output r3 = ptr to last byte+1 */ | |
409 | case _INLN: | |
d6103e8e MM |
410 | cpu_registers(processor)->gpr[3] += emul_bugapi_do_read(bugapi, |
411 | processor, cia, | |
262faa54 MM |
412 | cpu_registers(processor)->gpr[3], |
413 | 256); | |
414 | break; | |
ad836e02 | 415 | /* output a character, r3 = character */ |
979c3c25 | 416 | case _OUTCHR: |
d6103e8e MM |
417 | { |
418 | char out = (char)cpu_registers(processor)->gpr[3]; | |
419 | device_instance_write(bugapi->output, &out, 1); | |
420 | } | |
979c3c25 | 421 | break; |
ad836e02 MM |
422 | /* output a string, r3 = ptr to 1st byte, r4 = ptr to last byte+1 */ |
423 | case _OUTSTR: | |
d6103e8e MM |
424 | emul_bugapi_do_write(bugapi, |
425 | processor, cia, | |
ad836e02 MM |
426 | cpu_registers(processor)->gpr[3], |
427 | cpu_registers(processor)->gpr[4] - cpu_registers(processor)->gpr[3], | |
428 | (const char *)0); | |
429 | break; | |
430 | /* output a string followed by \r\n, r3 = ptr to 1st byte, r4 = ptr to last byte+1 */ | |
979c3c25 | 431 | case _OUTLN: |
ad836e02 | 432 | |
d6103e8e MM |
433 | emul_bugapi_do_write(bugapi, |
434 | processor, cia, | |
ad836e02 MM |
435 | cpu_registers(processor)->gpr[3], |
436 | cpu_registers(processor)->gpr[4] - cpu_registers(processor)->gpr[3], | |
437 | "\n"); | |
438 | break; | |
439 | /* output a \r\n */ | |
440 | case _PCRLF: | |
d6103e8e | 441 | device_instance_write(bugapi->output, "\n", 1); |
979c3c25 | 442 | break; |
ad836e02 | 443 | /* return to ppcbug monitor */ |
979c3c25 MM |
444 | case _RETURN: |
445 | cpu_halt(processor, cia, was_exited, 0); /* always succeeds */ | |
446 | break; | |
979c3c25 | 447 | } |
93fac324 | 448 | return 1; |
979c3c25 MM |
449 | /* the instruction following this one is a RFI. Thus by just |
450 | continuing the return from system call is performed */ | |
93fac324 MM |
451 | } |
452 | ||
453 | const os_emul emul_bugapi = { | |
454 | "bugapi", | |
455 | emul_bugapi_create, | |
456 | emul_bugapi_init, | |
457 | 0, /*system_call*/ | |
458 | emul_bugapi_instruction_call, | |
459 | 0 /*data*/ | |
460 | }; | |
461 | ||
462 | #endif |