Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5750552img; Wed, 27 Mar 2019 14:39:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsx8dNxFnv9p7Pfb6EbOg0p4j9T5lp7gqsje0c6wiiWGNpvmp0Rlq4Pu+GOaDNdBa69lte X-Received: by 2002:a62:ee03:: with SMTP id e3mr38135843pfi.241.1553722750519; Wed, 27 Mar 2019 14:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553722750; cv=none; d=google.com; s=arc-20160816; b=A03zB1AOPpHuvKDw14+gJQS1TXVWR5mpFVKNbA8sw8NhNqhtoRmO1JN5RZ01J8du29 wG4eM9pIKf+tVHeYLwWG4/f+bQQux7GgtgE/CDJT3InADCMzkIUTGs25OvuRS6BNAl55 s3qrHIU/EImqWJanrgXhd8AETx+HxDTD0nNv8shz9g9SA1bdPGLlTiUqzQILkYl5EfmF yY8ZGQ27gRnORk1sOfPOKg/kDMN/ZFVU+611syqKfI8v7MHnWnI+sBPNPeCGy0+yHSzM 0RfW93P5YV+w0LPblZDMre3Be6xcEL/1gfDhCOaMMyhoSMTj/xa38xWmpg9GdvHWkgrI k/lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=THy1EnxkVZ0EJ9MF4Z0yWaoziUEwuN7bkgXc+znhY4Q=; b=o5hYHQgAGp0YDShf7XeH9/pmpvYZX20URaeCAAO/0my03L7wsx/2pR11CHn5gd+BlW Xjt8TlxNFLIJwiaFimYQmXKX1UrtO5+RRxuNhw4z5HbvVAewVm1VDaDm2SsqPzjd4Vp2 l7znMiYfZBNfwfNrzJWsbKyT55CYvN/ScaqBD0Us73ncxsbexTj+/dKxqa70/7z/lsFv VYrndjPvLc+tL9Rxvi4Nr11VhI7g4r3AkJQdaPEnUhm0ZLOHw0rt50aDbx59phOG3QUp lrJBXI6ravTbbdiY6WKTBWTfow73KbZnpTwdLHlh/SLw7FeDSQKAWw3+agiscDSJxt1C neag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x15si19516585pgi.420.2019.03.27.14.38.54; Wed, 27 Mar 2019 14:39:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727772AbfC0Vgt (ORCPT + 99 others); Wed, 27 Mar 2019 17:36:49 -0400 Received: from ale.deltatee.com ([207.54.116.67]:58640 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727140AbfC0Vgs (ORCPT ); Wed, 27 Mar 2019 17:36:48 -0400 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1h9GE3-0006DI-51; Wed, 27 Mar 2019 15:36:47 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1h9GE2-0006Cb-0t; Wed, 27 Mar 2019 15:36:46 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Stephen Bates , Palmer Dabbelt , Christoph Hellwig , Albert Ou , Logan Gunthorpe , Jonathan Corbet Date: Wed, 27 Mar 2019 15:36:38 -0600 Message-Id: <20190327213643.23789-3-logang@deltatee.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190327213643.23789-1-logang@deltatee.com> References: <20190327213643.23789-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, sbates@raithlin.com, palmer@sifive.com, hch@lst.de, aou@eecs.berkeley.edu, logang@deltatee.com, corbet@lwn.net X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-6.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, MYRULES_NO_TEXT autolearn=no autolearn_force=no version=3.4.2 Subject: [PATCH 2/7] RISC-V: doc: Add file describing the virtual memory map X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This file is similar to the x86_64 equivalent (in Documentation/x86/x86_64/mm.txt) and describes the virtuas address space usage for RISC-V. Signed-off-by: Logan Gunthorpe Cc: Jonathan Corbet Cc: Palmer Dabbelt Cc: Albert Ou --- Documentation/riscv/mm.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/riscv/mm.txt diff --git a/Documentation/riscv/mm.txt b/Documentation/riscv/mm.txt new file mode 100644 index 000000000000..725dc85f2c65 --- /dev/null +++ b/Documentation/riscv/mm.txt @@ -0,0 +1,24 @@ +Sv32: + +00000000 - 7fffffff user space, different per mm (2G) +80000000 - 81ffffff virtual memory map (32MB) +82000000 - bfffffff vmalloc/ioremap space (1GB - 32MB) +c0000000 - ffffffff direct mapping of lower phys. memory (1GB) + +Sv39: + +0000000000000000 - 0000003fffffffff user space, different per mm (256GB) +hole caused by [38:63] sign extension +ffffffc000000000 - ffffffc0ffffffff virtual memory map (4GB) +ffffffc100000000 - ffffffd0ffffffff vmalloc/ioremap spac (64GB) +ffffffd100000000 - ffffffffffffffff linear mapping of physical space (188GB) + ffffffd200000000 - 0xfffffff200000000 linear mapping of all physical memory + +The RISC-V architecture defines virtual address bits in multiples of nine +starting from 39. These are referred to as Sv39, Sv48, Sv57 and Sv64. +Currently only Sv39 is supported. Bits 63 through to the most-significant +implemented bit are sign extended. This causes a hole between user space +and kernel addresses if you interpret them as unsigned. + +The direct mapping covers as much of the physical memory space as +possible so that it may cover some IO memory. -- 2.20.1