Re: panic: invalid PDPE on recend amd64

From: Alan Cox <alc_at_rice.edu>
Date: Sat, 06 Nov 2010 14:28:45 -0500
Paul B Mahol wrote:
> On 11/6/10, Jia-Shiun Li <jiashiun_at_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


Index: amd64/amd64/amd64_mem.c
===================================================================
--- amd64/amd64/amd64_mem.c	(revision 214679)
+++ amd64/amd64/amd64_mem.c	(working copy)
_at__at_ -583,7 +583,7 _at__at_ 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);
 	}
 
_at__at_ -688,7 +688,7 _at__at_ 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);
 	}
 }
Received on Sat Nov 06 2010 - 18:47:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:08 UTC