From owner-svn-src-head@freebsd.org Thu Dec 22 20:28:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77504C8CEF7; Thu, 22 Dec 2016 20:28:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 470741E2F; Thu, 22 Dec 2016 20:28:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBMKS6fQ025290; Thu, 22 Dec 2016 20:28:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBMKS6VO025289; Thu, 22 Dec 2016 20:28:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201612222028.uBMKS6VO025289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 22 Dec 2016 20:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310428 - head/sys/mips/malta 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.23 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: Thu, 22 Dec 2016 20:28:07 -0000 Author: jhb Date: Thu Dec 22 20:28:06 2016 New Revision: 310428 URL: https://svnweb.freebsd.org/changeset/base/310428 Log: Fix dump_avail[] for MALTA platforms to include the kernel. dump_avail[] is supposed to be a superset of phys_avail[] that describes all of the memory ranges that should be included in a full dump. minidumps don't consider pages described by dump_avail[] to be valid and thus they are excluded via the is_dumpable() function. Most MIPS platforms (including MALTA) set dump_avail[] to be identical to phys_avail[]. In particular, phys_avail[] doesn't include the kernel itself, so pages for the kernel and it's global variables are not considered dumpable and not included in the dump. Fix this by setting dump_avail[0] to the first memory address (0) rather than the end of the kernel. Several other MIPS platforms have the same bug, though I am only able to test malta in qemu. The correct fix is to set dump_avail[] to describe RAM and in particular to not set dump_avail[0] to the end of the kernel (kernel_kseg0_end). Sponsored by: DARPA / AFRL Modified: head/sys/mips/malta/malta_machdep.c Modified: head/sys/mips/malta/malta_machdep.c ============================================================================== --- head/sys/mips/malta/malta_machdep.c Thu Dec 22 20:16:10 2016 (r310427) +++ head/sys/mips/malta/malta_machdep.c Thu Dec 22 20:28:06 2016 (r310428) @@ -191,7 +191,7 @@ mips_init(unsigned long memsize, uint64_ /* phys_avail regions are in bytes */ phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end); phys_avail[1] = memsize; - dump_avail[0] = phys_avail[0]; + dump_avail[0] = 0; dump_avail[1] = phys_avail[1]; /* Only specify the extended region if it's set */