From owner-freebsd-current@FreeBSD.ORG Sat Nov 6 19:47:48 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA8610656A9 for ; Sat, 6 Nov 2010 19:47:48 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh8.mail.rice.edu (mh8.mail.rice.edu [128.42.201.24]) by mx1.freebsd.org (Postfix) with ESMTP id D33298FC29 for ; Sat, 6 Nov 2010 19:47:47 +0000 (UTC) Received: from mh8.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh8.mail.rice.edu (Postfix) with ESMTP id B203F28F85D; Sat, 6 Nov 2010 14:28:47 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh8.mail.rice.edu, auth channel Received: from mh8.mail.rice.edu ([127.0.0.1]) by mh8.mail.rice.edu (mh8.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id qSvZS3Nk8RXo; Sat, 6 Nov 2010 14:28:47 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh8.mail.rice.edu (Postfix) with ESMTPSA id 25C8828F836; Sat, 6 Nov 2010 14:28:46 -0500 (CDT) Message-ID: <4CD5AC6D.2020705@rice.edu> Date: Sat, 06 Nov 2010 14:28:45 -0500 From: Alan Cox User-Agent: Thunderbird 2.0.0.24 (X11/20100725) MIME-Version: 1.0 To: Paul B Mahol References: <4CCC31C1.5090602@icyb.net.ua> <4CCC8752.7030403@gmail.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------070406060905040106080303" X-Mailman-Approved-At: Sat, 06 Nov 2010 20:04:19 +0000 Cc: alc@freebsd.org, Andriy Gapon , Jia-Shiun Li , current@freebsd.org Subject: Re: panic: invalid PDPE on recend amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Nov 2010 19:47:48 -0000 This is a multi-part message in MIME format. --------------070406060905040106080303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Paul B Mahol wrote: > On 11/6/10, Jia-Shiun Li wrote: > >> Hi, >> >> I got a similar panic on amd64. Looking into the source it hit >> KASSERT((base & (len - 1))) in pmap_demote_DMAP(). I replaced it with >> a printf to see what triggered the assertion and here is the output. >> Combined with memcontrol output 'bogus' keyword it seems buggy BIOS >> violated some kind of spec and caused this. Is it fatal? It looks fine >> on my machine without the assertion. >> > > Send uname output. The fix for this issue got commited few days ago. > > This is a different type of BIOS misconfiguration than your machine had. I'm attaching a possible patch for this one. Regards, Alan --------------070406060905040106080303 Content-Type: text/plain; name="mtrr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mtrr.patch" Index: amd64/amd64/amd64_mem.c =================================================================== --- amd64/amd64/amd64_mem.c (revision 214679) +++ amd64/amd64/amd64_mem.c (working copy) @@ -583,7 +583,7 @@ amd64_mrset(struct mem_range_softc *sc, struct mem i = (sc->mr_cap & MR686_FIXMTRR) ? MTRR_N64K + MTRR_N16K + MTRR_N4K : 0; mrd = sc->mr_desc + i; for (; i < sc->mr_ndesc; i++, mrd++) { - if (mrd->mr_flags & MDF_ACTIVE) + if ((mrd->mr_flags & (MDF_ACTIVE | MDF_BOGUS)) == MDF_ACTIVE) pmap_demote_DMAP(mrd->mr_base, mrd->mr_len, FALSE); } @@ -688,7 +688,7 @@ amd64_mrinit(struct mem_range_softc *sc) i = (sc->mr_cap & MR686_FIXMTRR) ? MTRR_N64K + MTRR_N16K + MTRR_N4K : 0; mrd = sc->mr_desc + i; for (; i < sc->mr_ndesc; i++, mrd++) { - if (mrd->mr_flags & MDF_ACTIVE) + if ((mrd->mr_flags & (MDF_ACTIVE | MDF_BOGUS)) == MDF_ACTIVE) pmap_demote_DMAP(mrd->mr_base, mrd->mr_len, TRUE); } } --------------070406060905040106080303--