From owner-svn-src-head@FreeBSD.ORG Tue May 21 11:07:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 87DC6F84; Tue, 21 May 2013 11:07:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 79ACF8F7; Tue, 21 May 2013 11:07:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4LB7ClO047040; Tue, 21 May 2013 11:07:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4LB7Cdt047039; Tue, 21 May 2013 11:07:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201305211107.r4LB7Cdt047039@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 May 2013 11:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250850 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2013 11:07:12 -0000 Author: kib Date: Tue May 21 11:07:12 2013 New Revision: 250850 URL: http://svnweb.freebsd.org/changeset/base/250850 Log: Add amd64-specific ddb command 'show phys2dmap', which calculates the address in the direct map corresponding to the given physical address. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue May 21 11:04:00 2013 (r250849) +++ head/sys/amd64/amd64/pmap.c Tue May 21 11:07:12 2013 (r250850) @@ -5535,4 +5535,16 @@ DB_SHOW_COMMAND(pte, pmap_print_pte) pte = pmap_pde_to_pte(pde, va); db_printf(" pte %#016lx\n", *pte); } + +DB_SHOW_COMMAND(phys2dmap, pmap_phys2dmap) +{ + vm_paddr_t a; + + if (have_addr) { + a = (vm_paddr_t)addr; + db_printf("0x%jx\n", (uintmax_t)PHYS_TO_DMAP(a)); + } else { + db_printf("show phys2dmap addr\n"); + } +} #endif