diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-03-17 00:41:09 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-03-17 00:41:09 +0000 |
commit | a90c39d1c78537582311fe041683f851011ba38d (patch) | |
tree | dca669c67a06e008c8f1d1a3cec50e9e02d202ca /sys/arch/hppa/dev/mem.c | |
parent | 1b22131ea60a93948649575149f7e9e7351e1a3c (diff) |
Tweak the viper control register:
- do not enable EISA bus grant until we really attach eisa devices;
- on some machines, booting from disk would hang in either "mem0" or "cpu0"
probe. Tinkering eventually pointed out that setting a non-zero non-rachitic
value for the viper's bus error timeout would help.
Right now, this kluge will only be enabled by default on a known list of
affected machines (which may grow over time...), and device attachment flags
allow users to try the other behaviour if necessary.
Discussed and crafted with mickey@, "it's gross" deraadt@
Diffstat (limited to 'sys/arch/hppa/dev/mem.c')
-rw-r--r-- | sys/arch/hppa/dev/mem.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sys/arch/hppa/dev/mem.c b/sys/arch/hppa/dev/mem.c index afe0a674d42..48d7ef01089 100644 --- a/sys/arch/hppa/dev/mem.c +++ b/sys/arch/hppa/dev/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.21 2003/09/25 22:13:19 mickey Exp $ */ +/* $OpenBSD: mem.c,v 1.22 2004/03/17 00:41:08 miod Exp $ */ /* * Copyright (c) 1998-2002 Michael Shalayeff @@ -191,7 +191,19 @@ memattach(parent, self, aux) /* XXX other values seem to blow it up */ if (sc->sc_vp->vi_status.hw_rev == 0) { u_int32_t vic; - int s; + int s, settimeout; + + switch (cpu_hvers) { + /* probably all oosiop-equipped machines */ + case HPPA_BOARD_HP715_33: + settimeout = 1; + break; + default: + settimeout = 0; + break; + } + if (sc->sc_dev.dv_cfdata->cf_flags & 1) + settimeout = !settimeout; printf(" viper rev %x,", sc->sc_vp->vi_status.hw_rev); #ifdef DEBUG @@ -202,7 +214,12 @@ memattach(parent, self, aux) vic &= ~VI_CTRL_CORE_DEN; vic &= ~VI_CTRL_SGC0_DEN; vic &= ~VI_CTRL_SGC1_DEN; + vic |= VI_CTRL_EISA_DEN; vic |= VI_CTRL_CORE_PRF; + + if (settimeout && (vic & VI_CTRL_VSC_TOUT) == 0) + vic |= (850 << 19); /* clks */ + sc->sc_vp->vi_control = vic; __asm __volatile("stwas %1, 0(%0)" :: "r" (&VI_CTRL), "r" (vic) : "memory"); |