From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hopwood Subject: Re: beginnings of allowing more than the basic 80x25 VGAscreen resolution Date: Tue, 05 Jul 2005 18:22:57 +0100 Message-ID: <42CAC1F1.1060502@blueyonder.co.uk> References: <3ACA40606221794F80A5670F0AF15F8408B19B13@pdsmsx403> <87wto5h0j1.fsf@bytesex.org> Reply-To: david.nospam.hopwood@blueyonder.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Keir Fraser wrote: > On 5 Jul 2005, at 13:58, Gerd Knorr wrote: > > "Ling, Xiaofeng" writes: > >>> Is it possible to add some real mode code to xen like video.S in linux >>> kernel to switch mode? >> >> Hmm, how about adding that to the boot loader(s)? >> >> IIRC there are some fields in the multiboot info header for that kind >> of stuff, so grub could setup that and pass on the info to xen (and >> xen in turn to the dom0 kernel?). Yes. How this is supposed to work is that the OS's multiboot header specifies a desired mode: and then the boot loader passes back information about the actual mode that was set in the vbe_* fields of the information struct. >> multiboot kernels are started in 32-bit protected mode by the boot >> loader, i.e. xen has (unlike linux) no 16-bit startup code. Thus >> doing 16-bit BIOS calls once xen is running is a bit difficult ... > > GRUB has code for switching back into real mode to do bios calls. We > could take that, plus video.S, and put them in Xen. Then add an info > structure for passing video info up to domain0. It's pretty ugly, but I > think there is no nice solution here. Would we also need vesa/vga driver > code from Linux for setting up font data in some graphics modes? I prefer Gerd's suggestion of relying on the boot loader to set up a reasonable mode. Multiboot is all about providing a sane initial hardware state to multiboot-compliant kernels, so that they do not need as much (preferably not any) of this crufty 16-bit initialization code. This is code that with a cleaner hardware/BIOS design would not be needed at all; ideally, OS designers should be able to forget about it like a bad dream. On current PC hardware, a boot loader must have code for doing BIOS calls anyway, so it might as well set up the video mode (and font if needed). I don't know what modes GRUB currently supports, but if it doesn't support the > 25-line text modes then that's an RFE for GRUB, not something that needs to be fixed by adding more cruft to Xen. -- David Hopwood