From nobody Tue Feb 10 03:55:55 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=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 ARC-Seal: i=1; a=rsa-sha256; t=1578528697; cv=none; d=zohomail.com; s=zohoarc; b=Ne3Lebn//ljH4kzbIkwLUuzJwHQluqCGFl2m8mSprYM6EdGlIjgfmrEuNQjp8mWrLge554cgBLTcYVJvSw94JZKSWniIMI9+b7gLZEegRmyiyRO0u5W0NjSW+6JlSAYhph3v/iLAH40tndtenVMyvokPR8FNXsclUoFoTQUKQUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578528697; 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=F4P/S+s15FJjyYtT27INL9ujLUrPm0+0HaDqwxBvR58=; b=DENFmqlUeZRpTVQwRCarGua6ivLRSRDfMJDKfEVlXz5aCRV4RdRQqGt4TnTeXKUhPeK9Q9mJlzzkzyAGQeRm43MCF0Lq70EzjmfXjkdObvrOx/TRifG5ad71KfR7vENp8oPcyaX61WGqAGtQWCe/lESi56MFqlGWdbAgL3EEDIo= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1578528697627903.0368364282131; Wed, 8 Jan 2020 16:11:37 -0800 (PST) Received: from localhost ([::1]:50680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipLQG-0001mZ-GE for importer@patchew.org; Wed, 08 Jan 2020 19:11:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40087) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipLKO-0003RU-DE for qemu-devel@nongnu.org; Wed, 08 Jan 2020 19:05:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipLKN-0007W8-9w for qemu-devel@nongnu.org; Wed, 08 Jan 2020 19:05:32 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:53516) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipLKN-0007UT-2a for qemu-devel@nongnu.org; Wed, 08 Jan 2020 19:05:31 -0500 Received: by mail-wm1-x344.google.com with SMTP id m24so890995wmc.3 for ; Wed, 08 Jan 2020 16:05:30 -0800 (PST) Received: from x1w.redhat.com (113.red-83-57-172.dynamicip.rima-tde.net. [83.57.172.113]) by smtp.gmail.com with ESMTPSA id w13sm5947827wru.38.2020.01.08.16.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 16:05:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F4P/S+s15FJjyYtT27INL9ujLUrPm0+0HaDqwxBvR58=; b=sUwFEXbC1sqXuDZ8wWAiSerV80/6vJJJ1TApYYeE588P3i/QggUgEK+BaG9M0AcYnT zSylRTWPIJoPTkydnyOqyjR5E1lKZJX3phNy+l62qBB9j+6ZUAzCoKim8VwPWecMrVY8 pl0PBuXj1VSmTBrmSR5xxIuhl5E2DORiyn8TPjQ1QZRKMv/uFacCKLlw3YergzWP2FD6 8GymagH3IP4pV744NZX5uTD2XupZ0hSQUlsYXcVVvhISwOQk09tPUmvNQunJH/DZ8JGx VfEWUZmUl92D5xHp85ntVu8QQMVFn3iDxYHM14baH07kcOtET06wWrfgiqs1KfENiYH6 nB7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=F4P/S+s15FJjyYtT27INL9ujLUrPm0+0HaDqwxBvR58=; b=fo0rXZCEAc9DjpaEq8vyc0Nd3A9kCH/iFqUHIlh47UwYC1HxAMiqjBekEDr80wZPvb T42hdqmb/lk7DmjPL0AAZi+IgmYsb0RFGCPkzFGIgqSbsyXTKGRAd5EpF/kQeR8koHVo yAFIoAz2R2b+BbebABQMTrTHBulH71Wa5gwFbcfrymUTLnXPq0qYAjc85A17m4B8p9KJ I9t75lXAYBFx0c68YPVDSmFTeg8z6YjQrswhI2VWvAKcWUHm1MUAvvRrehRdK7UmwH83 Km/IxXsVs6PyCu6Md3bn7KWy+VrPR9bFo0DUYxXwC+XUxPTSlsLuufLR3Ck2pTwuSSYE vWqg== X-Gm-Message-State: APjAAAUwOh3KenvCRx4U+57iF1/o6FcIVRGzzEPu+tr0XiakKdlGryxA ekvfs+V18AzXjkveJz4naLE= X-Google-Smtp-Source: APXvYqyZwiXwKc5Ny0ewnNaB3LCfjWCVcGmgVeYEUrExRjK1DyWsRyHYwvel8lbU8Pki6Z0g2jCSBg== X-Received: by 2002:a05:600c:20f:: with SMTP id 15mr1257826wmi.128.1578528330235; Wed, 08 Jan 2020 16:05:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Igor Mammedov , Helge Deller , Sven Schnelle , qemu-devel@nongnu.org Subject: [PATCH v2 2/3] hw/hppa/machine: Restrict the total memory size to 3GB Date: Thu, 9 Jan 2020 01:05:24 +0100 Message-Id: <20200109000525.24744-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200109000525.24744-1-f4bug@amsat.org> References: <20200109000525.24744-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: 2a00:1450:4864:20::344 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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 --- 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 6775d879f8..119ae4d3c8 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.21.1