Paul B Mahol wrote:
On 11/6/10, Jia-Shiun Li <jiash...@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)
@@ -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);
        }
 }
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to