From nobody Fri Oct 10 09:45:07 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1579660661; cv=none; d=zohomail.com; s=zohoarc; b=ifXCj/IY7wf6Bt8AeF01VQDXf4kmSpk0/mMYZE4fY0M8cPMRgyIS4WEm1/reG2BQm8+4fKZoyfyXSm1WyvKc6Za6FZDsgbFMNYvNNM/bo90VHqZUdM4WzFCS1PK5/PnnoinEv5buD+2ySwtFOOpGC/3JJZiAhQYLhSAPirRkZgU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579660661; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ueLaohMdpnj57qcG2jXXNJ0s60U0ZF3lFnQgnB/z7q8=; b=cYSEMjIGlIWxmLGQOoGijuz3HxFxtWByqqQqWr9HgK822/U6qxxsZtnlsZaAZgyMDXwlSQI5FPk/0+xgwrqNClQw1dvPixu8YIxMZwwG6eoFNX3XHSOnn8+EhmzzKrTmZtO07+VPLXIfg9UbYN4FJyJGx7hydPugGU3twLQwaKo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579660661175146.5493100089326; Tue, 21 Jan 2020 18:37:41 -0800 (PST) Received: from localhost ([::1]:35346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu5tj-0006IC-KK for importer@patchew.org; Tue, 21 Jan 2020 21:37:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44014) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu5pi-00017j-H6 for qemu-devel@nongnu.org; Tue, 21 Jan 2020 21:33:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iu5ph-0001xi-6D for qemu-devel@nongnu.org; Tue, 21 Jan 2020 21:33:30 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:43405) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iu5ph-0001xJ-02 for qemu-devel@nongnu.org; Tue, 21 Jan 2020 21:33:29 -0500 Received: by mail-pg1-x541.google.com with SMTP id k197so2592471pga.10 for ; Tue, 21 Jan 2020 18:33:28 -0800 (PST) Received: from localhost.localdomain (rrcs-173-198-77-92.west.biz.rr.com. [173.198.77.92]) by smtp.gmail.com with ESMTPSA id t1sm42935209pgq.23.2020.01.21.18.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 18:33:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ueLaohMdpnj57qcG2jXXNJ0s60U0ZF3lFnQgnB/z7q8=; b=ytsZGAAT2VnOCp8ZYUaqvrlFv10qZhWrBPJSxTsyttunRhLYz70ZxWkcHsk9BNJH5S Xa0yg8dDsd8ccMcL+dEPXCJan6pAIRtmz0JyrsfmRtMsS+rfPUHT8NxEuSSFLS3AjH+a BmgxUJWe3tB7oe5pr7Pj3c3EuRLf1YDaWwv7NOoMsDfL22vDOCkCHXra6PUaJKKJZjrn NRg7BJeJEv8X0EGnJb6AY+toKQFPaQwpjG67sgbYekkJEspZ3DMVHjo0UX62WnPUb/QK 82C9wnnXmgCFfUzKTWZid6qw0TOpRm1OJk8x6/NkHAFzIJ3qitJTR5zipV/EIKBYKN3g rxlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ueLaohMdpnj57qcG2jXXNJ0s60U0ZF3lFnQgnB/z7q8=; b=eYD2H8emjqpQIegCnA6m5F9gFbMNO1bTHeHtQhoKu9oh+iaUQ/W0v1eAHYRREHl4s6 1x3/ZeWoIcBDZrE5dWSa+hAYPckG+DdlI3a2NweXQusDdzSv2DNmf7FMsHQ2wXu70AUV /Z6GNQw3jKVuDaukyk1WXz9Y2xZULNyJHCnH7cyw6mLnmlvWvtHi1M1bsxp/WxH+vIec bLPY+lA6KjdyUsbhF9ylyc8j+vBqZXH50i5aWJNXIO1VF1mN8BUujvo236MhlQ1oh+k7 W6yH+/0y6VgmT6JogkkEqc02Uu2zBaY7W6lLSGfkH3a5HWxJKTS/fM+BgMmFRoLRbMD+ wA7Q== X-Gm-Message-State: APjAAAUYfuz0VozOodr5IphVz8idrxBXa/AH+MQ8n2dTwmgeOfb07s0D tOHQxonxcFNUpQAq79xscIPZJJu+Z2Q= X-Google-Smtp-Source: APXvYqyXJdlkLhLtO2U4G0l5OQafEf+90c/zOyPny2UMDMCI8QXE1BgfDwNlKerjuBYrcIAswYbkwg== X-Received: by 2002:a63:465b:: with SMTP id v27mr8934109pgk.257.1579660407743; Tue, 21 Jan 2020 18:33:27 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 09/11] hw/hppa/machine: Restrict the total memory size to 3GB Date: Tue, 21 Jan 2020 16:32:54 -1000 Message-Id: <20200122023256.27556-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200122023256.27556-1-richard.henderson@linaro.org> References: <20200122023256.27556-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 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: , Cc: peter.maydell@linaro.org, Helge Deller , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 The hardware expects DIMM slots of 1 or 2 GB, allowing up to 4 GB of memory. We want to accept the same amount of memory the hardware can deal with. DIMMs of 768MB are not available. However we have to deal with a firmware limitation: currently SeaBIOS only supports 32-bit, and expects the RAM size in a 32-bit register. When using a 4GB configuration, the 32-bit register get truncated and we report a size of 0MB to SeaBIOS, which ends halting the machine: $ qemu-system-hppa -m 4g -serial stdio SeaBIOS: Machine configured with too little memory (0 MB), minimum is 16 = MB. SeaBIOS wants SYSTEM HALT. The easiest way is to restrict the machine to 3GB of memory. Acked-by: Helge Deller Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200109000525.24744-3-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/hppa/machine.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index e57530950a..57cb4e0f34 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -92,12 +92,11 @@ static void machine_hppa_init(MachineState *machine) g_free(name); } =20 - /* Limit main memory. */ - if (ram_size > FIRMWARE_START) { - machine->ram_size =3D ram_size =3D FIRMWARE_START; - } - /* Main memory region. */ + if (machine->ram_size > 3 * GiB) { + error_report("RAM size is currently restricted to 3GB"); + exit(EXIT_FAILURE); + } ram_region =3D g_new(MemoryRegion, 1); memory_region_allocate_system_memory(ram_region, OBJECT(machine), "ram", ram_size); --=20 2.20.1