core: don't reset the video mode when invoking the kernel
authorH. Peter Anvin <hpa@zytor.com>
Fri, 22 Jan 2010 20:14:59 +0000 (12:14 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 22 Jan 2010 20:18:21 +0000 (12:18 -0800)
Don't reset the video mode when invoking the kernel if we're booting
quiet -- it breaks "vga=current" which some distros use for a smooth
graphical transition all the way into the kernel.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/bootsect.inc
core/runkernel.inc

index 200f00a..0cf0c46 100644 (file)
@@ -120,6 +120,12 @@ replace_bootstrap:
                ; Prepare for shutting down
                ;
                call vgaclearmode
+
+;
+; We jump here when loading a kernel image, so that we don't reset
+; the screen mode in "quiet" mode
+;
+replace_bootstrap_noclearmode:
                call cleanup_hardware
 
                ;
index 8bfc8b8..c437d72 100644 (file)
@@ -454,7 +454,10 @@ setup_move:
 
                ; BX points to the final real mode segment, and will be loaded
                ; into DS.
-               jmp replace_bootstrap
+
+               test byte [QuietBoot],01h       ; Don't clear the mode if quiet
+               jz replace_bootstrap
+               jmp replace_bootstrap_noclearmode
 
 run_linux_kernel:
 ;