From patchwork Mon May 10 12:25:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 433123 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2800362jao; Mon, 10 May 2021 05:38:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNfauVieYb1FkmFK12rlbkPM4t7OGPTv+YAWGmbwabXPpBynFH7FuqWdPn6iZZGLJile0l X-Received: by 2002:ab0:4e0b:: with SMTP id g11mr981046uah.22.1620650285832; Mon, 10 May 2021 05:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620650285; cv=none; d=google.com; s=arc-20160816; b=LJsujgCSi2mrluweK+PpsLhEyP/xce9fJ7tUCBamosbSefGGRFS7DxV/nowjHh/gsJ XTvab7/+5GGAv57EJqA+T4rNQ16IH4H+rnbsU54AUkCrm3NagrQ5IJZtkiplS7ogeu5g tQA54sXHWnoJFWDc8+nOGviRlowk6CFMzgRwRQ7uOB43VF9fiT2aFwD0LoUBVffFADHi ttM2JHL4MQ+mFEnj+789EJ/+kehEK/FVi/mik2D/g6TV/eHxHdhEBsFFnZUmstGd2gEg Pxv3jYrNSWnyln7ZT41RliRqZLUE6aQkC9udOyVKOh+CWVH22x+ugC+GzVcQ3acJxmtK SULA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=jvz4r6apxuW1lveLKyXMmu2dN42LHk0Z7q4wIAJ/vfQ=; b=BvshCz+FttJZTiVqvCfRnM0JSCL0E9QcCzGXg1+h350HBNKcXPDNDOFnGSZGi2XNSH W70gTw+i/LnB21ALTjzE1HeTrDNQuOQPYHrxg7bmPYhtRimWj7Ol0xPPfmCkFt+czehN uQ5VKaA14oAgqBIHVn29MrBTAVh4LG7bhuSlnuox7F2GXIpgpsGJ/W+NVxzHnZYqohO8 zW/XQPOHPWnPMmsP5x99tVdrzVAa80GXGC8N/V/jWvyn57P9NTtKpKb6kr1hY/nf8C7Q dQQT/Ij2mjznx/mzVwXeL0PjUVDnjdqWGpy7QJTBzJcc04INKl/U5V8Pu09pfyXvLHNQ fQZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="m/yDxsSh"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x16si6497320uaq.232.2021.05.10.05.38.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 May 2021 05:38:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="m/yDxsSh"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg5Aj-00035G-8N for patch@linaro.org; Mon, 10 May 2021 08:38:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37662) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg4zA-0006Dz-CG for qemu-devel@nongnu.org; Mon, 10 May 2021 08:26:08 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:34754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lg4z8-0003HN-DS for qemu-devel@nongnu.org; Mon, 10 May 2021 08:26:08 -0400 Received: by mail-wm1-x32b.google.com with SMTP id u5-20020a7bc0450000b02901480e40338bso9587471wmc.1 for ; Mon, 10 May 2021 05:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=jvz4r6apxuW1lveLKyXMmu2dN42LHk0Z7q4wIAJ/vfQ=; b=m/yDxsShYOEeC6jKCttdzIqe6TXsRLmd7nL1cWGdb7SzL2NSuCS8Kne+13/c+TNqaM 2dBIIcr5Tgc6RqdEPGIXYJRSKa0CUKP8nc4UnMThH3nixkmdUOh+Sc0H5ieL6d/4POfr lrt90oyv8EqJSPMB7F78NizAWsYJMNOCU7Iwr7cPb/EbvA4JpAxV2NtEJrk2Eb9FHZdE DiEGjms5VVMRcBpoQbKi28hHVH2Z5tdVSv8rTH0f8mrNtfsLy5AAXVPv0CsXTNDNU9tE 4250VwIQ8sMnzFZzSVPEq1vHut2cm4EEwX7ZoN7tYiHU7XMl4DG0lilVO45iJoxRPRq3 Lw4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jvz4r6apxuW1lveLKyXMmu2dN42LHk0Z7q4wIAJ/vfQ=; b=AKEftpxIyn6Zz0g19+TAB9cwU/rZG23iiFA7vY6CKI0d/PMgpNx/nVhbXrIP5EyQvp jryuya5zavvsZFi4MZLz+INyxkREV6n37S3G0ibQmg9B+hH3J6DSVLgdz9K9f5q3qYKx sIEg5Mw6AgC4vgjdg/j9iom5HNpoJ+LnWgYbSrIfZO1yUyRDakf8qX6ABH8AncTzM8i4 OvPygkDCstIBLvXwT0qPgNBUhiQdEAnO3d2nvYgx7xXpMdVTadJ1vF/LryRg6BBYWGFO xRh1UPlUOiVZEnAu2vIe9tCKdPdjYwaQlq5dZ27Arlcp4E4aMggWmRL83CDkcuSGFWOD q8tw== X-Gm-Message-State: AOAM530PCMuez2/M49XuxSb/SOIJ7uyI9rObUjQcrD/z4CLceadq+VIf 0r2IaemZtsOwbmBx12PyQuZKNQEXUpvY7Q== X-Received: by 2002:a7b:c5c1:: with SMTP id n1mr36584967wmk.83.1620649564994; Mon, 10 May 2021 05:26:04 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id d9sm22749897wrp.47.2021.05.10.05.26.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 05:26:04 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/26] hw/arm/imx25_pdk: Fix error message for invalid RAM size Date: Mon, 10 May 2021 13:25:44 +0100 Message-Id: <20210510122548.28638-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210510122548.28638-1-peter.maydell@linaro.org> References: <20210510122548.28638-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé The i.MX25 PDK board has 2 banks for SDRAM, each can address up to 256 MiB. So the total RAM usable for this board is 512M. When we ask for more we get a misleading error message: $ qemu-system-arm -M imx25-pdk -m 513M qemu-system-arm: Invalid RAM size, should be 128 MiB Update the error message to better match the reality: $ qemu-system-arm -M imx25-pdk -m 513M qemu-system-arm: RAM size more than 512 MiB is not supported Fixes: bf350daae02 ("arm/imx25_pdk: drop RAM size fixup") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Igor Mammedov Message-id: 20210407225608.1882855-1-f4bug@amsat.org Signed-off-by: Peter Maydell --- hw/arm/imx25_pdk.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c index 11426e5ec0c..bd16acd4d9f 100644 --- a/hw/arm/imx25_pdk.c +++ b/hw/arm/imx25_pdk.c @@ -65,7 +65,6 @@ static struct arm_boot_info imx25_pdk_binfo; static void imx25_pdk_init(MachineState *machine) { - MachineClass *mc = MACHINE_GET_CLASS(machine); IMX25PDK *s = g_new0(IMX25PDK, 1); unsigned int ram_size; unsigned int alias_offset; @@ -77,8 +76,8 @@ static void imx25_pdk_init(MachineState *machine) /* We need to initialize our memory */ if (machine->ram_size > (FSL_IMX25_SDRAM0_SIZE + FSL_IMX25_SDRAM1_SIZE)) { - char *sz = size_to_str(mc->default_ram_size); - error_report("Invalid RAM size, should be %s", sz); + char *sz = size_to_str(FSL_IMX25_SDRAM0_SIZE + FSL_IMX25_SDRAM1_SIZE); + error_report("RAM size more than %s is not supported", sz); g_free(sz); exit(EXIT_FAILURE); }