qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 24/24] ppc/ppc405: Add check on minimum RAM size


From: Cédric Le Goater
Subject: Re: [PATCH v4 24/24] ppc/ppc405: Add check on minimum RAM size
Date: Wed, 10 Aug 2022 08:24:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0

On 8/9/22 19:55, BALATON Zoltan wrote:
On Tue, 9 Aug 2022, Cédric Le Goater wrote:
The check on invalid RAM size is now performed in the SDRAM controller
but not all values will boot a machine. A minimum of 2*16 is required.

2*16 or 16 MiB? The code has the latter which does not match commit message.

Indeed. It should be 32MB below.

Thanks,

C.


Regards,
BALATON Zoltan


Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/ppc/ppc405_boards.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index 4ff6715f3533..9a3fec38cce1 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -251,14 +251,11 @@ static void boot_from_kernel(MachineState *machine, 
PowerPCCPU *cpu)
static void ppc405_init(MachineState *machine)
{
    Ppc405MachineState *ppc405 = PPC405_MACHINE(machine);
-    MachineClass *mc = MACHINE_GET_CLASS(machine);
    const char *kernel_filename = machine->kernel_filename;
    MemoryRegion *sysmem = get_system_memory();

-    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);
+    if (machine->ram_size < 16 * MiB) {
+        error_report("Not enough RAM !");
        exit(EXIT_FAILURE);
    }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]