/[gxemul]/trunk/src/machines/machine_test.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/src/machines/machine_test.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 42 - (hide annotations)
Mon Oct 8 16:22:32 2007 UTC (16 years, 7 months ago) by dpavlin
File MIME type: text/plain
File size: 11435 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.1613 2007/06/15 20:11:26 debug Exp $
20070501	Continuing a little on m88k disassembly (control registers,
		more instructions).
		Adding a dummy mvme88k machine mode.
20070502	Re-adding MIPS load/store alignment exceptions.
20070503	Implementing more of the M88K disassembly code.
20070504	Adding disassembly of some more M88K load/store instructions.
		Implementing some relatively simple M88K instructions (br.n,
		xor[.u] imm, and[.u] imm).
20070505	Implementing M88K three-register and, or, xor, and jmp[.n],
		bsr[.n] including function call trace stuff.
		Applying a patch from Bruce M. Simpson which implements the
		SYSCON_BOARD_CPU_CLOCK_FREQ_ID object of the syscon call in
		the yamon PROM emulation.
20070506	Implementing M88K bb0[.n] and bb1[.n], and skeletons for
		ldcr and stcr (although no control regs are implemented yet).
20070509	Found and fixed the bug which caused Linux for QEMU_MIPS to
		stop working in 0.4.5.1: It was a faulty change to the MIPS
		'sc' and 'scd' instructions I made while going through gcc -W
		warnings on 20070428.
20070510	Updating the Linux/QEMU_MIPS section in guestoses.html to
		use mips-test-0.2.tar.gz instead of 0.1.
		A big thank you to Miod Vallat for sending me M88K manuals.
		Implementing more M88K instructions (addu, subu, div[u], mulu,
		ext[u], clr, set, cmp).
20070511	Fixing bugs in the M88K "and" and "and.u" instructions (found
		by comparing against the manual).
		Implementing more M88K instructions (mask[.u], mak, bcnd (auto-
		generated)) and some more control register details.
		Cleanup: Removing the experimental AVR emulation mode and
		corresponding devices; AVR emulation wasn't really meaningful.
		Implementing autogeneration of most M88K loads/stores. The
		rectangle drawing demo (with -O0) for M88K runs :-)
		Beginning on M88K exception handling.
		More M88K instructions: tb0, tb1, rte, sub, jsr[.n].
		Adding some skeleton MVME PROM ("BUG") emulation.
20070512	Fixing a bug in the M88K cmp instruction.
		Adding the M88K lda (scaled register) instruction.
		Fixing bugs in 64-bit (32-bit pairs) M88K loads/stores.
		Removing the unused tick_hz stuff from the machine struct.
		Implementing the M88K xmem instruction. OpenBSD/mvme88k gets
		far enough to display the Copyright banner :-)
		Implementing subu.co (guess), addu.co, addu.ci, ff0, and ff1.
		Adding a dev_mvme187, for MVME187-specific devices/registers.
		OpenBSD/mvme88k prints more boot messages. :)
20070515	Continuing on MVME187 emulation (adding more devices, beginning
		on the CMMUs, etc).
		Adding the M88K and.c, xor.c, and or.c instructions, and making
		sure that mul, div, etc cause exceptions if executed when SFD1
		is disabled.
20070517	Continuing on M88K and MVME187 emulation in general; moving
		the CMMU registers to the CPU struct, separating dev_pcc2 from
		dev_mvme187, and beginning on memory_m88k.c (BATC and PATC).
		Fixing a bug in 64-bit (32-bit pairs) M88K fast stores.
		Implementing the clock part of dev_mk48txx.
		Implementing the M88K fstcr and xcr instructions.
		Implementing m88k_cpu_tlbdump().
		Beginning on the implementation of a separate address space
		for M88K .usr loads/stores.
20070520	Removing the non-working (skeleton) Sandpoint, SonyNEWS, SHARK
		Dnard, and Zaurus machine modes.
		Experimenting with dyntrans to_be_translated read-ahead. It
		seems to give a very small performance increase for MIPS
		emulation, but a large performance degradation for SuperH. Hm.
20070522	Disabling correct SuperH ITLB emulation; it does not seem to be
		necessary in order to let SH4 guest OSes run, and it slows down
		userspace code.
		Implementing "samepage" branches for SuperH emulation, and some
		other minor speed hacks.
20070525	Continuing on M88K memory-related stuff: exceptions, memory
		transaction register contents, etc.
		Implementing the M88K subu.ci instruction.
		Removing the non-working (skeleton) Iyonix machine mode.
		OpenBSD/mvme88k reaches userland :-), starts executing
		/sbin/init's instructions, and issues a few syscalls, before
		crashing.
20070526	Fixing bugs in dev_mk48txx, so that OpenBSD/mvme88k detects
		the correct time-of-day.
		Implementing a generic IRQ controller for the test machines
		(dev_irqc), similar to a proposed patch from Petr Stepan.
		Experimenting some more with translation read-ahead.
		Adding an "expect" script for automated OpenBSD/landisk
		install regression/performance tests.
20070527	Adding a dummy mmEye (SH3) machine mode skeleton.
		FINALLY found the strange M88K bug I have been hunting: I had
		not emulated the SNIP value for exceptions occurring in
		branch delay slots correctly.
		Implementing correct exceptions for 64-bit M88K loads/stores.
		Address to symbol lookups are now disabled when M88K is
		running in usermode (because usermode addresses don't have
		anything to do with supervisor addresses).
20070531	Removing the mmEye machine mode skeleton.
20070604	Some minor code cleanup.
20070605	Moving src/useremul.c into a subdir (src/useremul/), and
		cleaning up some more legacy constructs.
		Adding -Wstrict-aliasing and -fstrict-aliasing detection to
		the configure script.
20070606	Adding a check for broken GCC on Solaris to the configure
		script. (GCC 3.4.3 on Solaris cannot handle static variables
		which are initialized to 0 or NULL. :-/)
		Removing the old (non-working) ARC emulation modes: NEC RD94,
		R94, R96, and R98, and the last traces of Olivetti M700 and
		Deskstation Tyne.
		Removing the non-working skeleton WDSC device (dev_wdsc).
20070607	Thinking about how to use the host's cc + ld at runtime to
		generate native code. (See experiments/native_cc_ld_test.i
		for an example.)
20070608	Adding a program counter sampling timer, which could be useful
		for native code generation experiments.
		The KN02_CSR_NRMMOD bit in the DECstation 5000/200 (KN02) CSR
		should always be set, to allow a 5000/200 PROM to boot.
20070609	Moving out breakpoint details from the machine struct into
		a helper struct, and removing the limit on max nr of
		breakpoints.
20070610	Moving out tick functions into a helper struct as well (which
		also gets rid of the max limit).
20070612	FINALLY figured out why Debian/DECstation stopped working when
		translation read-ahead was enabled: in src/memory_rw.c, the
		call to invalidate_code_translation was made also if the
		memory access was an instruction load (if the page was mapped
		as writable); it shouldn't be called in that case.
20070613	Implementing some more MIPS32/64 revision 2 instructions: di,
		ei, ext, dext, dextm, dextu, and ins.
20070614	Implementing an instruction combination for the NetBSD/arm
		idle loop (making the host not use any cpu if NetBSD/arm
		inside the emulator is not using any cpu).
		Increasing the nr of ARM VPH entries from 128 to 384.
20070615	Removing the ENABLE_arch stuff from the configure script, so
		that all included architectures are included in both release
		and development builds.
		Moving memory related helper functions from misc.c to memory.c.
		Adding preliminary instructions for netbooting NetBSD/pmppc to
		guestoses.html; it doesn't work yet, there are weird timeouts.
		Beginning a total rewrite of the userland emulation modes
		(removing all emulation modes, beginning from scratch with
		NetBSD/MIPS and FreeBSD/Alpha only).
20070616	After fixing a bug in the DEC21143 NIC (the TDSTAT_OWN bit was
		only cleared for the last segment when transmitting, not all
		segments), NetBSD/pmppc boots with root-on-nfs without the
		timeouts. Updating guestoses.html.
		Removing the skeleton PSP (Playstation Portable) mode.
		Moving X11-related stuff in the machine struct into a helper
		struct.
		Cleanup of out-of-memory checks, to use a new CHECK_ALLOCATION
		macro (which prints a meaningful error message).
		Adding a COMMENT to each machine and device (for automagic
		.index comment generation).
		Doing regression testing for the next release.

==============  RELEASE 0.4.6  ==============


1 dpavlin 22 /*
2 dpavlin 34 * Copyright (C) 2005-2007 Anders Gavare. All rights reserved.
3 dpavlin 22 *
4     * Redistribution and use in source and binary forms, with or without
5     * modification, are permitted provided that the following conditions are met:
6     *
7     * 1. Redistributions of source code must retain the above copyright
8     * notice, this list of conditions and the following disclaimer.
9     * 2. Redistributions in binary form must reproduce the above copyright
10     * notice, this list of conditions and the following disclaimer in the
11     * documentation and/or other materials provided with the distribution.
12     * 3. The name of the author may not be used to endorse or promote products
13     * derived from this software without specific prior written permission.
14     *
15     * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16     * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17     * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18     * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19     * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20     * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21     * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22     * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23     * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24     * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25     * SUCH DAMAGE.
26     *
27     *
28 dpavlin 42 * $Id: machine_test.c,v 1.38 2007/06/15 18:08:10 debug Exp $
29 dpavlin 22 *
30 dpavlin 42 * COMMENT: Various test machines
31     *
32     * Generally, the machines are as follows:
33     *
34     * bareXYZ: A bare machine using an XYZ processor.
35     *
36     * testXYZ: A machine with an XYZ processor, and some experimental
37     * devices connected to it.
38     *
39     * The experimental devices in the test machines are:
40     *
41     * cons A serial I/O console device.
42     * disk A device for reading/writing (emulated) disk sectors.
43     * ether An ethernet device, for sending/receiving ethernet
44     * frames on an emulated network.
45     * fb Framebuffer (24-bit RGB per pixel).
46     * irqc A generic interrupt controller.
47     * mp A multiprocessor controller.
48     * rtc A real-time clock device.
49 dpavlin 22 */
50    
51     #include <stdio.h>
52     #include <string.h>
53    
54     #include "cpu.h"
55     #include "device.h"
56     #include "machine.h"
57     #include "memory.h"
58     #include "misc.h"
59    
60 dpavlin 42 #include "sh4_exception.h"
61    
62 dpavlin 24 #include "testmachine/dev_cons.h"
63     #include "testmachine/dev_disk.h"
64     #include "testmachine/dev_ether.h"
65     #include "testmachine/dev_fb.h"
66 dpavlin 42 #include "testmachine/dev_irqc.h"
67 dpavlin 24 #include "testmachine/dev_mp.h"
68 dpavlin 32 #include "testmachine/dev_rtc.h"
69 dpavlin 22
70 dpavlin 24
71 dpavlin 42 /*
72     * default_test():
73     *
74     * Initializes devices for most test machines. (Note: MIPS is different,
75     * because of legacy reasons.)
76     */
77 dpavlin 22 static void default_test(struct machine *machine, struct cpu *cpu)
78     {
79     char tmpstr[1000];
80 dpavlin 42 char base_irq[1000];
81     char end_of_base_irq[50];
82 dpavlin 24
83 dpavlin 42 /*
84     * First add the interrupt controller. Most processor architectures
85     * in GXemul have only 1 interrupt pin on the CPU, and it is simply
86     * called "emul[x].machine[y].cpu[z]".
87     *
88     * MIPS is an exception, dealt with in a separate setup function.
89     * ARM and SH are dealt with here.
90     */
91    
92     switch (machine->arch) {
93    
94     case ARCH_ARM:
95     snprintf(end_of_base_irq, sizeof(end_of_base_irq), ".irq");
96     break;
97    
98     case ARCH_SH:
99     snprintf(end_of_base_irq, sizeof(end_of_base_irq),
100     ".irq[0x%x]", SH4_INTEVT_IRQ15);
101     break;
102    
103     default:
104     end_of_base_irq[0] = '\0';
105     }
106    
107     snprintf(base_irq, sizeof(base_irq), "%s.cpu[%i]%s",
108     machine->path, machine->bootstrap_cpu, end_of_base_irq);
109    
110     snprintf(tmpstr, sizeof(tmpstr), "irqc addr=0x%"PRIx64" irq=%s",
111     (uint64_t) DEV_IRQC_ADDRESS, base_irq);
112     device_add(machine, tmpstr);
113    
114    
115     /* Now, add the other devices: */
116    
117     snprintf(tmpstr, sizeof(tmpstr), "cons addr=0x%"PRIx64
118     " irq=%s.irqc.2 in_use=%i",
119     (uint64_t) DEV_CONS_ADDRESS, base_irq, machine->arch != ARCH_SH);
120 dpavlin 22 machine->main_console_handle = (size_t)device_add(machine, tmpstr);
121    
122 dpavlin 42 snprintf(tmpstr, sizeof(tmpstr), "mp addr=0x%"PRIx64" irq=%s%sirqc.6",
123     (uint64_t) DEV_MP_ADDRESS,
124     end_of_base_irq[0]? end_of_base_irq + 1 : "",
125     end_of_base_irq[0]? "." : "");
126 dpavlin 22 device_add(machine, tmpstr);
127    
128 dpavlin 28 snprintf(tmpstr, sizeof(tmpstr), "fbctrl addr=0x%"PRIx64,
129     (uint64_t) DEV_FBCTRL_ADDRESS);
130     device_add(machine, tmpstr);
131 dpavlin 22
132 dpavlin 24 snprintf(tmpstr, sizeof(tmpstr), "disk addr=0x%"PRIx64,
133     (uint64_t) DEV_DISK_ADDRESS);
134 dpavlin 22 device_add(machine, tmpstr);
135    
136 dpavlin 42 snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=%s.irqc.3",
137     (uint64_t) DEV_ETHER_ADDRESS, base_irq);
138 dpavlin 22 device_add(machine, tmpstr);
139 dpavlin 32
140 dpavlin 42 snprintf(tmpstr, sizeof(tmpstr), "rtc addr=0x%"PRIx64" irq=%s.irqc.4",
141     (uint64_t) DEV_RTC_ADDRESS, base_irq);
142 dpavlin 32 device_add(machine, tmpstr);
143 dpavlin 22 }
144    
145    
146     MACHINE_SETUP(barealpha)
147     {
148     machine->machine_name = "Generic \"bare\" Alpha machine";
149     }
150    
151    
152     MACHINE_SETUP(testalpha)
153     {
154     machine->machine_name = "Alpha test machine";
155    
156     default_test(machine, cpu);
157     }
158    
159    
160     MACHINE_DEFAULT_CPU(barealpha)
161     {
162 dpavlin 24 machine->cpu_name = strdup("21264");
163 dpavlin 22 }
164    
165    
166     MACHINE_DEFAULT_CPU(testalpha)
167     {
168 dpavlin 24 machine->cpu_name = strdup("21264");
169 dpavlin 22 }
170    
171    
172     MACHINE_REGISTER(barealpha)
173     {
174     MR_DEFAULT(barealpha, "Generic \"bare\" Alpha machine",
175 dpavlin 26 ARCH_ALPHA, MACHINE_BAREALPHA);
176    
177     machine_entry_add_alias(me, "barealpha");
178 dpavlin 22 }
179    
180    
181     MACHINE_REGISTER(testalpha)
182     {
183     MR_DEFAULT(testalpha, "Test-machine for Alpha",
184 dpavlin 26 ARCH_ALPHA, MACHINE_TESTALPHA);
185    
186     machine_entry_add_alias(me, "testalpha");
187 dpavlin 22 }
188    
189    
190     MACHINE_SETUP(barearm)
191     {
192     machine->machine_name = "Generic \"bare\" ARM machine";
193     }
194    
195    
196     MACHINE_SETUP(testarm)
197     {
198     machine->machine_name = "ARM test machine";
199    
200     default_test(machine, cpu);
201    
202     /*
203     * Place a tiny stub at end of memory, and set the link register to
204     * point to it. This stub halts the machine (making it easy to try
205     * out simple stand-alone C functions).
206     */
207     cpu->cd.arm.r[ARM_SP] = machine->physical_ram_in_mb * 1048576 - 4096;
208     cpu->cd.arm.r[ARM_LR] = cpu->cd.arm.r[ARM_SP] + 32;
209     store_32bit_word(cpu, cpu->cd.arm.r[ARM_LR] + 0, 0xe3a00201);
210     store_32bit_word(cpu, cpu->cd.arm.r[ARM_LR] + 4, 0xe5c00010);
211     store_32bit_word(cpu, cpu->cd.arm.r[ARM_LR] + 8, 0xeafffffe);
212     }
213    
214    
215     MACHINE_DEFAULT_CPU(barearm)
216     {
217     machine->cpu_name = strdup("SA1110");
218     }
219    
220    
221     MACHINE_DEFAULT_CPU(testarm)
222     {
223     machine->cpu_name = strdup("SA1110");
224     }
225    
226    
227     MACHINE_REGISTER(barearm)
228     {
229     MR_DEFAULT(barearm, "Generic \"bare\" ARM machine",
230 dpavlin 26 ARCH_ARM, MACHINE_BAREARM);
231    
232     machine_entry_add_alias(me, "barearm");
233 dpavlin 22 }
234    
235    
236     MACHINE_REGISTER(testarm)
237     {
238 dpavlin 26 MR_DEFAULT(testarm, "Test-machine for ARM", ARCH_ARM, MACHINE_TESTARM);
239    
240     machine_entry_add_alias(me, "testarm");
241 dpavlin 22 }
242    
243    
244    
245 dpavlin 40 MACHINE_SETUP(barem88k)
246 dpavlin 22 {
247 dpavlin 40 machine->machine_name = "Generic \"bare\" M88K machine";
248 dpavlin 22 }
249    
250    
251 dpavlin 40 MACHINE_SETUP(testm88k)
252 dpavlin 22 {
253 dpavlin 40 machine->machine_name = "M88K test machine";
254 dpavlin 22
255     default_test(machine, cpu);
256     }
257    
258    
259 dpavlin 40 MACHINE_DEFAULT_CPU(barem88k)
260 dpavlin 22 {
261 dpavlin 40 machine->cpu_name = strdup("88110");
262 dpavlin 22 }
263    
264    
265 dpavlin 40 MACHINE_DEFAULT_CPU(testm88k)
266 dpavlin 22 {
267 dpavlin 40 machine->cpu_name = strdup("88110");
268 dpavlin 22 }
269    
270    
271 dpavlin 40 MACHINE_REGISTER(barem88k)
272 dpavlin 22 {
273 dpavlin 40 MR_DEFAULT(barem88k, "Generic \"bare\" M88K machine",
274     ARCH_M88K, MACHINE_BAREM88K);
275 dpavlin 26
276 dpavlin 40 machine_entry_add_alias(me, "barem88k");
277 dpavlin 22 }
278    
279    
280 dpavlin 40 MACHINE_REGISTER(testm88k)
281 dpavlin 22 {
282 dpavlin 40 MR_DEFAULT(testm88k, "Test-machine for M88K",
283     ARCH_M88K, MACHINE_TESTM88K);
284 dpavlin 26
285 dpavlin 40 machine_entry_add_alias(me, "testm88k");
286 dpavlin 22 }
287    
288    
289     MACHINE_SETUP(baremips)
290     {
291     machine->machine_name = "Generic \"bare\" MIPS machine";
292     cpu->byte_order = EMUL_BIG_ENDIAN;
293     }
294    
295    
296     MACHINE_SETUP(testmips)
297     {
298     /*
299 dpavlin 34 * A MIPS test machine. Originally, this was created as a way for
300     * me to test my master's thesis code; since then it has both
301     * evolved to support new things, and suffered bit rot so that it
302     * no longer can run my thesis code. Well, well...
303 dpavlin 22 *
304     * IRQ map:
305     * 7 CPU counter
306     * 6 SMP IPIs
307     * 5 not used yet
308 dpavlin 32 * 4 rtc
309 dpavlin 22 * 3 ethernet
310     * 2 serial console
311     */
312    
313 dpavlin 34 char tmpstr[300];
314 dpavlin 22
315     machine->machine_name = "MIPS test machine";
316     cpu->byte_order = EMUL_BIG_ENDIAN;
317    
318 dpavlin 34 snprintf(tmpstr, sizeof(tmpstr), "cons addr=0x%"PRIx64" irq=%s."
319     "cpu[%i].2", (uint64_t) DEV_CONS_ADDRESS, machine->path,
320     machine->bootstrap_cpu);
321 dpavlin 22 machine->main_console_handle = (size_t)device_add(machine, tmpstr);
322    
323 dpavlin 42 snprintf(tmpstr, sizeof(tmpstr), "mp addr=0x%"PRIx64" irq=6",
324 dpavlin 24 (uint64_t) DEV_MP_ADDRESS);
325 dpavlin 22 device_add(machine, tmpstr);
326    
327 dpavlin 28 snprintf(tmpstr, sizeof(tmpstr), "fbctrl addr=0x%"PRIx64,
328     (uint64_t) DEV_FBCTRL_ADDRESS);
329     device_add(machine, tmpstr);
330 dpavlin 22
331 dpavlin 24 snprintf(tmpstr, sizeof(tmpstr), "disk addr=0x%"PRIx64,
332     (uint64_t) DEV_DISK_ADDRESS);
333 dpavlin 22 device_add(machine, tmpstr);
334    
335 dpavlin 34 snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=%s."
336     "cpu[%i].3", (uint64_t) DEV_ETHER_ADDRESS, machine->path,
337     machine->bootstrap_cpu);
338 dpavlin 22 device_add(machine, tmpstr);
339 dpavlin 32
340 dpavlin 34 snprintf(tmpstr, sizeof(tmpstr), "rtc addr=0x%"PRIx64" irq=%s."
341     "cpu[%i].4", (uint64_t) DEV_RTC_ADDRESS, machine->path,
342     machine->bootstrap_cpu);
343 dpavlin 32 device_add(machine, tmpstr);
344 dpavlin 22 }
345    
346    
347     MACHINE_DEFAULT_CPU(baremips)
348     {
349 dpavlin 34 machine->cpu_name = strdup("5KE");
350 dpavlin 22 }
351    
352    
353     MACHINE_DEFAULT_CPU(testmips)
354     {
355 dpavlin 34 machine->cpu_name = strdup("5KE");
356 dpavlin 22 }
357    
358    
359     MACHINE_REGISTER(baremips)
360     {
361     MR_DEFAULT(baremips, "Generic \"bare\" MIPS machine",
362 dpavlin 26 ARCH_MIPS, MACHINE_BAREMIPS);
363    
364     machine_entry_add_alias(me, "baremips");
365 dpavlin 22 }
366    
367    
368     MACHINE_REGISTER(testmips)
369     {
370     MR_DEFAULT(testmips, "Test-machine for MIPS",
371 dpavlin 26 ARCH_MIPS, MACHINE_TESTMIPS);
372    
373     machine_entry_add_alias(me, "testmips");
374 dpavlin 22 }
375    
376    
377     MACHINE_SETUP(bareppc)
378     {
379     machine->machine_name = "Generic \"bare\" PPC machine";
380     }
381    
382    
383     MACHINE_SETUP(testppc)
384     {
385     machine->machine_name = "PPC test machine";
386    
387     default_test(machine, cpu);
388     }
389    
390    
391     MACHINE_DEFAULT_CPU(bareppc)
392     {
393     machine->cpu_name = strdup("PPC970");
394     }
395    
396    
397     MACHINE_DEFAULT_CPU(testppc)
398     {
399     machine->cpu_name = strdup("PPC970");
400     }
401    
402    
403     MACHINE_REGISTER(bareppc)
404     {
405     MR_DEFAULT(bareppc, "Generic \"bare\" PPC machine",
406 dpavlin 26 ARCH_PPC, MACHINE_BAREPPC);
407    
408     machine_entry_add_alias(me, "bareppc");
409 dpavlin 22 }
410    
411    
412     MACHINE_REGISTER(testppc)
413     {
414 dpavlin 26 MR_DEFAULT(testppc, "Test-machine for PPC", ARCH_PPC, MACHINE_TESTPPC);
415    
416     machine_entry_add_alias(me, "testppc");
417 dpavlin 22 }
418    
419    
420     MACHINE_SETUP(baresh)
421     {
422     machine->machine_name = "Generic \"bare\" SH machine";
423     }
424    
425    
426     MACHINE_SETUP(testsh)
427     {
428     machine->machine_name = "SH test machine";
429    
430     default_test(machine, cpu);
431     }
432    
433    
434     MACHINE_DEFAULT_CPU(baresh)
435     {
436 dpavlin 32 machine->cpu_name = strdup("SH7750");
437 dpavlin 22 }
438    
439    
440     MACHINE_DEFAULT_CPU(testsh)
441     {
442 dpavlin 32 machine->cpu_name = strdup("SH7750");
443 dpavlin 22 }
444    
445    
446     MACHINE_REGISTER(baresh)
447     {
448     MR_DEFAULT(baresh, "Generic \"bare\" SH machine",
449 dpavlin 26 ARCH_SH, MACHINE_BARESH);
450    
451     machine_entry_add_alias(me, "baresh");
452 dpavlin 22 }
453    
454    
455     MACHINE_REGISTER(testsh)
456     {
457 dpavlin 26 MR_DEFAULT(testsh, "Test-machine for SH", ARCH_SH, MACHINE_TESTSH);
458    
459     machine_entry_add_alias(me, "testsh");
460 dpavlin 22 }
461    
462    
463     MACHINE_SETUP(baresparc)
464     {
465     machine->machine_name = "Generic \"bare\" SPARC machine";
466     }
467    
468    
469     MACHINE_SETUP(testsparc)
470     {
471     machine->machine_name = "SPARC test machine";
472    
473     default_test(machine, cpu);
474     }
475    
476    
477     MACHINE_DEFAULT_CPU(baresparc)
478     {
479 dpavlin 24 machine->cpu_name = strdup("UltraSPARC");
480 dpavlin 22 }
481    
482    
483     MACHINE_DEFAULT_CPU(testsparc)
484     {
485 dpavlin 24 machine->cpu_name = strdup("UltraSPARC");
486 dpavlin 22 }
487    
488    
489     MACHINE_REGISTER(baresparc)
490     {
491     MR_DEFAULT(baresparc, "Generic \"bare\" SPARC machine",
492 dpavlin 26 ARCH_SPARC, MACHINE_BARESPARC);
493    
494     machine_entry_add_alias(me, "baresparc");
495 dpavlin 22 }
496    
497    
498     MACHINE_REGISTER(testsparc)
499     {
500     MR_DEFAULT(testsparc, "Test-machine for SPARC",
501 dpavlin 26 ARCH_SPARC, MACHINE_TESTSPARC);
502    
503     machine_entry_add_alias(me, "testsparc");
504 dpavlin 22 }
505    
506 dpavlin 28

  ViewVC Help
Powered by ViewVC 1.1.26