2015-08-21 07:04:50 +00:00
|
|
|
/* vim:set shiftwidth=4 ts=4 et: */
|
|
|
|
/*
|
|
|
|
* PXA255 Sharp Zaurus SL-6000 PDA platform
|
|
|
|
*
|
|
|
|
* Copyright (c) 2008 Dmitry Baryshkov
|
|
|
|
*
|
|
|
|
* Code based on spitz platform by Andrzej Zaborowski <balrog@zabor.org>
|
|
|
|
* This code is licensed under the GNU GPL v2.
|
|
|
|
*
|
|
|
|
* Contributions after 2012-01-13 are licensed under the terms of the
|
|
|
|
* GNU GPL, version 2 or (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
2018-02-18 02:10:42 +00:00
|
|
|
#include "qemu/osdep.h"
|
2015-08-21 07:04:50 +00:00
|
|
|
#include "hw/hw.h"
|
|
|
|
#include "hw/arm/arm.h"
|
|
|
|
#include "hw/boards.h"
|
|
|
|
#include "exec/address-spaces.h"
|
|
|
|
|
|
|
|
|
2015-11-11 17:43:41 +00:00
|
|
|
static int tosa_init(struct uc_struct *uc, MachineState *machine)
|
2015-08-21 07:04:50 +00:00
|
|
|
{
|
2016-12-27 14:49:06 +00:00
|
|
|
if (uc->mode & UC_MODE_MCLASS) {
|
|
|
|
uc->cpu = (CPUState *)cpu_arm_init(uc, "cortex-m3");
|
|
|
|
} else {
|
|
|
|
uc->cpu = (CPUState *)cpu_arm_init(uc, "cortex-a15");
|
|
|
|
}
|
2015-11-11 17:43:41 +00:00
|
|
|
|
|
|
|
return 0;
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void tosa_machine_init(struct uc_struct *uc)
|
|
|
|
{
|
2017-01-23 15:30:57 +00:00
|
|
|
static QEMUMachine tosapda_machine = { 0 };
|
|
|
|
tosapda_machine.name = "tosa",
|
|
|
|
tosapda_machine.init = tosa_init,
|
|
|
|
tosapda_machine.is_default = 1,
|
|
|
|
tosapda_machine.arch = UC_ARCH_ARM,
|
2015-08-21 07:04:50 +00:00
|
|
|
|
|
|
|
qemu_register_machine(uc, &tosapda_machine, TYPE_MACHINE, NULL);
|
|
|
|
}
|