import
This commit is contained in:
1
qemu/hw/m68k/Makefile.objs
Normal file
1
qemu/hw/m68k/Makefile.objs
Normal file
@@ -0,0 +1 @@
|
||||
obj-y += dummy_m68k.o
|
||||
49
qemu/hw/m68k/dummy_m68k.c
Normal file
49
qemu/hw/m68k/dummy_m68k.c
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Dummy board with just RAM and CPU for use as an ISS.
|
||||
*
|
||||
* Copyright (c) 2007 CodeSourcery.
|
||||
*
|
||||
* This code is licensed under the GPL
|
||||
*/
|
||||
|
||||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh, 2015 */
|
||||
|
||||
#include "hw/hw.h"
|
||||
#include "hw/m68k/m68k.h"
|
||||
#include "hw/boards.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
|
||||
/* Board init. */
|
||||
static void dummy_m68k_init(struct uc_struct *uc, MachineState *machine)
|
||||
{
|
||||
const char *cpu_model = machine->cpu_model;
|
||||
CPUM68KState *env;
|
||||
|
||||
if (!cpu_model)
|
||||
cpu_model = "cfv4e";
|
||||
|
||||
env = cpu_init(uc, cpu_model);
|
||||
if (!env) {
|
||||
fprintf(stderr, "Unable to find m68k CPU definition\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Initialize CPU registers. */
|
||||
env->vbr = 0;
|
||||
env->pc = 0;
|
||||
}
|
||||
|
||||
void dummy_m68k_machine_init(struct uc_struct *uc)
|
||||
{
|
||||
static QEMUMachine dummy_m68k_machine = {
|
||||
.name = "dummy",
|
||||
.init = dummy_m68k_init,
|
||||
.is_default = 1,
|
||||
.arch = UC_ARCH_M68K,
|
||||
};
|
||||
|
||||
//printf(">>> dummy_m68k_machine_init\n");
|
||||
qemu_register_machine(uc, &dummy_m68k_machine, TYPE_MACHINE, NULL);
|
||||
}
|
||||
Reference in New Issue
Block a user