From patchwork Thu Feb 13 14:41:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 183392 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp647966ile; Thu, 13 Feb 2020 07:17:19 -0800 (PST) X-Google-Smtp-Source: APXvYqwZXddcjygxOOoBWRv3ctUClS/UT2p9pITdEiUgnAD7liyxYuvab3zZZL8q18GXUmGPMAeP X-Received: by 2002:a05:6214:192f:: with SMTP id es15mr12242817qvb.219.1581607039764; Thu, 13 Feb 2020 07:17:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581607039; cv=none; d=google.com; s=arc-20160816; b=08+TuurRYNTQJpVWELBDcCH/HgcGa3KKf8v3L+65wrSxZ71JwMdc9B01i5Coj0+09l u2jLO8kKW18a51QdGXJKac1OsHpS5LCtmRswLNVN0o9dx54Hbkt5ZkZbmtH1r3b5MOGt QeF5CDdO8nHTviivSALdTtAfnDk3SE9f1ShuhfIymvqS0dcjt25BN0CMKAlMwPERGLbZ Dtf9Jl2e5CTyM+lQ+1gZQp+f+p2r0cRmZGGSN4/Py3entHaleLbp4YRC5RwGZ2Xavvpq wCkrGe1zjY5WwqDoB9tXlIAdpQcZbgB383QUkqUp6E5+3k4Uu7h2Cq58YySfnjwN1hDn HkYw== 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=E0vrTAwIv6ImSaBw0xYQfg0MNy/68XI1n9XoOMzTabQ=; b=Bq2pM2eyPIaxvVsv5u3ScZQmbYzU5F6DEMCcNraMk0OiAh0JvNBx+D2BzNjw9v8NPj +qs2wD9KUoKfiKANGHkx/5mvK/6zBa7EV/eOHDbOQap1pwnV8zzuMFivaqR24/+WbIbZ uI7Ihm+yu5lPq2NuBukCZ3KKiPJAkBsUSSlv/JZshoRC+ifwdVbe/2Mq8yY91SdEuQSH GvVtL6CdghoqGyV30oZUi7WKAyXtvCdNpu9317i5bx1To5/FHf3te+IUeO6CJ+aXIB2f ua1GnWG2A8K6e7aBnbVolGv2375iBWLAWLOcMSh5sxBs7a7NnddI2slxRtAP6dzksQen LQww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=leOF+Zv+; 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 m23si1332998qtn.132.2020.02.13.07.17.19 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Feb 2020 07:17:19 -0800 (PST) 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=leOF+Zv+; 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]:54506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2GEx-0008Fd-81 for patch@linaro.org; Thu, 13 Feb 2020 10:17:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60602) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2FhP-0004qW-FZ for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2FhN-0002Qc-VS for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:39 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35585) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2FhN-0002MR-Ms for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:37 -0500 Received: by mail-wr1-x434.google.com with SMTP id w12so6998098wrt.2 for ; Thu, 13 Feb 2020 06:42:37 -0800 (PST) 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=E0vrTAwIv6ImSaBw0xYQfg0MNy/68XI1n9XoOMzTabQ=; b=leOF+Zv+h/f/cgJwoXkO7fyLLgpd1G/AvHaIOQTmeB+QRKIpp97l9rqpS/NeHABKZK 9xjLKlprdsWUtNtLgjMh4r3ZdSxVbdEN0y/dTt8JlupyhRk3aG/ZlwP+kgvfbzdQWKmW HHq02wsS51AYwotUO6XTntiogGEkeprma1EDpqswHOu90T1XiVikGM4ZZLDLncrYN0RP 5YBTSfSxQwDgrfupYPVCMY3G/NJAZUfNlOw6dat5Dm6gPVlP9r5PrJN0BviydZQIhDTN anHX6YT8tYTCteyGg69uWCbhKawMhM7UV5O+jCKEa6Q/8J0pcfbyW4H8aaqQSxBos2Cw OGmw== 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=E0vrTAwIv6ImSaBw0xYQfg0MNy/68XI1n9XoOMzTabQ=; b=aXY43MpKXqnKhBrmj/LaixrHPPJzQbjmRhEhTVpQI4iIgCJ9j2zqIj3OdWtRd5F4hM eMNXTnje1KHD4wDLhsI9Wkc/o5DCSffcXiRtbGPXwf62XqmCQHCO3omrmhjd9EpH3uTl Zk+madHPyp2RxQZUsBkBt5mFUDWUAByVgcYD9NZiGeyf1suDiW6Gk9zvqz2snjm5x3mL HReenvVZxv/rtA49fHvfmllv1GSNLSJhU27glf6pp76T3488ASGzNTMjWSisUJAuMHnj wXATQ3DJNCSP2T/CI9QVOE3D/zI3JrmGshxCm5HFyCNujN43ojjS3mRhhQlg/RvKpY3O TtRA== X-Gm-Message-State: APjAAAVh+tnezk2T34KwX05reSYi/jgDGqr1n36XSJWM1+Lcr5ozvXXv YxocCzllVm/9BIUWo7uyzXoYIiVAnlY= X-Received: by 2002:a5d:4d4a:: with SMTP id a10mr23351406wru.220.1581604954486; Thu, 13 Feb 2020 06:42:34 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id e22sm3362454wme.45.2020.02.13.06.42.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 06:42:33 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 42/46] hw/arm/raspi: Set default RAM size to size encoded in board revision Date: Thu, 13 Feb 2020 14:41:41 +0000 Message-Id: <20200213144145.818-43-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213144145.818-1-peter.maydell@linaro.org> References: <20200213144145.818-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::434 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é We added a helper to extract the RAM size from the board revision, and made board_rev a field of RaspiMachineClass. The class_init() can now use the helper to extract from the board revision the board-specific amount of RAM. Signed-off-by: Philippe Mathieu-Daudé Message-id: 20200208165645.15657-11-f4bug@amsat.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/raspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index 1628b0dda7c..f0dcffbc2ef 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -296,7 +296,7 @@ static void raspi2_machine_class_init(ObjectClass *oc, void *data) mc->max_cpus = BCM283X_NCPUS; mc->min_cpus = BCM283X_NCPUS; mc->default_cpus = BCM283X_NCPUS; - mc->default_ram_size = 1 * GiB; + mc->default_ram_size = board_ram_size(board_rev); mc->ignore_memory_transaction_failures = true; }; @@ -317,7 +317,7 @@ static void raspi3_machine_class_init(ObjectClass *oc, void *data) mc->max_cpus = BCM283X_NCPUS; mc->min_cpus = BCM283X_NCPUS; mc->default_cpus = BCM283X_NCPUS; - mc->default_ram_size = 1 * GiB; + mc->default_ram_size = board_ram_size(board_rev); } #endif