2008-12-15 03:05:00 +01:00
|
|
|
/* omap_sx1.c Support for the Siemens SX1 smartphone emulation.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008
|
|
|
|
* Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
|
|
|
* Copyright (C) 2007 Vladimir Ananiev <vovan888@gmail.com>
|
|
|
|
*
|
|
|
|
* based on PalmOne's (TM) PDAs support (palm.c)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* PalmOne's (TM) PDAs.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006-2007 Andrzej Zaborowski <balrog@zabor.org>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2009-01-04 23:05:52 +01:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
2009-07-16 22:47:01 +02:00
|
|
|
* with this program; if not, see <http://www.gnu.org/licenses/>.
|
2008-12-15 03:05:00 +01:00
|
|
|
*/
|
2015-12-07 17:23:45 +01:00
|
|
|
#include "qemu/osdep.h"
|
2023-01-09 12:53:13 +01:00
|
|
|
#include "qemu/units.h"
|
include/qemu/osdep.h: Don't include qapi/error.h
Commit 57cb38b included qapi/error.h into qemu/osdep.h to get the
Error typedef. Since then, we've moved to include qemu/osdep.h
everywhere. Its file comment explains: "To avoid getting into
possible circular include dependencies, this file should not include
any other QEMU headers, with the exceptions of config-host.h,
compiler.h, os-posix.h and os-win32.h, all of which are doing a
similar job to this file and are under similar constraints."
qapi/error.h doesn't do a similar job, and it doesn't adhere to
similar constraints: it includes qapi-types.h. That's in excess of
100KiB of crap most .c files don't actually need.
Add the typedef to qemu/typedefs.h, and include that instead of
qapi/error.h. Include qapi/error.h in .c files that need it and don't
get it now. Include qapi-types.h in qom/object.h for uint16List.
Update scripts/clean-includes accordingly. Update it further to match
reality: replace config.h by config-target.h, add sysemu/os-posix.h,
sysemu/os-win32.h. Update the list of includes in the qemu/osdep.h
comment quoted above similarly.
This reduces the number of objects depending on qapi/error.h from "all
of them" to less than a third. Unfortunately, the number depending on
qapi-types.h shrinks only a little. More work is needed for that one.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
[Fix compilation without the spice devel packages. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-03-14 09:01:28 +01:00
|
|
|
#include "qapi/error.h"
|
2012-11-28 12:06:30 +01:00
|
|
|
#include "ui/console.h"
|
2013-02-05 17:06:20 +01:00
|
|
|
#include "hw/arm/omap.h"
|
2013-02-04 15:40:22 +01:00
|
|
|
#include "hw/boards.h"
|
2019-05-23 15:47:43 +02:00
|
|
|
#include "hw/arm/boot.h"
|
2013-02-05 17:06:20 +01:00
|
|
|
#include "hw/block/flash.h"
|
2013-07-29 18:27:58 +02:00
|
|
|
#include "sysemu/qtest.h"
|
2012-12-17 18:19:49 +01:00
|
|
|
#include "exec/address-spaces.h"
|
2017-09-13 18:04:57 +02:00
|
|
|
#include "cpu.h"
|
2020-02-19 17:09:00 +01:00
|
|
|
#include "qemu/cutils.h"
|
2023-03-15 18:43:13 +01:00
|
|
|
#include "qemu/error-report.h"
|
|
|
|
|
2008-12-15 03:05:00 +01:00
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/* Siemens SX1 Cellphone V1 */
|
|
|
|
/* - ARM OMAP310 processor
|
|
|
|
* - SRAM 192 kB
|
|
|
|
* - SDRAM 32 MB at 0x10000000
|
|
|
|
* - Boot flash 16 MB at 0x00000000
|
|
|
|
* - Application flash 8 MB at 0x04000000
|
|
|
|
* - 3 serial ports
|
|
|
|
* - 1 SecureDigital
|
|
|
|
* - 1 LCD display
|
|
|
|
* - 1 RTC
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/* Siemens SX1 Cellphone V2 */
|
|
|
|
/* - ARM OMAP310 processor
|
|
|
|
* - SRAM 192 kB
|
|
|
|
* - SDRAM 32 MB at 0x10000000
|
|
|
|
* - Boot flash 32 MB at 0x00000000
|
|
|
|
* - 3 serial ports
|
|
|
|
* - 1 SecureDigital
|
|
|
|
* - 1 LCD display
|
|
|
|
* - 1 RTC
|
|
|
|
*/
|
|
|
|
|
2012-10-23 12:30:10 +02:00
|
|
|
static uint64_t static_read(void *opaque, hwaddr offset,
|
2011-11-28 13:53:34 +01:00
|
|
|
unsigned size)
|
2008-12-15 03:05:00 +01:00
|
|
|
{
|
2023-01-09 15:02:55 +01:00
|
|
|
uint32_t *val = opaque;
|
2011-11-28 13:53:34 +01:00
|
|
|
uint32_t mask = (4 / size) - 1;
|
2008-12-15 03:05:00 +01:00
|
|
|
|
2011-11-28 13:53:34 +01:00
|
|
|
return *val >> ((offset & mask) << 3);
|
2008-12-15 03:05:00 +01:00
|
|
|
}
|
|
|
|
|
2012-10-23 12:30:10 +02:00
|
|
|
static void static_write(void *opaque, hwaddr offset,
|
2011-11-28 13:53:34 +01:00
|
|
|
uint64_t value, unsigned size)
|
2008-12-15 03:05:00 +01:00
|
|
|
{
|
|
|
|
#ifdef SPY
|
2011-11-28 13:53:34 +01:00
|
|
|
printf("%s: value %" PRIx64 " %u bytes written at 0x%x\n",
|
|
|
|
__func__, value, size, (int)offset);
|
2008-12-15 03:05:00 +01:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2011-11-28 13:53:34 +01:00
|
|
|
static const MemoryRegionOps static_ops = {
|
|
|
|
.read = static_read,
|
|
|
|
.write = static_write,
|
|
|
|
.endianness = DEVICE_NATIVE_ENDIAN,
|
2008-12-15 03:05:00 +01:00
|
|
|
};
|
|
|
|
|
2023-01-09 12:53:13 +01:00
|
|
|
#define SDRAM_SIZE (32 * MiB)
|
|
|
|
#define SECTOR_SIZE (128 * KiB)
|
|
|
|
#define FLASH0_SIZE (16 * MiB)
|
|
|
|
#define FLASH1_SIZE (8 * MiB)
|
|
|
|
#define FLASH2_SIZE (32 * MiB)
|
2008-12-15 03:05:00 +01:00
|
|
|
|
|
|
|
static struct arm_boot_info sx1_binfo = {
|
|
|
|
.loader_start = OMAP_EMIFF_BASE,
|
2023-01-09 12:53:13 +01:00
|
|
|
.ram_size = SDRAM_SIZE,
|
2008-12-15 03:05:00 +01:00
|
|
|
.board_id = 0x265,
|
|
|
|
};
|
|
|
|
|
2014-05-07 16:42:57 +02:00
|
|
|
static void sx1_init(MachineState *machine, const int version)
|
2008-12-15 03:05:00 +01:00
|
|
|
{
|
2012-05-14 01:17:03 +02:00
|
|
|
struct omap_mpu_state_s *mpu;
|
2020-02-19 17:09:00 +01:00
|
|
|
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
2011-08-09 18:35:00 +02:00
|
|
|
MemoryRegion *address_space = get_system_memory();
|
2011-11-28 13:53:34 +01:00
|
|
|
MemoryRegion *flash = g_new(MemoryRegion, 1);
|
|
|
|
MemoryRegion *cs = g_new(MemoryRegion, 4);
|
2008-12-15 03:05:00 +01:00
|
|
|
static uint32_t cs0val = 0x00213090;
|
|
|
|
static uint32_t cs1val = 0x00215070;
|
|
|
|
static uint32_t cs2val = 0x00001139;
|
|
|
|
static uint32_t cs3val = 0x00001139;
|
2009-07-22 16:42:57 +02:00
|
|
|
DriveInfo *dinfo;
|
2008-12-15 03:05:00 +01:00
|
|
|
int fl_idx;
|
2023-01-09 12:53:13 +01:00
|
|
|
uint32_t flash_size = FLASH0_SIZE;
|
2008-12-15 03:05:00 +01:00
|
|
|
|
2020-02-19 17:09:00 +01:00
|
|
|
if (machine->ram_size != mc->default_ram_size) {
|
|
|
|
char *sz = size_to_str(mc->default_ram_size);
|
|
|
|
error_report("Invalid RAM size, should be %s", sz);
|
|
|
|
g_free(sz);
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
}
|
|
|
|
|
2008-12-15 03:05:00 +01:00
|
|
|
if (version == 2) {
|
2023-01-09 12:53:13 +01:00
|
|
|
flash_size = FLASH2_SIZE;
|
2008-12-15 03:05:00 +01:00
|
|
|
}
|
|
|
|
|
2020-02-19 17:09:00 +01:00
|
|
|
memory_region_add_subregion(address_space, OMAP_EMIFF_BASE, machine->ram);
|
2019-10-22 17:50:38 +02:00
|
|
|
|
2020-02-19 17:09:00 +01:00
|
|
|
mpu = omap310_mpu_init(machine->ram, machine->cpu_type);
|
2008-12-15 03:05:00 +01:00
|
|
|
|
|
|
|
/* External Flash (EMIFS) */
|
2020-02-24 19:50:18 +01:00
|
|
|
memory_region_init_rom(flash, NULL, "omap_sx1.flash0-0", flash_size,
|
Fix bad error handling after memory_region_init_ram()
Symptom:
$ qemu-system-x86_64 -m 10000000
Unexpected error in ram_block_add() at /work/armbru/qemu/exec.c:1456:
upstream-qemu: cannot set up guest memory 'pc.ram': Cannot allocate memory
Aborted (core dumped)
Root cause: commit ef701d7 screwed up handling of out-of-memory
conditions. Before the commit, we report the error and exit(1), in
one place, ram_block_add(). The commit lifts the error handling up
the call chain some, to three places. Fine. Except it uses
&error_abort in these places, changing the behavior from exit(1) to
abort(), and thus undoing the work of commit 3922825 "exec: Don't
abort when we can't allocate guest memory".
The three places are:
* memory_region_init_ram()
Commit 4994653 (right after commit ef701d7) lifted the error
handling further, through memory_region_init_ram(), multiplying the
incorrect use of &error_abort. Later on, imitation of existing
(bad) code may have created more.
* memory_region_init_ram_ptr()
The &error_abort is still there.
* memory_region_init_rom_device()
Doesn't need fixing, because commit 33e0eb5 (soon after commit
ef701d7) lifted the error handling further, and in the process
changed it from &error_abort to passing it up the call chain.
Correct, because the callers are realize() methods.
Fix the error handling after memory_region_init_ram() with a
Coccinelle semantic patch:
@r@
expression mr, owner, name, size, err;
position p;
@@
memory_region_init_ram(mr, owner, name, size,
(
- &error_abort
+ &error_fatal
|
err@p
)
);
@script:python@
p << r.p;
@@
print "%s:%s:%s" % (p[0].file, p[0].line, p[0].column)
When the last argument is &error_abort, it gets replaced by
&error_fatal. This is the fix.
If the last argument is anything else, its position is reported. This
lets us check the fix is complete. Four positions get reported:
* ram_backend_memory_alloc()
Error is passed up the call chain, ultimately through
user_creatable_complete(). As far as I can tell, it's callers all
handle the error sanely.
* fsl_imx25_realize(), fsl_imx31_realize(), dp8393x_realize()
DeviceClass.realize() methods, errors handled sanely further up the
call chain.
We're good. Test case again behaves:
$ qemu-system-x86_64 -m 10000000
qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory
[Exit 1 ]
The next commits will repair the rest of commit ef701d7's damage.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1441983105-26376-3-git-send-email-armbru@redhat.com>
Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
2015-09-11 16:51:43 +02:00
|
|
|
&error_fatal);
|
2011-11-28 13:53:34 +01:00
|
|
|
memory_region_add_subregion(address_space, OMAP_CS0_BASE, flash);
|
|
|
|
|
2013-06-06 11:41:28 +02:00
|
|
|
memory_region_init_io(&cs[0], NULL, &static_ops, &cs0val,
|
2011-11-28 13:53:34 +01:00
|
|
|
"sx1.cs0", OMAP_CS0_SIZE - flash_size);
|
|
|
|
memory_region_add_subregion(address_space,
|
|
|
|
OMAP_CS0_BASE + flash_size, &cs[0]);
|
|
|
|
|
|
|
|
|
2013-06-06 11:41:28 +02:00
|
|
|
memory_region_init_io(&cs[2], NULL, &static_ops, &cs2val,
|
2011-11-28 13:53:34 +01:00
|
|
|
"sx1.cs2", OMAP_CS2_SIZE);
|
|
|
|
memory_region_add_subregion(address_space,
|
|
|
|
OMAP_CS2_BASE, &cs[2]);
|
|
|
|
|
2013-06-06 11:41:28 +02:00
|
|
|
memory_region_init_io(&cs[3], NULL, &static_ops, &cs3val,
|
2011-11-28 13:53:34 +01:00
|
|
|
"sx1.cs3", OMAP_CS3_SIZE);
|
|
|
|
memory_region_add_subregion(address_space,
|
|
|
|
OMAP_CS2_BASE, &cs[3]);
|
2008-12-15 03:05:00 +01:00
|
|
|
|
|
|
|
fl_idx = 0;
|
2009-07-22 16:42:57 +02:00
|
|
|
if ((dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) {
|
2023-01-09 12:53:16 +01:00
|
|
|
pflash_cfi01_register(OMAP_CS0_BASE,
|
|
|
|
"omap_sx1.flash0-1", flash_size,
|
|
|
|
blk_by_legacy_dinfo(dinfo),
|
|
|
|
SECTOR_SIZE, 4, 0, 0, 0, 0, 0);
|
2008-12-15 03:05:00 +01:00
|
|
|
fl_idx++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((version == 1) &&
|
2009-07-22 16:42:57 +02:00
|
|
|
(dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) {
|
2015-05-29 07:38:34 +02:00
|
|
|
MemoryRegion *flash_1 = g_new(MemoryRegion, 1);
|
2020-02-24 19:50:18 +01:00
|
|
|
memory_region_init_rom(flash_1, NULL, "omap_sx1.flash1-0",
|
2023-01-09 12:53:13 +01:00
|
|
|
FLASH1_SIZE, &error_fatal);
|
2011-11-28 13:53:34 +01:00
|
|
|
memory_region_add_subregion(address_space, OMAP_CS1_BASE, flash_1);
|
|
|
|
|
2013-06-06 11:41:28 +02:00
|
|
|
memory_region_init_io(&cs[1], NULL, &static_ops, &cs1val,
|
2023-01-09 12:53:13 +01:00
|
|
|
"sx1.cs1", OMAP_CS1_SIZE - FLASH1_SIZE);
|
2011-11-28 13:53:34 +01:00
|
|
|
memory_region_add_subregion(address_space,
|
2023-01-09 12:53:13 +01:00
|
|
|
OMAP_CS1_BASE + FLASH1_SIZE, &cs[1]);
|
2008-12-15 03:05:00 +01:00
|
|
|
|
2023-01-09 12:53:16 +01:00
|
|
|
pflash_cfi01_register(OMAP_CS1_BASE,
|
|
|
|
"omap_sx1.flash1-1", FLASH1_SIZE,
|
|
|
|
blk_by_legacy_dinfo(dinfo),
|
|
|
|
SECTOR_SIZE, 4, 0, 0, 0, 0, 0);
|
2008-12-15 03:05:00 +01:00
|
|
|
fl_idx++;
|
|
|
|
} else {
|
2013-06-06 11:41:28 +02:00
|
|
|
memory_region_init_io(&cs[1], NULL, &static_ops, &cs1val,
|
2011-11-28 13:53:34 +01:00
|
|
|
"sx1.cs1", OMAP_CS1_SIZE);
|
|
|
|
memory_region_add_subregion(address_space,
|
|
|
|
OMAP_CS1_BASE, &cs[1]);
|
2008-12-15 03:05:00 +01:00
|
|
|
}
|
|
|
|
|
2014-05-07 16:42:57 +02:00
|
|
|
if (!machine->kernel_filename && !fl_idx && !qtest_enabled()) {
|
hw/arm: Replace fprintf(stderr, "*\n" with error_report()
Replace a large number of the fprintf(stderr, "*\n" calls with
error_report(). The functions were renamed with these commands and then
compiler issues where manually fixed.
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
Some lines where then manually tweaked to pass checkpatch.
The 'qemu: ' prefix was manually removed from the hw/arm/boot.c file.
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Cc: qemu-arm@nongnu.org
Conversions that aren't followed by exit() dropped, because they might
be inappropriate.
Also trim trailing punctuation from error messages.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180203084315.20497-3-armbru@redhat.com>
2018-02-03 09:43:03 +01:00
|
|
|
error_report("Kernel or Flash image must be specified");
|
2008-12-15 03:05:00 +01:00
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Load the kernel. */
|
2019-08-09 08:57:21 +02:00
|
|
|
arm_load_kernel(mpu->cpu, machine, &sx1_binfo);
|
2008-12-15 03:05:00 +01:00
|
|
|
|
2009-02-07 16:20:14 +01:00
|
|
|
/* TODO: fix next line */
|
|
|
|
//~ qemu_console_resize(ds, 640, 480);
|
2008-12-15 03:05:00 +01:00
|
|
|
}
|
|
|
|
|
2014-05-07 16:42:57 +02:00
|
|
|
static void sx1_init_v1(MachineState *machine)
|
2008-12-15 03:05:00 +01:00
|
|
|
{
|
2014-05-07 16:42:57 +02:00
|
|
|
sx1_init(machine, 1);
|
2008-12-15 03:05:00 +01:00
|
|
|
}
|
|
|
|
|
2014-05-07 16:42:57 +02:00
|
|
|
static void sx1_init_v2(MachineState *machine)
|
2008-12-15 03:05:00 +01:00
|
|
|
{
|
2014-05-07 16:42:57 +02:00
|
|
|
sx1_init(machine, 2);
|
2008-12-15 03:05:00 +01:00
|
|
|
}
|
|
|
|
|
2015-09-19 10:49:44 +02:00
|
|
|
static void sx1_machine_v2_class_init(ObjectClass *oc, void *data)
|
2015-09-04 20:37:08 +02:00
|
|
|
{
|
2015-09-19 10:49:44 +02:00
|
|
|
MachineClass *mc = MACHINE_CLASS(oc);
|
|
|
|
|
2015-09-04 20:37:08 +02:00
|
|
|
mc->desc = "Siemens SX1 (OMAP310) V2";
|
|
|
|
mc->init = sx1_init_v2;
|
2017-09-07 14:54:54 +02:00
|
|
|
mc->ignore_memory_transaction_failures = true;
|
2017-09-13 18:04:57 +02:00
|
|
|
mc->default_cpu_type = ARM_CPU_TYPE_NAME("ti925t");
|
2023-01-09 12:53:13 +01:00
|
|
|
mc->default_ram_size = SDRAM_SIZE;
|
2020-02-19 17:09:00 +01:00
|
|
|
mc->default_ram_id = "omap1.dram";
|
2015-09-04 20:37:08 +02:00
|
|
|
}
|
2008-12-15 03:05:00 +01:00
|
|
|
|
2015-09-19 10:49:44 +02:00
|
|
|
static const TypeInfo sx1_machine_v2_type = {
|
|
|
|
.name = MACHINE_TYPE_NAME("sx1"),
|
|
|
|
.parent = TYPE_MACHINE,
|
|
|
|
.class_init = sx1_machine_v2_class_init,
|
|
|
|
};
|
2009-05-21 01:38:09 +02:00
|
|
|
|
2015-09-19 10:49:44 +02:00
|
|
|
static void sx1_machine_v1_class_init(ObjectClass *oc, void *data)
|
2009-05-21 01:38:09 +02:00
|
|
|
{
|
2015-09-19 10:49:44 +02:00
|
|
|
MachineClass *mc = MACHINE_CLASS(oc);
|
|
|
|
|
2015-09-04 20:37:08 +02:00
|
|
|
mc->desc = "Siemens SX1 (OMAP310) V1";
|
|
|
|
mc->init = sx1_init_v1;
|
2017-09-07 14:54:54 +02:00
|
|
|
mc->ignore_memory_transaction_failures = true;
|
2017-09-13 18:04:57 +02:00
|
|
|
mc->default_cpu_type = ARM_CPU_TYPE_NAME("ti925t");
|
2023-01-09 12:53:13 +01:00
|
|
|
mc->default_ram_size = SDRAM_SIZE;
|
2020-02-19 17:09:00 +01:00
|
|
|
mc->default_ram_id = "omap1.dram";
|
2009-05-21 01:38:09 +02:00
|
|
|
}
|
|
|
|
|
2015-09-19 10:49:44 +02:00
|
|
|
static const TypeInfo sx1_machine_v1_type = {
|
|
|
|
.name = MACHINE_TYPE_NAME("sx1-v1"),
|
|
|
|
.parent = TYPE_MACHINE,
|
|
|
|
.class_init = sx1_machine_v1_class_init,
|
|
|
|
};
|
|
|
|
|
|
|
|
static void sx1_machine_init(void)
|
|
|
|
{
|
|
|
|
type_register_static(&sx1_machine_v1_type);
|
|
|
|
type_register_static(&sx1_machine_v2_type);
|
|
|
|
}
|
|
|
|
|
2016-02-16 21:59:04 +01:00
|
|
|
type_init(sx1_machine_init)
|