diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-01-29 22:15:28 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-01-29 22:15:28 +0000 |
commit | c86cf487fb976701fb8560d51e5617e030e6bda9 (patch) | |
tree | 5f2cf59cae50373c2deaecb790cddec84f7127e8 /sys/arch | |
parent | d2b7555c19e76e92d52e8dbfc89501d3345f8213 (diff) |
The ``flush before inval'' 88410 workaround needs to be done in
m88410_initialize_cpu() as well. Since we can't flush unknown data, just
make sure all 88410 lines are filled with valid data before flushing it.
This should fix the spurious ``197DP hangs or loops on osiop errors after
autoconf'' issue I've been seeing.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m88110.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/sys/arch/mvme88k/mvme88k/m88110.c b/sys/arch/mvme88k/mvme88k/m88110.c index 8dccf534f16..cc0a77d8606 100644 --- a/sys/arch/mvme88k/mvme88k/m88110.c +++ b/sys/arch/mvme88k/mvme88k/m88110.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88110.c,v 1.58 2008/01/02 19:59:31 miod Exp $ */ +/* $OpenBSD: m88110.c,v 1.59 2009/01/29 22:15:27 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * All rights reserved. @@ -352,7 +352,35 @@ m88410_initialize_cpu(cpuid_t cpu) dctl |= CMMU_DCTL_SEN; set_dctl(dctl); CMMU_LOCK; +#if 0 mc88410_inval(); /* clear external data cache */ +#else + /* + * We can't invalidate the 88410 cache without flushing it first; + * this is probably due to either an error in the cpu-to-88410 + * communication protocol, or to a bug in the '410 (but since I + * do not know how to get its revision, I can't tell whether this + * is the obscure v1 bug or not). + * + * Since we can't flush random data either, fill the secondary + * cache first, before flushing it. + * + * The smallest 88410 cache line is 32 bytes, and the largest size + * is 1MB. + */ + { + vaddr_t va; + uint32_t junk = 0; + + for (va = 0; va < 1024 * 1024; va += 32) + junk += *(uint32_t *)va; + + /* to make sure the above loop isn't optimized away */ + mc88110_sync_data_page(junk & PAGE_SIZE); + } + mc88410_flush(); + mc88410_inval(); +#endif CMMU_UNLOCK; #ifdef MULTIPROCESSOR |