diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2013-08-12 21:34:53 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2013-08-14 16:47:30 +0200 |
commit | cc413a39355ed910f22f8f0be5e233c08a0773a0 (patch) | |
tree | 211a2dc7f171ec93febae7515fe77e4ea4163d8d /hw | |
parent | 8b7a5415f9297c1fbae5bff28dcb059d50c1b045 (diff) |
mips_malta: do not raise exceptions when accessing invalid memory
Since commit c658b94f6e8c206c59d02aa6fbac285b86b53d2c, MIPS raises
exceptions when accessing invalid memory. This is not the correct
behaviour for MIPS Malta Core LV, as the GT-64120A system controller
just ignore undecoded access. This feature is used by the Linux kernel
to probe for some devices.
Emulate the correct behaviour in QEMU by adding an empty slot covering
the entire memory space decoded by the GT-64120A.
Tested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/mips/mips_malta.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 0f5de338fa..f8d064cec3 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -50,6 +50,7 @@ #include "qemu/host-utils.h" #include "sysemu/qtest.h" #include "qemu/error-report.h" +#include "hw/empty_slot.h" //#define DEBUG_BOARD_INIT @@ -908,6 +909,11 @@ void mips_malta_init(QEMUMachineInitArgs *args) DeviceState *dev = qdev_create(NULL, TYPE_MIPS_MALTA); MaltaState *s = MIPS_MALTA(dev); + /* The whole address space decoded by the GT-64120A doesn't generate + exception when accessing invalid memory. Create an empty slot to + emulate this feature. */ + empty_slot_init(0, 0x20000000); + qdev_init_nofail(dev); /* Make sure the first 3 serial ports are associated with a device. */ |