Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Nov 2010 14:28:45 -0500
From:      Alan Cox <alc@rice.edu>
To:        Paul B Mahol <onemda@gmail.com>
Cc:        alc@freebsd.org, Andriy Gapon <avg@icyb.net.ua>, Jia-Shiun Li <jiashiun@gmail.com>, current@freebsd.org
Subject:   Re: panic: invalid PDPE on recend amd64
Message-ID:  <4CD5AC6D.2020705@rice.edu>
In-Reply-To: <AANLkTin1UNrO7G_e_5k%2B_rMe0U7HizGtJ66igm5n6=Og@mail.gmail.com>
References:  <AANLkTimiEEXb6wVQMkjn2AKHM9tuPxF6eDX9w%2BrFyLXT@mail.gmail.com>	<4CCC31C1.5090602@icyb.net.ua>	<AANLkTin%2BmKfgwKN8YH1YOhx7cXFaUOM=Q2JjLVKQFe%2Bt@mail.gmail.com>	<AANLkTimCXHeXb_bBOx7OzLC48V4=rzgsu1WzAgqnasY9@mail.gmail.com>	<4CCC8752.7030403@gmail.com>	<AANLkTinTauXYDqVSvwmYeyhuC8Pq9GBd=1mQVNuvvq1-@mail.gmail.com> <AANLkTin1UNrO7G_e_5k%2B_rMe0U7HizGtJ66igm5n6=Og@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jiashiun@gmail.com> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CD5AC6D.2020705>