From patchwork Wed Apr 25 23:45:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Clark X-Patchwork-Id: 10364417 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AEE0B6038F for ; Thu, 26 Apr 2018 00:08:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BA3928FC3 for ; Thu, 26 Apr 2018 00:08:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B83B29022; Thu, 26 Apr 2018 00:08:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F185828FC3 for ; Thu, 26 Apr 2018 00:08:13 +0000 (UTC) Received: from localhost ([::1]:39656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBUSL-0004p1-5Y for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 Apr 2018 20:08:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBU8d-0004u7-1O for qemu-devel@nongnu.org; Wed, 25 Apr 2018 19:47:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBU8c-00051M-6z for qemu-devel@nongnu.org; Wed, 25 Apr 2018 19:47:51 -0400 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:46979) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBU8c-000510-0o for qemu-devel@nongnu.org; Wed, 25 Apr 2018 19:47:50 -0400 Received: by mail-pg0-x243.google.com with SMTP id z4so1556922pgu.13 for ; Wed, 25 Apr 2018 16:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zPeAGGwYu1ITVzQlGfgnO//p/Wv089+rhM+TFh6l8/Y=; b=AadKbRStTVvtgOC0hx0Z73qQo+v4enp6gJQrw62ziRiFr6TW6+uCYvPojcSS7AT7HW wu9zoJSlEGLINDcGDVL2clcgCTOP2lU6OwXd5mhh2UHbkOj1wzObhDvHNageefvHfU8w UbQy+e/lIaYyWgqWGsXpxbU2Ur+lta3cAtCmVx7kyMRd9bwguEpXEM/hTckGXLyU1ptp yJj02o4JXUXIepSAL5t8xt4VJJ725iA28O6G5D+l46Zk4HS0ERvwGe391T2Ju5RLXZva QB2PllzKWjyaoNkIczoehYGUr47IKOym5/SXi5wGkMYz2fGqPo5++6OmLmLsQmCXb0/U leKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zPeAGGwYu1ITVzQlGfgnO//p/Wv089+rhM+TFh6l8/Y=; b=OGKADXDn4EYSW/Apv+wvuhoq7ZQJDHqFwxZczIEYsH+ce3BtBeG/N6IZxrOusaU2+k d/J7at3rWshZyN1e0Izo8LIbQn+67Xzfqx9tTqDUlm2viGHPZu7Uznh9ZfA+VOHlM6qZ XPyGR2o6l2V3B/YaeuzNbgB4WpglZ3iOn+BsfpxQfh76Jpk1PT6b4/9cMrC4blPUz6oH mJSl7NAlp4cU5tqj00ILkf1afOD+W0VjCucCqu2k+GJbMcCWGrfuSaEHRa399dYBBYTk cqiiCWAbuW2x0tQTxsRfNv3oQRC6eBPMUVLBBdQT3lpNUzs7jlwE/+x4+1P3bzmbA3S6 7aGA== X-Gm-Message-State: ALQs6tDCMXPtxecIRnyNvN8qikC+bFmePfQJjFTrX6CvXhFC7FEJ86+g JWSpt+whD5oCLZum7uEBKm1Gg4kiZM4= X-Google-Smtp-Source: AIpwx4+2KYofteDD4DolfOim1bjL3hKkVCUVdNOJtiVm71lkbf11pzP3GZwngIAlaYqYrvq4WJfXog== X-Received: by 10.98.68.86 with SMTP id r83mr29826171pfa.145.1524700069034; Wed, 25 Apr 2018 16:47:49 -0700 (PDT) Received: from localhost.localdomain (122-58-167-38-fibre.bb.spark.co.nz. [122.58.167.38]) by smtp.gmail.com with ESMTPSA id e10sm29577549pfn.67.2018.04.25.16.47.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Apr 2018 16:47:48 -0700 (PDT) From: Michael Clark To: qemu-devel@nongnu.org Date: Thu, 26 Apr 2018 11:45:15 +1200 Message-Id: <1524699938-6764-13-git-send-email-mjc@sifive.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1524699938-6764-1-git-send-email-mjc@sifive.com> References: <1524699938-6764-1-git-send-email-mjc@sifive.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 Subject: [Qemu-devel] [PATCH v8 12/35] RISC-V: Update address bits to support sv39 and sv48 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sagar Karandikar , Bastian Koppelmann , Palmer Dabbelt , Michael Clark , Alistair Francis , patches@groups.riscv.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Palmer Dabbelt Cc: Alistair Francis Signed-off-by: Palmer Dabbelt --- target/riscv/cpu.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 9871e6f..f3f131b 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -24,12 +24,12 @@ #define TARGET_PAGE_BITS 12 /* 4 KiB Pages */ #if defined(TARGET_RISCV64) #define TARGET_LONG_BITS 64 -#define TARGET_PHYS_ADDR_SPACE_BITS 50 -#define TARGET_VIRT_ADDR_SPACE_BITS 39 +#define TARGET_PHYS_ADDR_SPACE_BITS 56 /* 44-bit PPN */ +#define TARGET_VIRT_ADDR_SPACE_BITS 48 /* sv48 */ #elif defined(TARGET_RISCV32) #define TARGET_LONG_BITS 32 -#define TARGET_PHYS_ADDR_SPACE_BITS 34 -#define TARGET_VIRT_ADDR_SPACE_BITS 32 +#define TARGET_PHYS_ADDR_SPACE_BITS 34 /* 22-bit PPN */ +#define TARGET_VIRT_ADDR_SPACE_BITS 32 /* sv32 */ #endif #define TCG_GUEST_DEFAULT_MO 0