[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/6] hw/mips/malta: Introduce the 'malta-strict' machine
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 4/6] hw/mips/malta: Introduce the 'malta-strict' machine |
Date: |
Tue, 30 Jun 2020 16:52:34 +0200 |
Introduce the 'malta-strict' machine, aiming to have the same
limitations as real hardware.
Start with 32 MB which is the default on the CoreLV, and allow
up to 256 MB which is the maximum this card can accept.
See datasheet 'MIPS Document Number: MD00051 Revision 01.07'.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/mips/malta.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 17a1c0d1c4..209237d066 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1478,12 +1478,34 @@ static void
malta_machine_default_class_init(ObjectClass *oc, void *data)
mmc->max_ramsize = 2 * GiB;
}
+static void malta_machine_strict_class_init(ObjectClass *oc, void *data)
+{
+ MachineClass *mc = MACHINE_CLASS(oc);
+ MaltaMachineClass *mmc = MALTA_MACHINE_CLASS(oc);
+
+ mc->desc = "MIPS Malta Core LV (physically limited as real hardware)";
+ mc->block_default_type = IF_PFLASH;
+ mc->max_cpus = 1;
+#ifdef TARGET_MIPS64
+ mc->default_cpu_type = MIPS_CPU_TYPE_NAME("5Kc");
+#else
+ mc->default_cpu_type = MIPS_CPU_TYPE_NAME("4Kc");
+#endif
+ mc->default_ram_size = 32 * MiB;
+ mmc->max_ramsize = 256 * MiB; /* 32 MByte PC100 SDRAM DIMMs x 4 slots */
+};
+
static const TypeInfo malta_machine_types[] = {
{
.name = MACHINE_TYPE_NAME("malta"),
.parent = TYPE_MALTA_MACHINE,
.class_init = malta_machine_default_class_init,
},
+ {
+ .name = MACHINE_TYPE_NAME("malta-strict"),
+ .parent = TYPE_MALTA_MACHINE,
+ .class_init = malta_machine_strict_class_init,
+ },
{
.name = TYPE_MALTA_MACHINE,
.parent = TYPE_MACHINE,
--
2.21.3
- [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware, Philippe Mathieu-Daudé, 2020/06/30
- [PATCH v2 1/6] hw/mips/malta: Trivial code movement, Philippe Mathieu-Daudé, 2020/06/30
- [PATCH v2 2/6] hw/mips/malta: Register the machine as a TypeInfo, Philippe Mathieu-Daudé, 2020/06/30
- [PATCH v2 3/6] hw/mips/malta: Introduce MaltaMachineClass::max_ramsize, Philippe Mathieu-Daudé, 2020/06/30
- [PATCH v2 4/6] hw/mips/malta: Introduce the 'malta-strict' machine,
Philippe Mathieu-Daudé <=
- [PATCH v2 5/6] hw/mips/malta: Verify malta-strict machine uses correct DIMM sizes, Philippe Mathieu-Daudé, 2020/06/30
- [PATCH v2 6/6] hw/mips/malta: Introduce the 'malta-unleashed' 64-bit machine, Philippe Mathieu-Daudé, 2020/06/30
- Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware, Aleksandar Markovic, 2020/06/30
- Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware, Philippe Mathieu-Daudé, 2020/06/30
- Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware, Aleksandar Markovic, 2020/06/30
- Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware, Philippe Mathieu-Daudé, 2020/06/30
- Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware, Aleksandar Markovic, 2020/06/30
- Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware, Philippe Mathieu-Daudé, 2020/06/30
- Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware, Richard Henderson, 2020/06/30
Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware, Thomas Huth, 2020/06/30