From nobody Mon Feb 9 02:52:06 2026 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=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579781833; cv=none; d=zohomail.com; s=zohoarc; b=YuCK3YW+lsCbkMJCheyzHdRm8JFNT2A+GAmFt6HJUxDFS+Y4RMR1uhfSCORbTEiOtAYhMIDOs0FgWH7GzOXUWkHLcn01plhCOaWhs2eE6LcFJV0HUPtHjHvJ2nAc3vzvPbUY3xSDztDUN+43n0BXhn9dXpaOYGsBfljlNdSdr4I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579781833; h=Content-Type:Content-Transfer-Encoding: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=BodJZ2/t7zg+j82vxZS/xF8BVbdEormj2ANyrNQn15g=; b=V2/p2bBR9cc5rE9XNpM7gRv0RMI4Gx+jkmLizW3GfJS32YmVTQXsqR4IH066ZjYH4NB55B0sJIDNY+3wkEonkBJ47taLpBuFiNGM+lysd4GfzyZzTwjYZHbQ8m+BLihJOAmJ2vQ0k2ODX3Mbnuoy0pgXFu1E/GHnP+YWcakAZig= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1579781833577331.0360742660205; Thu, 23 Jan 2020 04:17:13 -0800 (PST) Received: from localhost ([::1]:56022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iubQ7-0006LX-MZ for importer@patchew.org; Thu, 23 Jan 2020 07:17:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35706) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuasV-0006OY-3I for qemu-devel@nongnu.org; Thu, 23 Jan 2020 06:42:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuasT-0004ZF-Vi for qemu-devel@nongnu.org; Thu, 23 Jan 2020 06:42:26 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:25646 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iuasT-0004Yu-RP for qemu-devel@nongnu.org; Thu, 23 Jan 2020 06:42:25 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-86-OqESnZ9KNqet1hcScIcWtg-1; Thu, 23 Jan 2020 06:42:23 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B5F251005516 for ; Thu, 23 Jan 2020 11:42:22 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38FCF10016EB for ; Thu, 23 Jan 2020 11:42:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579779745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BodJZ2/t7zg+j82vxZS/xF8BVbdEormj2ANyrNQn15g=; b=ephoh5PxaU/7x88z0zEY8lY2QfhJI2mCXBjdnUDc3J4fvc3AdRqIYfa7u6Voku0+S5zAiu nyLoekT6k5pfMGUdRfX6gigKiPm5yhAKDs67vm2G6LJCDyNfPm634LQuFgziYCaix1S85r 6lC8NA5wI+hGJTLC+ZCJfmnEtoiFm30= From: Igor Mammedov To: qemu-devel@nongnu.org Subject: [PATCH REPOST v3 40/80] hw/hppa/machine: Restrict the total memory size to 3GB Date: Thu, 23 Jan 2020 12:38:05 +0100 Message-Id: <1579779525-20065-41-git-send-email-imammedo@redhat.com> In-Reply-To: <1579779525-20065-1-git-send-email-imammedo@redhat.com> References: <1579779525-20065-1-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: OqESnZ9KNqet1hcScIcWtg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Acked-by: Helge Deller Signed-off-by: Igor Mammedov --- 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 6775d87..119ae4d 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -90,12 +90,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.7.4