Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/ibm4xx In pmap_enter(), sync the instructio...
details: https://anonhg.NetBSD.org/src/rev/50c8881141c2
branches: trunk
changeset: 517060:50c8881141c2
user: simonb <simonb%NetBSD.org@localhost>
date: Tue Nov 06 04:49:49 2001 +0000
description:
In pmap_enter(), sync the instruction cache if VM_PROT_EXECUTE. Fixes
problems when executing programs where text is copied to a page without
a dma sync (like NFS data bcopy'd to a buffer cache page).
>From discussion with Jason Thorpe and Eduardo Horvath.
diffstat:
sys/arch/powerpc/ibm4xx/pmap.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 0113236b23a6 -r 50c8881141c2 sys/arch/powerpc/ibm4xx/pmap.c
--- a/sys/arch/powerpc/ibm4xx/pmap.c Tue Nov 06 03:18:53 2001 +0000
+++ b/sys/arch/powerpc/ibm4xx/pmap.c Tue Nov 06 04:49:49 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.5 2001/09/11 04:35:43 eeh Exp $ */
+/* $NetBSD: pmap.c,v 1.6 2001/11/06 04:49:49 simonb Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -935,6 +935,11 @@
ppc4xx_tlb_enter(pm->pm_ctx, va, tte);
}
splx(s);
+
+ /* Flush the real memory from the instruction cache. */
+ if ((prot & VM_PROT_EXECUTE) && (tte & TTE_I) == 0)
+ __syncicache((void *)pa, PAGE_SIZE);
+
return 0;
}
Home |
Main Index |
Thread Index |
Old Index