diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-04-27 14:09:46 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-04-27 14:09:46 +0000 |
commit | b76fbb43c872e87ec2d7094cf3b2883d95d49964 (patch) | |
tree | 7f61cb26514cfed85e4055d88cc080b5b13da6a3 /sys/arch/mvme88k | |
parent | 0c43c061c7fad965acfbcf489e4ac871090720fb (diff) |
Allow userland to cause the data cache to be flushed for any arbitrary address
range in the current process, using trap #451.
This is necessary for proper gcc trampolines operation, and, later, ld.so...
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/dev/vs.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/include/locore.h | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m88110.c | 8 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/machdep.c | 4 |
4 files changed, 12 insertions, 8 deletions
diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c index dc9576218a4..3c570d1384f 100644 --- a/sys/arch/mvme88k/dev/vs.c +++ b/sys/arch/mvme88k/dev/vs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vs.c,v 1.54 2005/04/27 14:07:38 miod Exp $ */ +/* $OpenBSD: vs.c,v 1.55 2005/04/27 14:09:45 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. @@ -408,7 +408,7 @@ vs_scsicmd(struct scsi_xfer *xs) * to flush the cache for a write and flush with inval for * a read, prior to starting the IO. */ - dma_cachectl((vaddr_t)xs->data, xs->datalen, + dma_cachectl(pmap_kernel(), (vaddr_t)xs->data, xs->datalen, flags & SCSI_DATA_IN ? DMA_CACHE_SYNC_INVAL : DMA_CACHE_SYNC); option = 0; diff --git a/sys/arch/mvme88k/include/locore.h b/sys/arch/mvme88k/include/locore.h index e57fc9ef3b8..ee7a7ca8161 100644 --- a/sys/arch/mvme88k/include/locore.h +++ b/sys/arch/mvme88k/include/locore.h @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.h,v 1.26 2004/11/09 21:50:01 miod Exp $ */ +/* $OpenBSD: locore.h,v 1.27 2005/04/27 14:09:45 miod Exp $ */ #ifndef _MACHINE_LOCORE_H_ #define _MACHINE_LOCORE_H_ @@ -33,10 +33,12 @@ void sigtrap(void); void stepbpt(void); void userbpt(void); void syscall_handler(void); +void cache_flush_handler(void); void m88110_sigsys(void); void m88110_sigtrap(void); void m88110_stepbpt(void); void m88110_userbpt(void); void m88110_syscall_handler(void); +void m88110_cache_flush_handler(void); #endif /* _MACHINE_LOCORE_H_ */ diff --git a/sys/arch/mvme88k/mvme88k/m88110.c b/sys/arch/mvme88k/mvme88k/m88110.c index c35872fad79..9a5a185a5a9 100644 --- a/sys/arch/mvme88k/mvme88k/m88110.c +++ b/sys/arch/mvme88k/mvme88k/m88110.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88110.c,v 1.19 2005/04/27 14:07:38 miod Exp $ */ +/* $OpenBSD: m88110.c,v 1.20 2005/04/27 14:09:45 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * All rights reserved. @@ -100,7 +100,7 @@ void m88110_cmmu_flush_tlb(unsigned, unsigned, vaddr_t, vsize_t); void m88110_cmmu_flush_cache(int, paddr_t, psize_t); void m88110_cmmu_flush_inst_cache(int, paddr_t, psize_t); void m88110_cmmu_flush_data_cache(int, paddr_t, psize_t); -void m88110_dma_cachectl(vaddr_t, vsize_t, int); +void m88110_dma_cachectl(pmap_t, vaddr_t, vsize_t, int); void m88110_dma_cachectl_pa(paddr_t, psize_t, int); void m88110_cmmu_dump_config(void); void m88110_cmmu_show_translation(unsigned, unsigned, unsigned, int); @@ -483,11 +483,11 @@ m88110_cmmu_inval_cache(paddr_t physaddr, psize_t size) } void -m88110_dma_cachectl(vaddr_t va, vsize_t size, int op) +m88110_dma_cachectl(pmap_t pmap, vaddr_t va, vsize_t size, int op) { paddr_t pa; - if (pmap_extract(pmap_kernel(), va, &pa) == FALSE) + if (pmap_extract(pmap, va, &pa) == FALSE) return; /* XXX */ switch (op) { diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index 6817f11f0c1..0486e54b5d3 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.163 2004/12/02 19:40:46 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.164 2005/04/27 14:09:45 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -1286,6 +1286,7 @@ vector_init(m88k_exception_vector_area *vector, unsigned *vector_init_list) SET_VECTOR(num, m88110_sigtrap); SET_VECTOR(450, m88110_syscall_handler); + SET_VECTOR(451, m88110_cache_flush_handler); SET_VECTOR(MVMEPROM_VECTOR, m88110_bugtrap); SET_VECTOR(504, m88110_stepbpt); SET_VECTOR(511, m88110_userbpt); @@ -1300,6 +1301,7 @@ vector_init(m88k_exception_vector_area *vector, unsigned *vector_init_list) SET_VECTOR(num, sigtrap); SET_VECTOR(450, syscall_handler); + SET_VECTOR(451, cache_flush_handler); SET_VECTOR(MVMEPROM_VECTOR, bugtrap); SET_VECTOR(504, stepbpt); SET_VECTOR(511, userbpt); |