Subject: Re: early console init
To: Leo Weppelman <leo@wau.mis.ah.nl>
From: Matthias Drochner <drochner@zel459.zel.kfa-juelich.de>
List: tech-kern
Date: 07/20/1999 11:04:43
leo@wau.mis.ah.nl said:
> The vga_cnattach() function uses bus_space_map() to map in the
> registers.

It has shown in other drivers that it is not always a good idea
to do the allocations in the mi backend. Individual frontends
might have special requirements. This was not a problem with
the vga driver so far (and splitting it up would cause some
code duplication), but if there are serious reasons we could
take the mapping out of vga.c.

> On the Atari,
> uvm_km_valloc() is used in bus_space_map() to allocate a VA. When looking
> at main(), you will see that the console is initialised before uvm_init()...

On the i386, I've added the special case
	if (bpa >= IOM_BEGIN && (bpa + size) <= IOM_END) {
		*bshp = (bus_space_handle_t)ISA_HOLE_VADDR(bpa);
		return(0);
	}
to bus_space_map() to avoid the vm system in console
initialization. The "ISA hole" is mapped early in locore.S.

best regards
Matthias