diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-12-16 06:07:14 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-12-16 06:07:14 +0000 |
commit | 4a17df1c0f79e222252ead975d6aea081ea3e832 (patch) | |
tree | d93e245b964731a2c56a397d8db9863b04d9e928 /sys/dev | |
parent | 4b5458a8e906982b70968bd31cbdb85ee4c5f81e (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')
-rw-r--r-- | sys/dev/ic/sti.c | 13 | ||||
-rw-r--r-- | sys/dev/ic/stivar.h | 6 |
2 files changed, 13 insertions, 6 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; + } } } } diff --git a/sys/dev/ic/stivar.h b/sys/dev/ic/stivar.h index 85568c90df3..dff06edbc5a 100644 --- a/sys/dev/ic/stivar.h +++ b/sys/dev/ic/stivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stivar.h,v 1.14 2003/08/19 03:13:07 mickey Exp $ */ +/* $OpenBSD: stivar.h,v 1.15 2003/12/16 06:07:13 mickey Exp $ */ /* * Copyright (c) 2000-2003 Michael Shalayeff @@ -43,7 +43,9 @@ struct sti_softc { int sc_bpp; bus_space_tag_t iot, memt; - bus_space_handle_t ioh, romh, fbh; + bus_space_handle_t romh; + bus_addr_t base, fbaddr; + bus_size_t fblen; struct sti_dd sc_dd; /* in word format */ struct sti_font sc_curfont; |