From patchwork Mon Sep 30 15:13:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13816602 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80246CE835B for ; Mon, 30 Sep 2024 15:13:47 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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; remove_identity_mapping(); @@ -54,6 +55,9 @@ void __init noreturn start_xen(unsigned long bootcpu_id, BUG_ON(!xen_bootmodule); + fdt_size = boot_fdt_info(device_tree_flattened, dtb_addr); + BUG_ON(!fdt_size); + printk("All set up\n"); machine_halt();