[syslinux:firmware] bios, font: zero input registers to get font

syslinux-bot for Matt Fleming matt.fleming at intel.com
Thu Jun 27 02:39:05 PDT 2013

Commit-ID:  a2f057c289cbf142cdd6de7d89123df2f21e475a
Gitweb:     http://www.syslinux.org/commit/a2f057c289cbf142cdd6de7d89123df2f21e475a
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Thu, 27 Jun 2013 08:16:49 +0100
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Thu, 27 Jun 2013 10:29:23 +0100

bios, font: zero input registers to get font

Users are reporting font issues under VirtualBox. Try this as a
speculative fix since the old 5.x behaviour was to pass in a partially
zero'd register set. Incidentally, the input regs are also used for
output, so at least we now avoid potentially constructing a pointer to
the font buffer using garbage register values.

Cc: H. Peter Anvin <hpa at zytor.com>
Signed-off-by: Matt Fleming <matt.fleming at intel.com>

 core/bios.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/core/bios.c b/core/bios.c
index 343268b..71a34f8 100644
--- a/core/bios.c
+++ b/core/bios.c
@@ -422,6 +422,8 @@ static int bios_font_query(uint8_t **font)
     /* Get BIOS 8x16 font */
+    memset(&rm, 0, sizeof rm);
     rm.eax.w[0] = 0x1130;	/* Get Font Information */
     rm.ebx.w[0] = 0x0600;	/* Get 8x16 ROM font */
     __intcall(0x10, &rm, &rm);

More information about the Syslinux-commits mailing list