From nobody Fri Nov 22 04:33:29 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=1728574304; cv=none; d=zohomail.com; s=zohoarc; b=B6kWb87F17v/CzdmHeUXhahmRxlIX+ur9n3CBE6mW4y5yXvb8gVgJeS5rShhewMsn6xwKwu9boQDREKATg0fomDK7ILCx4eCO3tq5nu/b4m7Jy+ZOGbQ5J3LCNS7cQNb29JGSbTg70eGS6EHUBUCU5wZpqvSigobNls6Dz+vmX4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728574304; 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=MyssrSM0RuGn5wfZsY82Ll7VACleFxqgJDU1vZJJ50A=; b=LvGEHr2lIDPYnLUEv/7gh3uZiiUEhcpdwoNRyZnc+YcUM9BtTqzW8e7p+7hxUMfgzKUZYNVZFduQfv5KrOGuP69eu84FkmV4diVDBnNBFM4EDd4aTiaj5XYPHAEVk65UUgeFM83IToMEuIphlL+r4L+42fjkOD2lDHkKDKTrUt8= 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 1728574304150475.21780639889323; Thu, 10 Oct 2024 08:31:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.816299.1230498 (Exim 4.92) (envelope-from ) id 1syv84-0004pS-DO; Thu, 10 Oct 2024 15:31:04 +0000 Received: by outflank-mailman (output) from mailman id 816299.1230498; Thu, 10 Oct 2024 15:31:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1syv84-0004pL-AG; Thu, 10 Oct 2024 15:31:04 +0000 Received: by outflank-mailman (input) for mailman id 816299; Thu, 10 Oct 2024 15:31:02 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1syv82-0004b2-LG for xen-devel@lists.xenproject.org; Thu, 10 Oct 2024 15:31:02 +0000 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [2a00:1450:4864:20::232]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a7f5be9e-871c-11ef-a0bd-8be0dac302b0; Thu, 10 Oct 2024 17:31:01 +0200 (CEST) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2fad100dd9fso16554321fa.3 for ; Thu, 10 Oct 2024 08:31:01 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80f2593sm101640366b.215.2024.10.10.08.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 08:31:00 -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: a7f5be9e-871c-11ef-a0bd-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728574261; x=1729179061; 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=MyssrSM0RuGn5wfZsY82Ll7VACleFxqgJDU1vZJJ50A=; b=WAa2knGTlWkNQlrcSkDobU/UTsaH6OBFhk7vxM3z0An4UqcSB2QWuvl5oSyXmpg0t0 r4FTWI7j1O9Ttdqo2rQaEmXevPHS8g4LAF0MrgKCVAQVQSb/FUG6YXRa/kdn9zBGVJqI T9zKCtQNngi/AO5qKJluF1Hj039q8r21ICUh2vUunBDf3JetfvtS0eGmfJ9v2X1zsgni sTSVkQNCQmjAoa9DMBL1d6VQv0ANxdaWPsy0rNm8qLI2aUkUnwOKh4Gyc+XJvJm9M+7B AuIjpCPz9GRXD/lWqPq3WJHhPxa6vlL0sCrbfuPNeeVUa04dVSQrPVA6ZIo2ohpEoQ6h 1rzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728574261; x=1729179061; 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=MyssrSM0RuGn5wfZsY82Ll7VACleFxqgJDU1vZJJ50A=; b=k2m7+OYE7yKsQn8a+Aq0qrTRX6Bx1fahd/0IM0NHIk7wcAd/XR5Pk6YH51TRjMeHHR 2FR0EZ7yoMLuuU9ceG9WuRmoZQiEk+Uw8wod8ZNQ99CGE4Ei1abWVyFpXZ//Ce5tomdy 0Txi/sr57gjAn4NS/cISH0a9o8v10XQQGYrVu/wpmWneSlfHSnovenf+QoToHIMON5Ja lzHgxTRH9wfGrOLN19FkHq8ymGE3hRsLzHcjS83yT4lDYhnsPOjyA6q5eEOwfB800Y0S oc+paId/nccLpFAizvFrz8mtKagGjJHybhojcDcuDR73kRljHbgige+dowS0cEjP7IMV Lymg== X-Gm-Message-State: AOJu0YxVaUFt6IxKBcN58Fne2mp0TreL4S484lb+OsXJuivCuXKjE4rv FJbEpjmE8gYAC7feZCEXoOXHsPaztiMmasDtiM0uA9hfO3mqMHjH7UcV6Q== X-Google-Smtp-Source: AGHT+IGXoV+pQuqiYvXzbgfXSt+s+w9C0zYab5uLiu8xzrc4HPDS4kp6lkPvBrwkL9lgUkQ1jJztTg== X-Received: by 2002:a05:651c:222a:b0:2f0:27da:6864 with SMTP id 38308e7fff4ca-2fb1873ceadmr58106841fa.17.1728574260688; Thu, 10 Oct 2024 08:31:00 -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 v2 1/2] xen/riscv: initialize bootinfo from dtb Date: Thu, 10 Oct 2024 17:30:53 +0200 Message-ID: <70c98147d7f977649ca3eb1a82cd76aeb0df1b14.1728481578.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1728574304987116600 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 Acked-by: Jan Beulich --- Changes in V2: - Drop local variable fdt_size as it is going to be used only once. --- xen/arch/riscv/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index f531ca38ee..a345dbafeb 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -50,6 +50,8 @@ void __init noreturn start_xen(unsigned long bootcpu_id, _end - _start, false) ) panic("Failed to add BOOTMOD_XEN\n"); =20 + BUG_ON(!boot_fdt_info(device_tree_flattened, dtb_addr)); + printk("All set up\n"); =20 machine_halt(); --=20 2.46.2 From nobody Fri Nov 22 04:33:29 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=1728574282; cv=none; d=zohomail.com; s=zohoarc; b=AY5kzjJZCpBqKIqL1eK8b5Ed+qdZ/bnSNZprBQ+cvqLIG6WMrW1MItLXlB/PQ4p2c8zLTu93SQkDZTFzr/URby+4IEqeVRQgLidte7Zq2/Cqwsu2Pm9P7smX0og2Q+BhwyJuiwoMPL/l+znrc6skXEueqmRaSP8YCSX6ugwKq0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728574282; 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=YgHLb6a8rK9LRJcvDKwo/7FaVaC9VQAiF9qEPMZagfY=; b=C8Whcsi2sccEGjUIXIUpyMOcleaWihfHrTA4GMGuqvaQoH0VvammZDJBqEGCXdYN9wEmOQffaA6qod+IyyTZAq3U0ZQRynj8fxjUDWuhQEZFBVCYDaxnwOu3wBoYrbdFMJTiynOmKIazjuN08TE3eiked7AmYqKkhTFqwdkwaTw= 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 1728574282246230.11142221625744; Thu, 10 Oct 2024 08:31:22 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.816300.1230508 (Exim 4.92) (envelope-from ) id 1syv85-00054H-KZ; Thu, 10 Oct 2024 15:31:05 +0000 Received: by outflank-mailman (output) from mailman id 816300.1230508; Thu, 10 Oct 2024 15:31:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1syv85-00054A-HO; Thu, 10 Oct 2024 15:31:05 +0000 Received: by outflank-mailman (input) for mailman id 816300; Thu, 10 Oct 2024 15:31:04 +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 1syv84-0004pC-EL for xen-devel@lists.xenproject.org; Thu, 10 Oct 2024 15:31:04 +0000 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [2a00:1450:4864:20::12b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id a85d5f8e-871c-11ef-99a2-01e77a169b0f; Thu, 10 Oct 2024 17:31:02 +0200 (CEST) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5399041167cso1716089e87.0 for ; Thu, 10 Oct 2024 08:31:02 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80f2593sm101640366b.215.2024.10.10.08.31.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 08:31:01 -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: a85d5f8e-871c-11ef-99a2-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728574262; x=1729179062; 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=YgHLb6a8rK9LRJcvDKwo/7FaVaC9VQAiF9qEPMZagfY=; b=KAc/DkXPT1WG3xAvM4PPthXPshsDz7zfHf4Ha1biBAxTFxsEsQl2RJA19eqWi9mbqQ dvI+PvtxaiIl5GGyXnR9q0Gb5FUmsu5yLfP+F/c5wdG+p65zdvTkOdzp0SqCa9tD0Bgi qFdJB2YrtPpHVyi09R7f+lOjBAkmRs+TSRzWJ7dxy0YEOeR5oDR811QSslqol6h1tNsn LHxShywJAhymgOWf4tKlwzGHeyBCjhTQaoKYMOwiHrbonr8qAXxSjusegzRQl16IjaSL ULYvm2sPe0mMwZmPmPW1T6Vg+d1g9kRalAWNW9OLSvPH0t7St0VBGAGawONTbCA62AbK XB1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728574262; x=1729179062; 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=YgHLb6a8rK9LRJcvDKwo/7FaVaC9VQAiF9qEPMZagfY=; b=Py5Hmc+Us7M0RuyUS/OCCya998vt7GSK2Dk4sqcVpum4r4RyZyXjwvZux1iUo6QNnt U2/KwdsdvKsoOIht++aqWYVlk+K+tDsiXKVp8T595eMH2byJN98r6XgSjlT679FnroYb GypIWpZnReob5DMpcFKA/3H5/xeorxtX4TQGcTDeajugAr+kGVi52zAZ1cSiRVw6B5gR VU+EP37WII4K1fFrHfln7IqB5rXXUUIkKOMYAz3Du2BD4P6Kp/KjGBQwU+KTxpyXzfD9 IJiKORZGB6JCP5fz5VqMPQoCDEhmbzlOZw9bGncN4PC+5+y7Kl2S/dRpibTdokm8nRlL iOzQ== X-Gm-Message-State: AOJu0Yysqylko0eoAq8A8E5tb4u/2Mn/kiuv5XoBJax5Iw1KCa0CGRcH WIX6NQB63aD+ZwOZPDYjWF3BezlApzv+oo8B9uNN8fqeMKqR0WS5DNhKqw== X-Google-Smtp-Source: AGHT+IHgD+hRPUqQynZLN31cD5Nst5OYteRZf41C8TZMwTcjOvt5ku+h5W/QnAbMqhofH07G9qf9oQ== X-Received: by 2002:a05:6512:2216:b0:536:5625:511f with SMTP id 2adb3069b0e04-539c495264fmr6164034e87.45.1728574261574; Thu, 10 Oct 2024 08:31:01 -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 v2 2/2] xen/riscv: parse and handle fdt command line Date: Thu, 10 Oct 2024 17:30:54 +0200 Message-ID: <3d5d646b052dd996d9ee83dfc0f6b13eab8231f3.1728481578.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1728574282868116600 Content-Type: text/plain; charset="utf-8" Receive Xen's command line passed by DTB using boot_fdt_cmdline() and passed it to cmdline_parse() for further procesinng and setup of Xen-specific parameters. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V2: - add Acked-by: Jan Beulich --- xen/arch/riscv/setup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index a345dbafeb..cd33fab6a0 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -27,6 +27,8 @@ unsigned char __initdata cpu0_boot_stack[STACK_SIZE] void __init noreturn start_xen(unsigned long bootcpu_id, paddr_t dtb_addr) { + const char *cmdline; + remove_identity_mapping(); =20 set_processor_id(0); @@ -52,6 +54,10 @@ void __init noreturn start_xen(unsigned long bootcpu_id, =20 BUG_ON(!boot_fdt_info(device_tree_flattened, dtb_addr)); =20 + cmdline =3D boot_fdt_cmdline(device_tree_flattened); + printk("Command line: %s\n", cmdline); + cmdline_parse(cmdline); + printk("All set up\n"); =20 machine_halt(); --=20 2.46.2