Ling, Xiaofeng
2005-Jul-05 12:10 UTC
RE: [Xen-devel] beginnings of allowing more than the basic 80x25 VGAscreen resolution
Is it possible to add some real mode code to xen like video.S in linux kernel to switch mode? If dom0 can support vesa frame buffer driver, not only we can get more line in text console, but also we can use other application that can use frame buffer driver like SDL library. So a vmx guest graphic device model can run without X server. Keir Fraser <> wrote:> On 4 Jul 2005, at 09:00, Jan Beulich wrote: > >> As far as I know, not only the VGA driver does not do any mode >> switching, even the VESA one doesn''t (because the protected mode >> interface doesn''t cover the mode switching functions as far as I >> remember). Only the video board specific frame buffer drivers are >> able to switch modes, and the bad thing (for me personally) is that >> even in >> 2.6.12 there still is no (64-bit) support for the i915 chipset. So I >> continue to be required to live with the video mode that XEN ''sets'' >> prior to loading dom0, and short of it supporting a VESA console my >> first minimal attempt was to at least increase (and propagate) the >> size to the maximum possible without significant changes. > > That''s a pain. Maybe we can find a simple example somewhere of > setting video mode via protect-mode VBE calls. I see that this > functionality is missing from the kernel drivers -- it''s all done in > a monstrous real-mode assembly file. Any video card we care about > these days should support VBE 2.0/3.0 I think, and those interfaces > don;t require you to be runnign in real mode. > > -- Keir > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gerd Knorr
2005-Jul-05 12:58 UTC
Re: [Xen-devel] beginnings of allowing more than the basic 80x25 VGAscreen resolution
"Ling, Xiaofeng" <xiaofeng.ling@intel.com> 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?). 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 difficuilt ... Gerd -- panic("it works"); /* avoid being flooded with debug messages */ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Jul-05 13:07 UTC
Re: [Xen-devel] beginnings of allowing more than the basic 80x25 VGAscreen resolution
On 5 Jul 2005, at 13:58, Gerd Knorr wrote:> 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?). > > 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 difficuilt ...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? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
David Hopwood
2005-Jul-05 17:22 UTC
Re: [Xen-devel] beginnings of allowing more than the basic 80x25 VGAscreen resolution
Keir Fraser wrote:> On 5 Jul 2005, at 13:58, Gerd Knorr wrote: > > "Ling, Xiaofeng" <xiaofeng.ling@intel.com> 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: <http://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Header%20graphics%20fields> 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 <david.nospam.hopwood@blueyonder.co.uk> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Jul-06 08:40 UTC
Re: [Xen-devel] beginnings of allowing more than the basic 80x25 VGAscreen resolution
On 5 Jul 2005, at 18:22, David Hopwood wrote:> 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.I''m pretty sure that GRUB won;t set up all the nice vga gfx modes on behalf of an OS, and even if it does you''d still need font data and other smarts in the OS to make use of the hi-res mode. Extra patches to GRUB are a pain because in my experience they are almost impossible to get accepted upstream. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel