summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-12-09 14:31:58 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-12-09 14:31:58 +0000
commit9542e90dfa3fb5369646f600c21d3c2863e6dd69 (patch)
treec86b4e53eaae863027ab437c751c813cf63bcf62 /sys/arch/i386/include
parent580e00e95ea51b295ec9285aca0df412609003ac (diff)
add two new MD only pmap apis to amd64 and i386 (not to be used in MI
code): pmap_flush_cache(vaddr_t, vsize_t) and pmap_flush_page(paddr_t) to flush the cache for virtual addresses and physical pages respectively using the clflush instruction. These apis will shortly be used by the agp bus_dma functions to avoid doing a wbinvd on each dmamap_sync. ok kettenis@, some comments from miod@
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r--sys/arch/i386/include/pmap.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index c380b253d44..bd62351d892 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.53 2009/08/11 17:15:54 oga Exp $ */
+/* $OpenBSD: pmap.h,v 1.54 2009/12/09 14:31:57 oga Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
@@ -402,6 +402,14 @@ void pmap_tlb_shootwait(void);
void pmap_prealloc_lowmem_ptp(paddr_t);
+/*
+ * functions for flushing the cache for vaddrs and pages.
+ * these functions are not part of the MI pmap interface and thus
+ * should not be used as such.
+ */
+void pmap_flush_cache(vaddr_t, vsize_t);
+void pmap_flush_page(paddr_t);
+
#define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */
/*