Date: Fri, 16 Apr 2004 15:24:35 -0400 (EDT) From: Andrew Gallatin <gallatin@cs.duke.edu> To: Alan Cox <alc@cs.rice.edu> Cc: alpha@FreeBSD.org Subject: Re: Another alpha panic Message-ID: <16512.13043.868658.232276@grasshopper.cs.duke.edu> In-Reply-To: <20040416162748.GB238@cs.rice.edu> References: <20040411093343.GA89809@xor.obsecurity.org> <200404132236.20792.jhb@FreeBSD.org> <16509.42895.49213.222503@grasshopper.cs.duke.edu> <20040416045453.GA78366@xor.obsecurity.org> <407F68BA.6000405@imimic.com> <20040416053930.GA78940@xor.obsecurity.org> <20040416054340.GZ238@cs.rice.edu> <20040416054804.GA79165@xor.obsecurity.org> <407F775D.7020908@imimic.com> <16511.61586.123216.627307@grasshopper.cs.duke.edu> <20040416162748.GB238@cs.rice.edu>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
Alan Cox writes:
> Fixing this should be mechanical in nature: Search for all uses
> of PG_UNMANAGED in amd64's or i386's and change alpha's pmap accordingly.
> Volunteer? I can review the patch but not test it.
How does the attached patch look? I"ll try a buildworld with
it before commiting, naturally..
Its sort of funny that pmap_enter_quick() talks about
"Enter on the PV list if part of our managed memory"
and then puts it there anyway..
Drew
[-- Attachment #2 --]
Index: alpha/alpha/pmap.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/alpha/pmap.c,v
retrieving revision 1.143
diff -u -r1.143 pmap.c
--- alpha/alpha/pmap.c 11 Apr 2004 05:08:26 -0000 1.143
+++ alpha/alpha/pmap.c 16 Apr 2004 19:15:26 -0000
@@ -1906,7 +1906,8 @@
* raise IPL while manipulating pv_table since pmap_enter can be
* called at interrupt time.
*/
- if (pmap_initialized && (m->flags & PG_FICTITIOUS) == 0) {
+ if (pmap_initialized &&
+ (m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0) {
pmap_insert_entry(pmap, va, mpte, m);
managed |= PG_MANAGED;
}
@@ -2031,7 +2032,8 @@
* raise IPL while manipulating pv_table since pmap_enter can be
* called at interrupt time.
*/
- pmap_insert_entry(pmap, va, mpte, m);
+ if ((m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0)
+ pmap_insert_entry(pmap, va, mpte, m);
/*
* Increment counters
@@ -2041,7 +2043,10 @@
/*
* Now validate mapping with RO protection
*/
- *pte = pmap_phys_to_pte(VM_PAGE_TO_PHYS(m)) | PG_V | PG_KRE | PG_URE | PG_MANAGED | PG_FOR | PG_FOE | PG_FOW;
+ if (m->flags & (PG_FICTITIOUS|PG_UNMANAGED))
+ *pte = pmap_phys_to_pte(VM_PAGE_TO_PHYS(m)) | PG_V | PG_KRE | PG_URE;
+ else
+ *pte = pmap_phys_to_pte(VM_PAGE_TO_PHYS(m)) | PG_V | PG_KRE | PG_URE | PG_MANAGED | PG_FOR | PG_FOE | PG_FOW;
alpha_pal_imb(); /* XXX overkill? */
return mpte;
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16512.13043.868658.232276>
