From nobody Fri Nov 22 11:32:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1727709236; cv=none; d=zohomail.com; s=zohoarc; b=F/lRncYtXxp5+cOMEMu/YNhRj2fSQuNeQ/IJQc3NAJuDuVOLS8MiRIRtHkzclO4iWqITYa3Bsq7Tw4r/DC82cWMsxnpdJHpf+NikuHCXyNRUQNthes4jc+BRiIaB+460BZzFiRDYB5Kuxou3eZSA/9zC5+i/2NtpUGW5A9pQJME= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727709236; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8Anb/qV3QvWfFTzlQtwYQiItrfm0IhRDXQls+NkaMkQ=; b=QvWJnUcwVQaO/x8FqJJnhd9Ez0Bxv1cbnHfun+7sgvD222KWaFgoyOZtUvpK3txrXJObCzl+rGZYVubytJghUM5qPFlzMMYL9+nzes0w9ie7H607W5Gp7tkH1GS3Ot5FEJHNE+osz/89fuBgae5JL8y9qAFL27o6zWBGA6Q3Lq0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1727709236678109.82283245913732; Mon, 30 Sep 2024 08:13:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.807458.1218942 (Exim 4.92) (envelope-from ) id 1svI5V-0006Pw-Gx; Mon, 30 Sep 2024 15:13:25 +0000 Received: by outflank-mailman (output) from mailman id 807458.1218942; Mon, 30 Sep 2024 15:13:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1svI5V-0006Pn-Du; Mon, 30 Sep 2024 15:13:25 +0000 Received: by outflank-mailman (input) for mailman id 807458; Mon, 30 Sep 2024 15:13:24 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1svI5U-0006B5-Bw for xen-devel@lists.xenproject.org; Mon, 30 Sep 2024 15:13:24 +0000 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [2a00:1450:4864:20::12f]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 887bc0ee-7f3e-11ef-99a2-01e77a169b0f; Mon, 30 Sep 2024 17:13:22 +0200 (CEST) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5398cc2fcb7so2120402e87.1 for ; Mon, 30 Sep 2024 08:13:22 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5398fd3533asm677366e87.133.2024.09.30.08.13.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 08:13:21 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 887bc0ee-7f3e-11ef-99a2-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727709202; x=1728314002; darn=lists.xenproject.org; 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=8Anb/qV3QvWfFTzlQtwYQiItrfm0IhRDXQls+NkaMkQ=; b=FtSmkNykxoUMPCFWPWIuayB2yYicM1bhqS0um/6JN1jbaWYNHsC0ynm8gXOimOw/+a Eh0mwjuAP+vviosueUcI1R+LKc12TQ3znl/I0zcW/TP3X6DZi0fg6wnnA9bNfoL2FqFC iBK4AWQYSz3v0mACXdkyksdMl00RopBf/rdUQs59Ih4UoWTuDd5k7RXFgAa3fMvq/OXV vgjeiYh5gMx7G4fKy5M6XSUuCQeTDP+ANFYhLYGexnL5LyLw9T0jRUQmDDtmdBuwsNHL mrONAG9K4XCC3cFiTVYMIA4FSpv/wci0Is1Hhcq4amqgghE2GGaypL2l/G8eDno1OodF KAXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727709202; x=1728314002; 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=8Anb/qV3QvWfFTzlQtwYQiItrfm0IhRDXQls+NkaMkQ=; b=FVQYd/a5XfYTRtGHHQ5SgxRGD9NNYuUI0VDbUsq8QTY11Px6DkC4ZOAcvZadOJGZb5 xKOSf8j5/D9Kby+3Xgq3yWfCali9RYoe1vPPURwR9DCP9KUyw38+s/n7pLACA3oPN6bN K8S7cr1B0W2WB6+RtxK8B9jqWX5kX9JLJUSxmIoEQJqvV8NS40H/88/Cobu5e1FxSiZo ToKu9IQzn3Z85vGnObRMh2dyU4SEjVzIwD+jXAu69+dT8hQ0AhW7KHV4l3Dz7pVBhTiw DUfURwD/wotBZb7uy/xUxMdzdB8+5Ubfffj00lbbjNgUSWLG772JRCQfUnEtw557IDf5 hsfw== X-Gm-Message-State: AOJu0YxsHyv0QuuxwVI4qa/rB6B2nH4nkqqwDO9C7fvY3edZLXqHCls8 qx826kFHAp1DKNnxBjc34jVZV/vONvU/AmMD2UlDSxmlO5CycnZlZmbcCA== X-Google-Smtp-Source: AGHT+IEvv/cClY1JjRAGYy2KS+jlTzv21dIRhvD6nZxZJJuE02sn9fbZEN6aMQVoJmUw1zoS5Rp+Ww== X-Received: by 2002:a05:6512:3a89:b0:530:ab86:1e with SMTP id 2adb3069b0e04-5389fc33075mr6317279e87.6.1727709201568; Mon, 30 Sep 2024 08:13:21 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Alistair Francis , Bob Eshleman , Connor Davis , Andrew Cooper , Jan Beulich , Julien Grall , Stefano Stabellini Subject: [PATCH v1 1/2] xen/riscv: initialize bootinfo from dtb Date: Mon, 30 Sep 2024 17:13:17 +0200 Message-ID: X-Mailer: git-send-email 2.46.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1727709237791116600 Content-Type: text/plain; charset="utf-8" Parse DTB during startup, allowing memory banks and reserved memory regions to be set up, along with early device tree node ( chosen, "xen,domain", "reserved-memory", etc ) handling. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 39375b3366..a8d8ef793d 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -28,6 +28,7 @@ void __init noreturn start_xen(unsigned long bootcpu_id, paddr_t dtb_addr) { struct bootmodule *xen_bootmodule; + size_t fdt_size; =20 remove_identity_mapping(); =20 @@ -54,6 +55,9 @@ void __init noreturn start_xen(unsigned long bootcpu_id, =20 BUG_ON(!xen_bootmodule); =20 + fdt_size =3D boot_fdt_info(device_tree_flattened, dtb_addr); + BUG_ON(!fdt_size); + printk("All set up\n"); =20 machine_halt(); --=20 2.46.1