diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-02-05 01:15:21 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-02-05 01:15:21 +0000 |
commit | 8c696ff2dff9007ed6c340d7af7265585f39918f (patch) | |
tree | 193a8f79d0eadbfe166a558bfa141a61bbebad46 /sys/arch/amd64/include | |
parent | 82fda29c886a059ab961cba463ebf312068065e5 (diff) |
Mirroring the i386 commit just made. Add MD PMAP_NOCACHE flag to pmap,
and use it to implement BUS_DMA_NOCACHE for uncached mappings of dma
memory. Needed for some broken hardware.
Discussion with art, miod, kettenis and toby, ok miod.
Diffstat (limited to 'sys/arch/amd64/include')
-rw-r--r-- | sys/arch/amd64/include/bus.h | 3 | ||||
-rw-r--r-- | sys/arch/amd64/include/pmap.h | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/amd64/include/bus.h b/sys/arch/amd64/include/bus.h index f51456236d1..e2fa9ec1fbf 100644 --- a/sys/arch/amd64/include/bus.h +++ b/sys/arch/amd64/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.13 2008/12/03 15:46:06 oga Exp $ */ +/* $OpenBSD: bus.h,v 1.14 2009/02/05 01:15:20 oga Exp $ */ /* $NetBSD: bus.h,v 1.6 1996/11/10 03:19:25 thorpej Exp $ */ /*- @@ -445,6 +445,7 @@ void bus_space_barrier(bus_space_tag_t, bus_space_handle_t, #define BUS_DMA_STREAMING 0x100 /* hint: sequential, unidirectional */ #define BUS_DMA_READ 0x200 /* mapping is device -> memory only */ #define BUS_DMA_WRITE 0x400 /* mapping is memory -> device only */ +#define BUS_DMA_NOCACHE 0x800 /* map memory uncached */ /* Forwards needed by prototypes below. */ struct mbuf; diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h index b3b36f9de43..59c586db19d 100644 --- a/sys/arch/amd64/include/pmap.h +++ b/sys/arch/amd64/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.19 2008/06/10 02:55:39 weingart Exp $ */ +/* $OpenBSD: pmap.h,v 1.20 2009/02/05 01:15:20 oga Exp $ */ /* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */ /* @@ -333,6 +333,11 @@ struct pmap { }; /* + * MD flags that we use for pmap_enter: + */ +#define PMAP_NOCACHE PMAP_MD0 /* set the non-cacheable bit. */ + +/* * We keep mod/ref flags in struct vm_page->pg_flags. */ #define PG_PMAP_MOD PG_PMAP0 |