From nobody Wed Dec 17 00:02:43 2025 Delivered-To: importer2@patchew.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+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1675313641; cv=none; d=zohomail.com; s=zohoarc; b=SeC/KD0DMDPNTZ38ECxyaxD0KLEpyd7BeVIfxj1ST303SuiEpJ9EJk2qyUl5bHa0ElynkBv0/5xuugxvFhxEK5SsCdrAeN0700+26lfPL7XxBgcJ6vL90AoyhwgP3UvS+Khq8xA7g7WRnhJilELYganO2o1/RJX9UsicobubUeQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675313641; h=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=0OK5MGUXpJ5dOBb1EDkd0/AV6RjPH0TTmkyNQ2mOQJc=; b=MgDcmbD7U3VJZUNoos7Kvz94HvfUpSTxOQs0T1REf1cN4382zuTdswaWwA51x9eLAzUIlonFSuSBc2xAGAJUSf90btc72lhFGwQMqk4jkCPQLK5LTyWHilqGpWB8+h647mZ8sDLZJT5iaBqFcsQEECEDOq+ddLzJOZ+B4SZn35E= 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+importer2=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 1675313641318358.85644254470844; Wed, 1 Feb 2023 20:54:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNRaX-0004Qv-Ry; Wed, 01 Feb 2023 23:52:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNRaT-0004PL-DF for qemu-devel@nongnu.org; Wed, 01 Feb 2023 23:52:41 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNRaR-0001DG-Ne for qemu-devel@nongnu.org; Wed, 01 Feb 2023 23:52:41 -0500 Received: by mail-pj1-x102e.google.com with SMTP id l4-20020a17090a850400b0023013402671so4427874pjn.5 for ; Wed, 01 Feb 2023 20:52:39 -0800 (PST) Received: from localhost.localdomain ([49.206.14.226]) by smtp.gmail.com with ESMTPSA id w10-20020a170902d70a00b001965540395fsm11222265ply.105.2023.02.01.20.52.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 20:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0OK5MGUXpJ5dOBb1EDkd0/AV6RjPH0TTmkyNQ2mOQJc=; b=B+xjeku/YqMxE+yptWNKXY8r8cmeAzXoTTbQJV7acmbHdNZWM6IvigDzGKlUnKTY2I 4dZZvILiYtbOAtC+epEf1jK9w9FEdoiILwRMHOA+Wec/ep9vL+wxTOuJaOq0mHVsA591 lKRbuDiV5jOERzYbhvqNaYL5BI85ASoysAmVgN5loXp+lZJ9/WZyyRXi4Eyq0Ts2u66Z eGhThikcvUsfmcZSRb/g1whyXTf9X2PSO6lBQURSBxM9o6UE2k6+fv6wMCmHxnrc+iDf Ogs4YmZfG8pD6LmUSyMrkwjJKqFgqMDzA17DYqakiYU+4jj7vFumMoeD8sOIl2/mZMxr YVWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0OK5MGUXpJ5dOBb1EDkd0/AV6RjPH0TTmkyNQ2mOQJc=; b=GaxdBy/Qr8h/hxU6l0fQTd5hyZ1WSoNPMZIKud9isqxjPKWt6Y6AnDrXqoHk2zbFIE 2gsZ/sxT2dVI4ez5ZngsWQ2o3+7at+W33PbH8JI+xVzNtnlbzh67KpZnVodZSUDZ8DVj 2iXbL7hFhA5Lq7GIqeXDUAHdIkQLm4xNQsq+CQB9WnEm8Cec8kZGfm1NlJ7SAFKhyAKb /+SFDoFXJwCsPLkVK8bchOREhchPobDKdJ7HwFD6BsBBmAUUpPGHE+pobMUSbsYTDq+G g8upwwxC7c5bDCzi4o9AjgEQYBD82IHd0xfKRfZM9XKrcIw81pKg3QKpHChGHGKiddIq KziA== X-Gm-Message-State: AO0yUKXhKR8+UxCPbB5cKXpiewJdBH8oDQUMB639XXZz29iWoCN1yBuI 2tYIu9889FWd4Yb3KBv/rsS/rg== X-Google-Smtp-Source: AK7set9F4HIcfMVzailtXxZNiDgapKPjYwbZriRoksG5Qr+wNiihM04E4DXl7IIPD/XtFazciSAA/Q== X-Received: by 2002:a17:902:cf49:b0:192:b2d3:4fc8 with SMTP id e9-20020a170902cf4900b00192b2d34fc8mr3818150plg.1.1675313558487; Wed, 01 Feb 2023 20:52:38 -0800 (PST) From: Sunil V L To: Palmer Dabbelt , Alistair Francis , Bin Meng Cc: qemu-riscv@nongnu.org, qemu-devel@nongnu.org, Andrew Jones , Anup Patel , Atish Kumar Patra , Sunil V L Subject: [PATCH 03/10] hw/riscv/virt: Add memmap pointer to RiscVVirtState Date: Thu, 2 Feb 2023 10:22:16 +0530 Message-Id: <20230202045223.2594627-4-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230202045223.2594627-1-sunilvl@ventanamicro.com> References: <20230202045223.2594627-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=sunilvl@ventanamicro.com; helo=mail-pj1-x102e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ventanamicro.com) X-ZM-MESSAGEID: 1675313641825100001 Content-Type: text/plain; charset="utf-8" memmap needs to be exported outside of virt.c so that modules like acpi can use it. Hence, add a pointer field in RiscVVirtState structure and initialize it with the memorymap. Signed-off-by: Sunil V L Acked-by: Alistair Francis Reviewed-by: Bin Meng --- hw/riscv/virt.c | 2 ++ include/hw/riscv/virt.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 84962962ff..26caea59ff 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1459,6 +1459,8 @@ static void virt_machine_init(MachineState *machine) ROUND_UP(virt_high_pcie_memmap.base, virt_high_pcie_memmap.siz= e); } =20 + s->memmap =3D virt_memmap; + /* register system main memory (actual RAM) */ memory_region_add_subregion(system_memory, memmap[VIRT_DRAM].base, machine->ram); diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h index 62efebaa32..379501edcc 100644 --- a/include/hw/riscv/virt.h +++ b/include/hw/riscv/virt.h @@ -59,6 +59,7 @@ struct RISCVVirtState { char *oem_id; char *oem_table_id; OnOffAuto acpi; + const MemMapEntry *memmap; }; =20 enum { --=20 2.38.0