Subject: isa_mem_alloc, iomem land, and reality..
To: None <port-i386@NetBSD.ORG>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: port-i386
Date: 06/09/1998 13:40:55
so, it would appear that isa_mem_alloc() would be the Right Way to
allocate a hunk of I/O address space in the "384K hole", for things
like PCMCIA which just need a Hunk of Space.

Except that the extent map isn't pre-filled with all of the various
things which live there.

As I understand it,

0xa0000-0xbffff is used for frame buffer space, though it's correctly
allocated by the new wscons/VGA drivers..

0xc0000..0xc7fff is for video BIOS ROM 

0xe0000..0xfffff is for system BIOS ROM space.

I may be missing some other allocations.

Here's a first cut at "fixing" some of this.  Arguably,
0xc0000..0xc7fff should be reserved by the VGA driver instead of in
machdep.c..

Comments?

						- Bill

--- machdep.c	1998/06/06 21:27:31	1.307
+++ machdep.c	1998/06/09 13:36:55
@@ -1758,6 +1758,16 @@
 		/* XXX What should we do? */
 		printf("WARNING: CAN'T ALLOCATE EXTENDED MEMORY FROM IOMEM EXTENT MAP!\n");
 	}
+	/*
+	 * Allocate physical addresses used by typical ROMs from the 
+	 * iomem extent map.
+	 */
+	if (extent_alloc_region(iomem_ex, 0xc0000, 0x8000, EX_NOWAIT)) {
+		printf("WARNING: CAN'T ALLOCATE VIDEO ROM SPACE FROM IOMEM EXTENT MAP!\n");
+	}
+	if (extent_alloc_region(iomem_ex, 0xe0000, 0x20000, EX_NOWAIT)) {
+		printf("WARNING: CAN'T ALLOCATE BIOS ROM SPACE FROM IOMEM EXTENT MAP!\n");
+	}
 
 #if NISADMA > 0
 	/*