[syslinux:elflink] ldlinux: Disable VGA graphics when loading a kernel

syslinux-bot for Matt Fleming matt.fleming at intel.com
Mon Mar 26 15:36:07 PDT 2012

Commit-ID:  87320b8de8f331b9c1810e98e24426e70b0ae29f
Gitweb:     http://www.syslinux.org/commit/87320b8de8f331b9c1810e98e24426e70b0ae29f
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Fri, 9 Mar 2012 10:53:52 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Fri, 23 Mar 2012 16:56:16 +0000

ldlinux: Disable VGA graphics when loading a kernel

The state of the graphics hardware is unknown when we're about to load
a new kernel. It could be running in VGA mode, so let's disable VGA
graphics before passing control to the kernel.

The old assembly version of this code made extensive used of
writestr(), which always calls vgaclearmode(). In the C version we're
using printf() and so need to call vgaclearmode() directly. Doing it
directly has the added advantage of documenting exactly where we need
to reset the graphics hardware.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

 com32/elflink/ldlinux/kernel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/com32/elflink/ldlinux/kernel.c b/com32/elflink/ldlinux/kernel.c
index 2438d11..ed91b76 100644
--- a/com32/elflink/ldlinux/kernel.c
+++ b/com32/elflink/ldlinux/kernel.c
@@ -68,6 +68,7 @@ int new_linux_kernel(char *okernel, char *ocmdline)
+	vgaclearmode();
 	printf("cmdline = %s\n", cmdline);
 	printf("VkernelEnd = %x\n", VKernelEnd);

More information about the Syslinux-commits mailing list