gdb(1) in the tree

Peter Grehan grehan at freebsd.org
Fri Aug 25 00:35:37 UTC 2006


Hi Marcel,

>>  I'll see if I can work out what NetBSD does.

  Would you be able to give the attached patch a try ?

later,

Peter.

-------------- next part --------------
Index: mmu_oea.c
===================================================================
RCS file: /home/ncvs/src/sys/powerpc/powerpc/mmu_oea.c,v
retrieving revision 1.111
diff -u -r1.111 mmu_oea.c
--- mmu_oea.c	1 Aug 2006 19:06:05 -0000	1.111
+++ mmu_oea.c	25 Aug 2006 00:32:17 -0000
@@ -2012,6 +2012,22 @@
 
 		pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.pte_lo & PTE_RPGN);
 		if (pg != NULL) {
+			/*
+			 * From NetBSD pmap.c r1.37
+			 * If the page was changed and it is mapped exec,
+			 * invalidate it
+			 */
+			if ((ptelo & PTE_CHG) &&
+			    (moea_attr_fetch(pg) & PTE_EXEC)) {
+				struct pvo_head *pvoh = vm_page_to_pvoh(pg);
+				if (LIST_EMPTY(pvoh)) {
+					moea_attr_clear(pg, PTE_EXEC);
+				} else {
+					moea_syncicache(VM_PAGE_TO_PHYS(pg),
+							PAGE_SIZE);
+				}
+			}
+
 			moea_attr_save(pg, pvo->pvo_pte.pte_lo &
 			    (PTE_REF | PTE_CHG));
 		}


More information about the freebsd-ppc mailing list