mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-25 04:30:02 +00:00
f884294bd7
Bug fixes: * Fix die-id validation regression (Eduardo Habkost) * vmmouse: Properly reset state (Jan Kiszka) * hostmem-file: fix pmem file size check (Stefan Hajnoczi) * Keep query-hotpluggable-cpus output compatible with older QEMU if '-smp dies' is not set (Igor Mammedov) * migration: Do not re-read the clock on pre_save in case of paused guest (Maxiwell S. Garcia) Cleanups: * NUMA code cleanups (Tao Xu) * Remove stale externs from includes (Alex Bennée) Features: * qapi: report the default CPU type for each machine (Daniel P. Berrangé) -----BEGIN PGP SIGNATURE----- iQJIBAABCAAyFiEEWjIv1avE09usz9GqKAeTb5hNxaYFAl1u08EUHGVoYWJrb3N0 QHJlZGhhdC5jb20ACgkQKAeTb5hNxaaKGQ//WQY+JQgXj2M7i5bAuz1lkR0QKJvh n++70ugqNmmlj1YH7LKmZNll0tz+auo25PLgEBOamPZPFQXxkRhPBxTUnOdQJ1UC bSwyRzHrFluVITXD/nGkIXgmP4rjXil5QBWTxneWb7zYsXDGBEnauZnC1YsXzc9T 5LISvc5zEz6pEzz5s3LdUJ947jTui/dDHVHupeyK/5bPkiPoKVoymsd4p8rvAmFw 4obMftjuFzklm8oLPKpHYAm7VvXj5yb92/FE/ZKdaahcLPGStWixiHJ7xJlGMBti GqcWca+2sdbsraOz4Pg05x//vbOgiwIECqgKJRlJSAnG7Roz7E6J/xXQIYIkhpkL Sn0+s181WtFeNFlQgEP056iTUCq81oBjek2XzgsXzuQyFip5IJGLLQox4E+w0ty6 7houoCkJD70ddl3sEj/koXi6rBeswNStfuxVYxUgwYa7HecehNvVD5q9NlElRhev Lce4szuWJzHBbhW5ubGmN6rCbXNa+mPrBunrDwbjApl12DFkr163dj9DsyN/DUgy MmfsgqpKZ+g18VSajck2QtvTg+9Oqv0bv3SWtpDwzDxS9VULz0r2wfcN9TZDipV0 qCZWg39BpCIgdd4s5L0q6bamC9+eSwoByFx54WrkoQT81odHJqUHNsCE9wnoNvmG aZlV3idjGmsTFiE= =u5HZ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging Machine + x86 queue, 2019-09-03 Bug fixes: * Fix die-id validation regression (Eduardo Habkost) * vmmouse: Properly reset state (Jan Kiszka) * hostmem-file: fix pmem file size check (Stefan Hajnoczi) * Keep query-hotpluggable-cpus output compatible with older QEMU if '-smp dies' is not set (Igor Mammedov) * migration: Do not re-read the clock on pre_save in case of paused guest (Maxiwell S. Garcia) Cleanups: * NUMA code cleanups (Tao Xu) * Remove stale externs from includes (Alex Bennée) Features: * qapi: report the default CPU type for each machine (Daniel P. Berrangé) # gpg: Signature made Tue 03 Sep 2019 21:57:37 BST # gpg: using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6 # gpg: issuer "ehabkost@redhat.com" # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full] # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/machine-next-pull-request: migration: Do not re-read the clock on pre_save in case of paused guest x86: do not advertise die-id in query-hotpluggbale-cpus if '-smp dies' is not set i386/vmmouse: Properly reset state hostmem-file: fix pmem file size check qapi: report the default CPU type for each machine pc: Don't make die-id mandatory unless necessary pc: Improve error message when die-id is omitted pc: Fix error message on die-id validation numa: move numa global variable numa_info into MachineState numa: move numa global variable have_numa_distance into MachineState numa: move numa global variable nb_numa_nodes into MachineState hw/arm: simplify arm_load_dtb includes: remove stale [smp|max]_cpus externs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
90 lines
2.7 KiB
C
90 lines
2.7 KiB
C
/*
|
|
* cubieboard emulation
|
|
*
|
|
* Copyright (C) 2013 Li Guang
|
|
* Written by Li Guang <lig.fnst@cn.fujitsu.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* for more details.
|
|
*/
|
|
|
|
#include "qemu/osdep.h"
|
|
#include "exec/address-spaces.h"
|
|
#include "qapi/error.h"
|
|
#include "cpu.h"
|
|
#include "hw/sysbus.h"
|
|
#include "hw/boards.h"
|
|
#include "hw/arm/allwinner-a10.h"
|
|
|
|
static struct arm_boot_info cubieboard_binfo = {
|
|
.loader_start = AW_A10_SDRAM_BASE,
|
|
.board_id = 0x1008,
|
|
};
|
|
|
|
typedef struct CubieBoardState {
|
|
AwA10State *a10;
|
|
MemoryRegion sdram;
|
|
} CubieBoardState;
|
|
|
|
static void cubieboard_init(MachineState *machine)
|
|
{
|
|
CubieBoardState *s = g_new(CubieBoardState, 1);
|
|
Error *err = NULL;
|
|
|
|
s->a10 = AW_A10(object_new(TYPE_AW_A10));
|
|
|
|
object_property_set_int(OBJECT(&s->a10->emac), 1, "phy-addr", &err);
|
|
if (err != NULL) {
|
|
error_reportf_err(err, "Couldn't set phy address: ");
|
|
exit(1);
|
|
}
|
|
|
|
object_property_set_int(OBJECT(&s->a10->timer), 32768, "clk0-freq", &err);
|
|
if (err != NULL) {
|
|
error_reportf_err(err, "Couldn't set clk0 frequency: ");
|
|
exit(1);
|
|
}
|
|
|
|
object_property_set_int(OBJECT(&s->a10->timer), 24000000, "clk1-freq",
|
|
&err);
|
|
if (err != NULL) {
|
|
error_reportf_err(err, "Couldn't set clk1 frequency: ");
|
|
exit(1);
|
|
}
|
|
|
|
object_property_set_bool(OBJECT(s->a10), true, "realized", &err);
|
|
if (err != NULL) {
|
|
error_reportf_err(err, "Couldn't realize Allwinner A10: ");
|
|
exit(1);
|
|
}
|
|
|
|
memory_region_allocate_system_memory(&s->sdram, NULL, "cubieboard.ram",
|
|
machine->ram_size);
|
|
memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,
|
|
&s->sdram);
|
|
|
|
/* TODO create and connect IDE devices for ide_drive_get() */
|
|
|
|
cubieboard_binfo.ram_size = machine->ram_size;
|
|
arm_load_kernel(&s->a10->cpu, machine, &cubieboard_binfo);
|
|
}
|
|
|
|
static void cubieboard_machine_init(MachineClass *mc)
|
|
{
|
|
mc->desc = "cubietech cubieboard (Cortex-A9)";
|
|
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9");
|
|
mc->init = cubieboard_init;
|
|
mc->block_default_type = IF_IDE;
|
|
mc->units_per_default_bus = 1;
|
|
mc->ignore_memory_transaction_failures = true;
|
|
}
|
|
|
|
DEFINE_MACHINE("cubieboard", cubieboard_machine_init)
|