From owner-freebsd-amd64@FreeBSD.ORG Tue Nov 4 08:46:38 2014 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DB10AF8; Tue, 4 Nov 2014 08:46:38 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E17737EE; Tue, 4 Nov 2014 08:46:37 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sA48kU5o057730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Nov 2014 10:46:30 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sA48kU5o057730 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sA48kSZF057727; Tue, 4 Nov 2014 10:46:28 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 4 Nov 2014 10:46:28 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: memory type e820 Message-ID: <20141104084628.GN53947@kib.kiev.ua> References: <201410301353.05185.jhb@freebsd.org> <3381641.WgZAz21Lfu@pippin.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3381641.WgZAz21Lfu@pippin.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-amd64@freebsd.org X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2014 08:46:38 -0000 On Mon, Nov 03, 2014 at 01:52:44PM -0500, John Baldwin wrote: > On Saturday 01 November 2014 18:55:53 Sourish Mazumder wrote: > > Hi John, > > > > I tried the pmap_mapdev() as suggested by you. Works perfectly. Thanks for > > the information. > > Sure. > > > What is required, If I want to add this nvram memory to VM pages? > > Hmm. If this is device memory you generally don't want that. I'm not > actually sure how to do this at runtime. If you don't mind having a local > hack you can add a change in the MD startup code (e.g. in hammer_time() > in sys/amd64/amd64/machdep.c) to adjust the ranges added to > phys_avail[] and dump_avail[]. The facility exists to do this. It is OBJT_MGTDEVICE pager and vm_phys_fictitious_reg_range(). This is used by i915 and TTM for aperture, and seems XEN dom0 code uses it for mapping pages from other domains into dom0.