aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/kernel.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-03-09 10:53:52 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-03-23 16:56:16 +0000
commit87320b8de8f331b9c1810e98e24426e70b0ae29f (patch)
treef7b5ada61c7b9949898418eab1e1262e2da369f9 /com32/elflink/ldlinux/kernel.c
parentaa4544d4afdf576ca5e8e1581f968a9e41037ba9 (diff)
downloadsyslinux-87320b8de8f331b9c1810e98e24426e70b0ae29f.tar.gz
syslinux-87320b8de8f331b9c1810e98e24426e70b0ae29f.tar.xz
syslinux-87320b8de8f331b9c1810e98e24426e70b0ae29f.zip
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@intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/kernel.c')
-rw-r--r--com32/elflink/ldlinux/kernel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/com32/elflink/ldlinux/kernel.c b/com32/elflink/ldlinux/kernel.c
index 2438d116..ed91b76f 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);