From nobody Tue May 21 06:30:03 2024 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=1578528408; cv=none; d=zohomail.com; s=zohoarc; b=TBcLNVXHgElMen/TcreniwHx89ZI0tQltQ4idMft+h24rQXPZ94/rKoXaRVImvvBayVw3y7rWf7BYoLxhMplKzNBldjhuf7tgayZgF6zLIya7tIrMGocsqW2pbL2EALWTJ/rxoGhlel+KEt0fyjupmD5bn/1hsWYFlWknSIzlvw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578528408; 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=losV8OmGXQZ4fRFeT4I2pKpzAi0vNXizsX/DL7svRT4=; b=DJsvchnTzztS7QvgsRzX6710wRVV++HCuWdNY7Jt6CzLvC5+i+fuykEZRQanecjy7K9ZyyWeOt4Cnu3I8nbrux3H7lttBvIn/JcV81rS+aG8Xjas/DnHcZ9+gSbpu7xwKMoFNDuC5/m4CTE7cR9NW0e8j3XuyGORt1H7kEuryJo= 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 1578528408414890.0700392294755; Wed, 8 Jan 2020 16:06:48 -0800 (PST) Received: from localhost ([::1]:50634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipLLa-000547-WE for importer@patchew.org; Wed, 08 Jan 2020 19:06:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39958) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipLKN-0003P2-0J for qemu-devel@nongnu.org; Wed, 08 Jan 2020 19:05:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipLKL-0007TM-Tm for qemu-devel@nongnu.org; Wed, 08 Jan 2020 19:05:30 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:50631) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipLKL-0007RQ-NZ for qemu-devel@nongnu.org; Wed, 08 Jan 2020 19:05:29 -0500 Received: by mail-wm1-x344.google.com with SMTP id a5so908151wmb.0 for ; Wed, 08 Jan 2020 16:05:29 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 16:05:28 -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=losV8OmGXQZ4fRFeT4I2pKpzAi0vNXizsX/DL7svRT4=; b=iO9XO2CSfVfVP81gziM8Lql/NcDW3IhHH1R+kzPxlFnXs2sFMSTDdNEYMQ/5jgGuLS JYGRKyNnaPmEf34xOUqoeCqsWmQLtifXM6GjEvltF5qy42N44vZm/Vz4umW3HPaMR4ac ZwXArccoyYMdMJJv6QTIstqyK8Pi8o4DO2GKlZjiwBmsilR9QoCfHwtZDODoAcAgryMO h4FGt1p5NUW7UmQeHOT5vY4jXN/AJHDI0rN9Gkb4PIR6b9PUcUIwWoLDaamb2/T0s0fR 6jadtWu4hSznRamjS51W7vQ5kYfsbyse50mgM3FAY32GDnpP9ugU1kZuMQ/7ekskCreh R1xA== 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=losV8OmGXQZ4fRFeT4I2pKpzAi0vNXizsX/DL7svRT4=; b=rx0swsN18UEVHby+NEuOcOSyhpvGNtaLB30vvmaZ2swMQMzcgoyTBY8Kgd7ZOlT+r1 TMxlH1LuGqY0hXQfPczFAWNc3zwSwJnk00Wo7i4XZ/r/PKLXSkqbLG3u8oI88vJHvw8+ 7VlLgRQPt6kh7kyJTfx+UYyjcmLhcE9omVPjgH6Qot0sgY94vf7ToYIYgLm158EEi/mz hCR8I2UfVt7t7JYikPSFCVVHNp0Qs9bDMpIvDs51YcuozEe/j12JbQfKrr+jQPAaSea3 Hf61TETw7O/HQM25eKTTh/jYyf3/+2vyUttHGcUfAJBVHsdIlcdydUrYnTVhZCEDhVBd 8sQw== X-Gm-Message-State: APjAAAVcR8besC4yAHA9xrv/XUDS6ecETj3N7PDhQniOycnZW5rG8y7w z1yEQ+4kIF2cPE5Bhd+Y3/c= X-Google-Smtp-Source: APXvYqwIFU+6X/hq463dA/joS0koW8zG1FIDm9TeEMHDAM8nKrf/fLlheaxYyMski8JJB5xMwTY69Q== X-Received: by 2002:a1c:2187:: with SMTP id h129mr1290514wmh.44.1578528328656; Wed, 08 Jan 2020 16:05:28 -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 1/3] hw/hppa/machine: Correctly check the firmware is in PDC range Date: Thu, 9 Jan 2020 01:05:23 +0100 Message-Id: <20200109000525.24744-2-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 firmware has to reside in the PDC range. If the Elf file expects to load it below FIRMWARE_START, it is incorrect, regardless the RAM size. Acked-by: Helge Deller Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/hppa/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 5d0de26140..6775d879f8 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -155,7 +155,7 @@ static void machine_hppa_init(MachineState *machine) qemu_log_mask(CPU_LOG_PAGE, "Firmware loaded at 0x%08" PRIx64 "-0x%08" PRIx64 ", entry at 0x%08" PRIx64 ".\n", firmware_low, firmware_high, firmware_entry); - if (firmware_low < ram_size || firmware_high >=3D FIRMWARE_END) { + if (firmware_low < FIRMWARE_START || firmware_high >=3D FIRMWARE_END) { error_report("Firmware overlaps with memory or IO space"); exit(1); } --=20 2.21.1 From nobody Tue May 21 06:30:03 2024 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 Acked-by: Helge Deller Reviewed-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 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 From nobody Tue May 21 06:30:03 2024 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=1578528516; cv=none; d=zohomail.com; s=zohoarc; b=BvGLjXhMm3HzK98DdLR84px4UD5e7FP1g43E93Kxxz1pJahRUXF7LlDzPT5yMu0DHFtDEwU6KYcNjWASyN/ox1g63VmwpfxBxYYPag3YxC0gbCaKt7IvVrwVN//sVzHCXvmbEYlQS3eqhJTmTGNoN11DSe6zkk3kAqNihh0X0C8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578528516; 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=xszouJcJkyjO2tEfTiOLX/vhd4HLvHS2IcH8OxDqlko=; b=DgoxhNBozWAGQEUy9KizFaamxeNQe2HtsTCQu8M/4iJxgCaUq4gXRenXsmCppzUvFR30N+hackMqR+dQ+eUZNAdleERaw7rIATNWqaDyEYbLvK90vCeWwU5plgHN7xmn8rYjW6SW3BN6DXXgupPXgepMpzT8HgnDlR88bkKlM6Y= 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 1578528516460314.44190022010616; Wed, 8 Jan 2020 16:08:36 -0800 (PST) Received: from localhost ([::1]:50646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipLNL-0007Fg-Aa for importer@patchew.org; Wed, 08 Jan 2020 19:08:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40307) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipLKQ-0003WC-QU for qemu-devel@nongnu.org; Wed, 08 Jan 2020 19:05:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipLKP-0007a0-LG for qemu-devel@nongnu.org; Wed, 08 Jan 2020 19:05:34 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:54989) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipLKP-0007Xo-1H for qemu-devel@nongnu.org; Wed, 08 Jan 2020 19:05:33 -0500 Received: by mail-wm1-x343.google.com with SMTP id b19so880834wmj.4 for ; Wed, 08 Jan 2020 16:05:32 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 16:05:31 -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=xszouJcJkyjO2tEfTiOLX/vhd4HLvHS2IcH8OxDqlko=; b=q96i1pTieYQQbkcGDWfPkSngaBAENYitOvkNatt5bnrM4SXyCOvA30Xx8GWKyJBAR/ mNCaFP9ZojOFeuuwqIGQgeLXk5LZWxHMR1zowFH3f8pY23HtvaGYl+doN6elUlaDZndt 7KsKyrDSp6oY2S5MjrokYaqCkVDvKQyvYpdTrYPbmxPNZAL732vnlhP/2/U5B+IUNgCI I8pMcuymqGUWKBtc9k8cs/jxZXffGAGr/6G5OsbrAZaC3P98xRQFzBASL80cMkTfo6AM YCnSnMf1dbeg56gYsviFok52SmlSI0WVLKwyQOwFmvoEyXgjBPQkTv7lqslSZVhfUW/o YdLg== 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=xszouJcJkyjO2tEfTiOLX/vhd4HLvHS2IcH8OxDqlko=; b=euRw+O9xNCRPTkEcOpkfu+Gkp2JN/MM4vontz43zqO+RbS/QuLjMnW2t89cUxd5OWM ts2l1th6zPw+fnVYumlg0/XmiZg9dWeQemtjsi4BLGuIY2wnQVvKN4GMT61dkg5ydErn DWOlWaJedgh4HOkR5Ef6A627HAjpiC6Hqhn3scSDruCb4jS4I6P3FpuGCckQJSl+qKx8 ud7BYNEAIbPNO1KFGBVbioaxDX/SDpGSgvpV9/BxMeYE/ZqNW2OqQctxjrAlAbDbtMQf 10IdwGuMEgXGjbypKSByvfqzpfm9a6VtIPEaj1YFa6HkXu+g4RzE9U5yhwkUvzYsro6u T9TA== X-Gm-Message-State: APjAAAVTjy2CBrbJYhK9LbenqtGsMDm1/bT1Qr8OaiiTaShtdF+fwLHo VfP+yATbz9lGcJf76QVoVv0= X-Google-Smtp-Source: APXvYqz/FkI1U+yEbOFWZrdyIYnBoL/jqKkpMfx1pOFCA9Crk5ntR0n+WqAGKcas9iTfHCarXQMNZQ== X-Received: by 2002:a1c:22c6:: with SMTP id i189mr1289206wmi.15.1578528332085; Wed, 08 Jan 2020 16:05:32 -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 3/3] hw/hppa/machine: Map the PDC memory region with higher priority Date: Thu, 9 Jan 2020 01:05:25 +0100 Message-Id: <20200109000525.24744-4-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::343 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 region in range [0xf0000000 - 0xf1000000] is the PDC area (Processor Dependent Code), where the firmware is loaded. This region has higher priority than the main memory. When the machine has more than 3840MB of RAM, there is an overlap. Since the PDC is closer to the CPU in the bus hierarchy, it gets accessed first, and the CPU does not have access to the RAM in this range. To model the same behavior and keep a simple memory layout, reduce the priority of the RAM region. The PDC region ends overlapping the RAM. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Helge Deller Reviewed-by: Richard Henderson --- hw/hppa/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 119ae4d3c8..810e6718d9 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -98,7 +98,7 @@ static void machine_hppa_init(MachineState *machine) ram_region =3D g_new(MemoryRegion, 1); memory_region_allocate_system_memory(ram_region, OBJECT(machine), "ram", ram_size); - memory_region_add_subregion(addr_space, 0, ram_region); + memory_region_add_subregion_overlap(addr_space, 0, ram_region, -1); =20 /* Init Dino (PCI host bus chip). */ pci_bus =3D dino_init(addr_space, &rtc_irq, &serial_irq); --=20 2.21.1