Limit max_mem on each machine to what its memory controller decodes, instead of the former 60 GiB or 256 MiB, and update the docs. The Voyager default RAM size becomes 80 MiB so -M Voyager without -m still starts.
Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Imre Kaloz <[email protected]> --- docs/system/target-sparc.rst | 6 ++++-- hw/sparc/sun4m.c | 17 +++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/system/target-sparc.rst b/docs/system/target-sparc.rst index 4116cac493..de0acc76dc 100644 --- a/docs/system/target-sparc.rst +++ b/docs/system/target-sparc.rst @@ -52,8 +52,10 @@ QEMU emulates the following sun4m peripherals: - CS4231 sound device (only on SS-5, not working yet) The number of peripherals is fixed in the architecture. Maximum memory -size depends on the machine type, for SS-5 it is 256MB and for others -2047MB. +size depends on the machine type: 512 MiB for the SS-10 and SS-20, +256 MiB for the SS-5, 160 MiB for the SS-4, 128 MiB for the LX, +SPARCclassic and SPARCbook, 80 MiB for the Voyager, and 1 GiB for the +SPARCserver 600MP. Since version 0.8.2, QEMU uses OpenBIOS https://www.openbios.org/. OpenBIOS is a free (GPL v2) portable firmware implementation. The goal diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 2f4eb19f7f..c586b1c44e 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -1177,7 +1177,7 @@ static void ss10_class_init(ObjectClass *oc, const void *data) .nvram_machine_id = 0x72, .machine_id = ss10_id, .iommu_version = 0x03000000, - .max_mem = 0xf00000000ULL, + .max_mem = 0x20000000, /* 512M: EMC has 29 DRAM address bits */ }; mc->desc = "Sun4m platform, SPARCstation 10"; @@ -1210,7 +1210,7 @@ static void ss600mp_class_init(ObjectClass *oc, const void *data) .nvram_machine_id = 0x71, .machine_id = ss600mp_id, .iommu_version = 0x01000000, - .max_mem = 0xf00000000ULL, + .max_mem = 0x40000000, /* 1G: onboard plus expansion boards */ }; mc->desc = "Sun4m platform, SPARCserver 600MP"; @@ -1261,7 +1261,7 @@ static void ss20_class_init(ObjectClass *oc, const void *data) .nvram_machine_id = 0x72, .machine_id = ss20_id, .iommu_version = 0x13000000, - .max_mem = 0xf00000000ULL, + .max_mem = 0x20000000, /* 512M: SMC has 29 DRAM address bits */ }; mc->desc = "Sun4m platform, SPARCstation 20"; @@ -1294,11 +1294,12 @@ static void voyager_class_init(ObjectClass *oc, const void *data) .nvram_machine_id = 0x80, .machine_id = vger_id, .iommu_version = 0x05000000, - .max_mem = 0x10000000, + .max_mem = 0x05000000, /* 80M: 16M onboard plus two 32M cards */ }; mc->desc = "Sun4m platform, SPARCstation Voyager"; mc->default_cpu_type = SPARC_CPU_TYPE_NAME("Fujitsu-MB86904"); + mc->default_ram_size = 80 * MiB; smc->hwdef = &voyager_hwdef; } @@ -1327,7 +1328,7 @@ static void ss_lx_class_init(ObjectClass *oc, const void *data) .nvram_machine_id = 0x80, .machine_id = lx_id, .iommu_version = 0x04000000, - .max_mem = 0x10000000, + .max_mem = 0x08000000, /* 128M: microSPARC-I on-chip controller */ }; mc->desc = "Sun4m platform, SPARCstation LX"; @@ -1360,7 +1361,7 @@ static void ss4_class_init(ObjectClass *oc, const void *data) .nvram_machine_id = 0x80, .machine_id = ss4_id, .iommu_version = 0x05000000, - .max_mem = 0x10000000, + .max_mem = 0x0a000000, /* 160M: 5 SIMM slots */ }; mc->desc = "Sun4m platform, SPARCstation 4"; @@ -1392,7 +1393,7 @@ static void scls_class_init(ObjectClass *oc, const void *data) .nvram_machine_id = 0x80, .machine_id = scls_id, .iommu_version = 0x05000000, - .max_mem = 0x10000000, + .max_mem = 0x08000000, /* 128M: microSPARC-I on-chip controller */ }; mc->desc = "Sun4m platform, SPARCClassic"; @@ -1424,7 +1425,7 @@ static void sbook_class_init(ObjectClass *oc, const void *data) .nvram_machine_id = 0x80, .machine_id = sbook_id, .iommu_version = 0x05000000, - .max_mem = 0x10000000, + .max_mem = 0x08000000, /* 128M: microSPARC-I on-chip controller */ }; mc->desc = "Sun4m platform, SPARCbook"; -- 2.47.3
