From nobody Sat Sep 21 05:52:16 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=1683825029; cv=none; d=zohomail.com; s=zohoarc; b=nN/UIRunL5EA3IQvMxQlDiEhT2pFJ/mYFDvoHDVUM7KkKM0opxvnsYnZnw0JANL40eZ490InxBVyiKThIqaDguiV5fzp8s3DfXfEyWeGCHCD9qXrsXKieA01xjxe0cqPzi8/3VFsbczmaPoZhMFT1vMLaU9iACijZO+JMlhorhU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683825029; 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=/UWycGli8sXbmjgB8uls+zGw7KkS5qUAPDnnmK+Uofw=; b=F6vyYtVCGU2jHaEWcxotziGFsr8jWNJLhUigl89CE6aF29APmVRoINPbNTZwbcZCTGbZpGd/NkBv9hoGaOmHKTAdDICxw1T3QXcoOqZgFtn8JMtuOjdU4/jCi1AvSWpP3vlExvx0F/o8OsyyR/PvL3d4MZaXFQ0l7zpuHundM8k= 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 1683825029257819.3681808111842; Thu, 11 May 2023 10:10:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.533495.830256 (Exim 4.92) (envelope-from ) id 1px9nT-00038s-WB; Thu, 11 May 2023 17:09:43 +0000 Received: by outflank-mailman (output) from mailman id 533495.830256; Thu, 11 May 2023 17:09:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1px9nT-00037l-OV; Thu, 11 May 2023 17:09:43 +0000 Received: by outflank-mailman (input) for mailman id 533495; Thu, 11 May 2023 17:09:42 +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 1px9nS-0002Li-9Y for xen-devel@lists.xenproject.org; Thu, 11 May 2023 17:09:42 +0000 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [2a00:1450:4864:20::12d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9dea8256-f01e-11ed-8611-37d641c3527e; Thu, 11 May 2023 19:09:40 +0200 (CEST) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f139de8cefso47444669e87.0 for ; Thu, 11 May 2023 10:09:40 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id c9-20020a05651c014900b002aa3cff0529sm2443830ljd.74.2023.05.11.10.09.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 10:09:40 -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: 9dea8256-f01e-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683824980; x=1686416980; 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=/UWycGli8sXbmjgB8uls+zGw7KkS5qUAPDnnmK+Uofw=; b=CFr0ljiWtQtZURNRmK+W0rNds1/uOMmxJC64s61zAMi4+24iYrCn4FBZr99w2rtNIk o8ufeYa4NDlXjF6jI0M6HxG8/AbLuv9RIo9quOjL+KaUQ7yMr3pqxoKbMgqu+uHJXevF E7JvsyetWYBiqvXzgmtX+OwL/4uekO/CO8421ruyQ7kOmZ3JacNaoPxm6U37bOHvnKDQ jPsq0uj+PxYf8+89xWHDtPoEM2mkbvK2rIvXgYC/sWYrqNBjnYf34Kv41wGBeroFbYOO LTwU+0OAXvPhCyXanDAK82CqYNUHuRVYStm9GB8Q/yWUEvxUbRCzvp3jFKdbnR0ZGAs+ R2Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683824980; x=1686416980; 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=/UWycGli8sXbmjgB8uls+zGw7KkS5qUAPDnnmK+Uofw=; b=iwhNNct8dT9J5yOTjK63g1JDw7h59uhZrM8pi/nheSkCfsv38tSX0qx4v9OJz7kzI6 3edu+GZ6xyfIsdnj2/FyCeCK36jGc2dQPL9gmrZTvKCHkHJiM9osuv5XBvgqgyBEfaMn kl3iENRngm/UAWmQ83X+o1G7U2UztmG1W8jUkNKMoJ0UNo+9m+Jli6jYmElaVVjA9hB6 Yr/kdyUIDVgHWojlt1AXGlfJc6z+eS1JT3+sE6eYz16/Elit6CNO2pVGM3KPQeI0q5ds V7WPmIw3q7OkzC6knnrQ0EJFhCld0fbILR/fNjwSIggWoPB95ZaIdvnvWmjjXoxtiemG +mZw== X-Gm-Message-State: AC+VfDzLNYiITQzNdjaYdqNtHYacwC3ZWj4BaRZCS2jOjVf5H5jpMOAq A/0soarl8CWrsJ2zZO6R2+XgK3yNv+E= X-Google-Smtp-Source: ACHHUZ4WsiO6Zk3o1Dla3fKJOAOJt6pH061LDn1vWRyukcylQsuRZeFs8TO6qz8yfwniP+D95fSNGw== X-Received: by 2002:a2e:94cf:0:b0:2a7:6b40:7ea2 with SMTP id r15-20020a2e94cf000000b002a76b407ea2mr3084289ljh.14.1683824980238; Thu, 11 May 2023 10:09:40 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Julien Grall , Jan Beulich , Andrew Cooper , Stefano Stabellini , Gianluca Guida , Oleksii Kurochko , Bob Eshleman , Alistair Francis , Connor Davis Subject: [PATCH v7 4/5] xen/riscv: setup initial pagetables Date: Thu, 11 May 2023 20:09:32 +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: 1683825030688100003 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 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