summaryrefslogtreecommitdiff
path: root/sys/dev/ic/sti.c
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-12-16 06:07:14 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-12-16 06:07:14 +0000
commit4a17df1c0f79e222252ead975d6aea081ea3e832 (patch)
treed93e245b964731a2c56a397d8db9863b04d9e928 /sys/dev/ic/sti.c
parent4b5458a8e906982b70968bd31cbdb85ee4c5f81e (diff)
only map the rom and do not touch the hpa space getting rid of memsize define that was not really true; plus tested by otto@ and miod@
Diffstat (limited to 'sys/dev/ic/sti.c')
-rw-r--r--sys/dev/ic/sti.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c
index 804813876a6..cbab532b910 100644
--- a/sys/dev/ic/sti.c
+++ b/sys/dev/ic/sti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sti.c,v 1.34 2003/10/21 18:58:49 jmc Exp $ */
+/* $OpenBSD: sti.c,v 1.35 2003/12/16 06:07:13 mickey Exp $ */
/*
* Copyright (c) 2000-2003 Michael Shalayeff
@@ -277,7 +277,7 @@ sti_attach_common(sc)
else
*(u_int *)&r = bus_space_read_4(sc->memt, sc->romh, i), i += 4;
- *p = (p == cc->regions? sc->romh : sc->ioh) +
+ *p = (p == cc->regions? sc->romh : sc->base) +
(r.offset << PGSHIFT);
#ifdef STIDEBUG
printf("%x @ 0x%x%s%s%s%s\n",
@@ -293,8 +293,13 @@ sti_attach_common(sc)
#ifdef STIDEBUG
printf("already mapped region\n");
#endif
- } else if (p - cc->regions == 1)
- sc->fbh = fbh;
+ } else {
+ if (p - cc->regions == 1) {
+ sc->fbaddr = *p;
+ sc->fblen = r.length << PGSHIFT;
+ }
+ *p = fbh;
+ }
}
}
}