From 8d87f5baaa75c2a2b7056fbb972938279cee88f7 Mon Sep 17 00:00:00 2001 From: grehan Date: Tue, 5 Dec 2006 04:01:52 +0000 Subject: Fix gdb issue where the i-cache was not being updated when a breakpoint was written into a user's address space. The fix is to modify uiomove_fromphys to sync the icache when an executable user-space page is written into. Alan Cox suggested that there should probably be a higher-level interface to this in the ptrace code, but agreed that this is an OK short-term solution. Files changed: pmap.h - declaration of pmap_page_executable() pmap_dispatch.c - pass through the page_executable call to the mmu object mmu_oea.c - implement the page_executable method by examining the PTE_EXEC field in the vm_page_t uio_machdep.c - in uiomove_fromphys(), if the op was a UIO_WRITE to user-space, and if the page is executable, sync the icache since this is at the least a breakpoint-write from gdb. Reported by: marcel Tested by: marcel, grehan on g3+g4 Discussed with: alc MFC after: 2 weeks --- sys/powerpc/include/pmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/powerpc/include') diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h index 213d211..d02f8d6 100644 --- a/sys/powerpc/include/pmap.h +++ b/sys/powerpc/include/pmap.h @@ -95,7 +95,7 @@ void pmap_unmapdev(vm_offset_t, vm_size_t); void pmap_deactivate(struct thread *); vm_offset_t pmap_kextract(vm_offset_t); int pmap_dev_direct_mapped(vm_offset_t, vm_size_t); - +boolean_t pmap_page_executable(vm_page_t); boolean_t pmap_mmu_install(char *name, int prio); #define vtophys(va) pmap_kextract((vm_offset_t)(va)) -- cgit v1.1