diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-01-14 19:11:57 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-01-14 19:11:57 +0000 |
commit | 738cca721858e79d84777b6de18b81f40949cdb0 (patch) | |
tree | f0e9d66944ae49fe2ba5f56e32ac277a65f2a7d3 /sys | |
parent | d35ef60cb7f052fcbf6b9bf84dba1d7c79984186 (diff) |
If we have a frame buffer configured as ``internal'', be sure to account for
its out-of-DIO-range memory when sizing the external iomap.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hp300/dev/grfreg.h | 4 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/locore.s | 22 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/machdep.c | 7 |
3 files changed, 23 insertions, 10 deletions
diff --git a/sys/arch/hp300/dev/grfreg.h b/sys/arch/hp300/dev/grfreg.h index 94d907a129e..eee0fddde89 100644 --- a/sys/arch/hp300/dev/grfreg.h +++ b/sys/arch/hp300/dev/grfreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: grfreg.h,v 1.3 2003/06/02 23:27:44 millert Exp $ */ +/* $OpenBSD: grfreg.h,v 1.4 2005/01/14 19:11:53 miod Exp $ */ /* $NetBSD: grfreg.h,v 1.2 1994/10/26 07:24:09 cgd Exp $ */ /* @@ -59,6 +59,7 @@ #define GID_YGENESIS 13 #define GID_HYPERION 14 +#ifndef _LOCORE typedef unsigned char grftype; struct grfreg { @@ -87,3 +88,4 @@ struct grfreg { gr_pad11, gr_fbolsb; /* +0x5f */ }; +#endif diff --git a/sys/arch/hp300/hp300/locore.s b/sys/arch/hp300/hp300/locore.s index 7b3d01ae55b..1a462b2cd51 100644 --- a/sys/arch/hp300/hp300/locore.s +++ b/sys/arch/hp300/hp300/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.45 2004/12/30 21:28:47 miod Exp $ */ +/* $OpenBSD: locore.s,v 1.46 2005/01/14 19:11:56 miod Exp $ */ /* $NetBSD: locore.s,v 1.91 1998/11/11 06:41:25 thorpej Exp $ */ /* @@ -72,6 +72,7 @@ #include <hp300/hp300/leds.h> #endif #include <hp300/dev/dioreg.h> +#include <hp300/dev/grfreg.h> #define MMUADDR(ar) movl _C_LABEL(MMUbase),ar #define CLKADDR(ar) movl _C_LABEL(CLKbase),ar @@ -329,20 +330,32 @@ Lstart1: clrl d3 /* - * Don't probe the DIO-I space. Since cards may claim memory outside - * their range (frame buffers, for example), assume the whole 0-31 + * Don't probe the DIO-I space, simply assume the whole 0-31 * select code range is taken, i.e. 32 boards. */ addl #(DIO_DEVSIZE * 32), d3 /* + * Check the ``internal'' frame buffer address. If there is one, + * assume an extra 2MB of frame buffer memory at 0x200000. + */ + movl #GRFIADDR, a0 + ASRELOC(phys_badaddr, a3) + jbsr a3@ + tstl d0 | success? + jne dioiicheck | no, skip + movl #0x200000, d1 | yes, add the 200000-400000 range + addl d1, d3 + + /* * Probe for DIO-II devices, select codes 132 to 255. */ +dioiicheck: RELOC(machineid,a0) cmpl #HP_320,a0@ jeq eiodone | HP 320 has nothing more - movl #132, d2 | our select code... + movl #DIOII_SCBASE, d2 | our select code... movl #DIOII_BASE, a0 | and first address dioloop: ASRELOC(phys_badaddr, a3) @@ -361,6 +374,7 @@ eiodone: moveq #PGSHIFT, d2 lsrl d2, d3 | convert from bytes to pages RELOC(eiomapsize,a2) + addql #1, d3 | add an extra page for device probes movl d3,a2@ /* diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index 034067fbde8..508bc5b0702 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.96 2005/01/10 21:23:52 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.97 2005/01/14 19:11:56 miod Exp $ */ /* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */ /* @@ -89,7 +89,6 @@ #define MAXMEM 64*1024 /* XXX - from cmap.h */ #include <uvm/uvm_extern.h> -#include <hp300/dev/dioreg.h> #include <hp300/dev/hilreg.h> #include <hp300/dev/hilioctl.h> #include <hp300/dev/hilvar.h> @@ -146,10 +145,8 @@ extern struct emul emul_sunos; /* * Some storage space must be allocated statically because of the * early console initialization. - * We know that console initialization will not try to map more than - * DIOII_DEVSIZE bytes. Play safe and allow for twice this size. */ -char extiospace[EXTENT_FIXED_STORAGE_SIZE(2 * DIOII_DEVSIZE / PAGE_SIZE)]; +char extiospace[EXTENT_FIXED_STORAGE_SIZE(16)]; extern int eiomapsize; /* prototypes for local functions */ |