Re: kexec and frame buffer

From: Eric W. Biederman
Date: Thu Aug 04 2005 - 13:48:39 EST


Luca Falavigna <dktrkranz@xxxxxxxxx> writes:

> I made three experiments regarding kexec with frame buffer support (vesafb). For
> each of them I gathered dmesg messages from original and relocated kernel, in
> order to easily compare them later on. These tests were run on a virtual machine
> in order to provide the same environment for each experiment.
>
> Here are my tests and related results:
>
>
>
> 1) Frame buffer not enabled
>
> Original kernel command line: root=/dev/hda1 ro
> Relocated kernel command line: root=/dev/hda1 ro
>
> Everything went well, as supposed to be. I was able to read boot messages and to
> see login prompts.
>
>
> 2) Frame buffer enabled in the relocated kernel
>
> Original kernel command line: root=/dev/hda1 ro
> Relocated kernel command line: root=/dev/hda1 ro vga=791
>
> This time I was able to read boot messages and so on, but I couldn't be able to
> load vesafb in the relocated kernel. dmesg showed nothing about vesafb.
>
>
> 3) Frame buffer enabled in the original kernel
>
> Original kernel command line: root=/dev/hda1 ro vga=791
> Relocated kernel command line: root=/dev/hda1 ro {vga=791,}
>
> This time I wasn't able to read boot messages in the relocated kernel, whether
> vga parameter was set or not. I looked at dmesg in order to get some useful
> informations:
>
> Linux version 2.6.13-rc5 (dktrkranz@gandalf) (gcc version 3.3.4 (Debian
> 1:3.3.4-13)) #3 Wed Aug 3 13:39:11 UTC 2005
> [...]
> -Console: colour dummy device 80x25
> +Console: colour VGA+ 80x25
> [...]
> -vesafb: framebuffer at 0xf0000000, mapped to 0xc2880000, using 3072k, total
> 16384k
> -vesafb: mode is 1024x768x16, linelength=2048, pages=0
> -vesafb: protected mode interface info at 00ff:44f0
> -vesafb: scrolling: redraw
> -vesafb: Truecolor: size=0:5:6:5, shift=0:11:5:0
> -mtrr: your processor doesn't support write-combining
> -Console: switching to colour frame buffer device 128x48
> -fb0: VESA VGA frame buffer device
> [...]
>
> It seems relocated kernel doesn't (or can't) load vesafb. Is frame buffer
> supported in kexec or there is some work-in-progress?

So without doing passing --real-mode the vga= parameter currently
cannot work. The vga= parameter is processed by vga.S which
make BIOS calls and we bypass all of the BIOS calls.

So you can try with the --real-mode option and you have
a chance of the code working. Or you can figure out which
information video.S passes to the kernel figure out how
to get that same information out of a running kernel
and then /sbin/kexec can be tweaked to pass the current
video mode. Changing frame buffer modes shouldn't work
but you should at least be able to preserve the existing
ones.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/