From nobody Thu Nov 28 01:44:43 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=1684757959; cv=none; d=zohomail.com; s=zohoarc; b=azuHn/nlAC3JXBUIims592wCsmxXHx9h6+b05H/937KHm8PxHrSqWQ6WPqsWewfEMpnyik5pmr98k6LUkYxoGAqJdPbSCM60oOCps8kLIEk4OFfbwcb43joFoU61ZLHnm/U0NpItpaBJcoSKSzdG1OXW7LD3fgpgo+0Cpw7wPKY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684757959; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LvpxCLBBqorbQeBpQfAjag4bfazOq0BLsYa9CfgITIY=; b=NJtBSP+M+T56SIuzeFC9uB07HPKLzyMpDKunujxK7YP3W27ptt7Q/1zn75oSODQBcvCMcQYlrX1C5VvnS2C0rG42zdiQ/Vi3iL3Z/dxbd1ItutmDJQOxMgevsxFJGRBr/okJY5dJLaMVNaF0qwN5h4rg04l9NpweZxdy1K2vJUU= 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 1684757959573526.6769671163398; Mon, 22 May 2023 05:19:19 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.537882.837508 (Exim 4.92) (envelope-from ) id 1q14V6-0001Ln-36; Mon, 22 May 2023 12:18:56 +0000 Received: by outflank-mailman (output) from mailman id 537882.837508; Mon, 22 May 2023 12:18:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q14V5-0001KH-Up; Mon, 22 May 2023 12:18:55 +0000 Received: by outflank-mailman (input) for mailman id 537882; Mon, 22 May 2023 12:18:55 +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 1q14V5-0000XV-1F for xen-devel@lists.xenproject.org; Mon, 22 May 2023 12:18:55 +0000 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [2a00:1450:4864:20::22f]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d1141695-f89a-11ed-8611-37d641c3527e; Mon, 22 May 2023 14:18:53 +0200 (CEST) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2af177f12a5so52339401fa.2 for ; Mon, 22 May 2023 05:18:53 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id 8-20020ac24828000000b004f26aabbd6asm961120lft.130.2023.05.22.05.18.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 05:18:52 -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: d1141695-f89a-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684757933; x=1687349933; 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=LvpxCLBBqorbQeBpQfAjag4bfazOq0BLsYa9CfgITIY=; b=JmHV/vqB3H+bbZAmtmj3bQEGhoH/cq5iEmr+KxT/6n1qpa67uz2QnkGfjo2rDOWPQy saN1tvu8jschQCn+/24IOLucNQJwun2ktIn5ga5Wh0X1681AtwZ6VwvnL+HBWkBm3K9s kGb0ywialknHJiwE9QTNAYrn4oZIyglxSPI7H1Dc8ohmz5KzFydOVFhUpIT4QM8NK0v4 lbZUb4Pbh2I9oN2cuAm7xeRmB5U7qInCwxLTn4TXKH4/yJLrikuJvggK5+iVA9tWQF/k PyWIvjMjcQqIL6QqvHiA3ETRlAjLzfeZTOs39+2tK05eFnGzxdMIlUBNbLt3GMqdPJnA Gzlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684757933; x=1687349933; 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=LvpxCLBBqorbQeBpQfAjag4bfazOq0BLsYa9CfgITIY=; b=D1dI6Gv+d5AxN1sdKIVyiNmMgTWs5U50cRsnKjI2kv7+SGsKw1f7eLfAGmLnoH/61l 1wJY7ig70atMyTVuPtBlHz/xdTQnfi9ulI9uKBydyclbfXPxyFyl1N+N/TM8NFKC+T4F umtQVr17a6fHbmcRvR6P6x6apbEVwivQqR0w5jkM09faM4x03B3PMvRqn/2rSMrbr9CB eSDsJeIJb4Gmpdvg9ew2rp7Iv4CKOkIViHG5Os8kszS0BV/njWYor+ek9RxigL+MukzW u2/cIJc97c5WpRiXYrLHM+cLmjMLi21DBozMU0TMec/SLHrPCyUZGKdwgck4NsoawnJW HblA== X-Gm-Message-State: AC+VfDyXzxjdlTo23kQbIGMrPqdE+1fWA3u5/rlgJJjErcArdaTghpEt OCjqlEsc5b59VtCL6w85MqS7+4Yg2do= X-Google-Smtp-Source: ACHHUZ4QlJ10wu0A6K9oPFNOy6NPUIvuKoMJdRlJ2MlttbxuuO/WN1L1GTDpkZHZoi3IWsUR0tTdEw== X-Received: by 2002:a05:651c:8f:b0:2ac:598e:e946 with SMTP id 15-20020a05651c008f00b002ac598ee946mr3989905ljq.3.1684757932827; Mon, 22 May 2023 05:18:52 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Julien Grall , Jan Beulich , Andrew Cooper , Stefano Stabellini , Oleksii Kurochko , Bob Eshleman , Alistair Francis , Connor Davis Subject: [PATCH v8 4/5] xen/riscv: setup initial pagetables Date: Mon, 22 May 2023 15:18:45 +0300 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1684757961812100001 Content-Type: text/plain; charset="utf-8" The patch does two thing: 1. Setup initial pagetables. 2. Enable MMU which end up with code in cont_after_mmu_is_enabled() Signed-off-by: Oleksii Kurochko --- Changes in V8: - Nothing changed. Only rebase --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - Nothing changed. Only rebase --- Changes in V5: - Nothing changed. Only rebase --- Changes in V4: - Nothing changed. Only rebase --- Changes in V3: - update the commit message that MMU is also enabled here - remove early_printk("All set up\n") as it was moved to cont_after_mmu_is_enabled() function after MMU is enabled. --- Changes in V2: * Update the commit message --- xen/arch/riscv/setup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 315804aa87..cf5dc5824e 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -21,7 +21,10 @@ void __init noreturn start_xen(unsigned long bootcpu_id, { early_printk("Hello from C env\n"); =20 - early_printk("All set up\n"); + setup_initial_pagetables(); + + enable_mmu(); + for ( ;; ) asm volatile ("wfi"); =20 --=20 2.40.1