From: H. Peter Anvin Date: Thu, 23 Aug 2007 16:28:42 +0000 (-0700) Subject: [x86 setup] Make sure AH=00h when setting a video mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=71351b98b9be6a867aa00276d67716c0728cfff7;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [x86 setup] Make sure AH=00h when setting a video mode Passing a u8 into a register doesn't mean gcc will zero-extend it. Also, don't depend on thhe register not to change. Per bug report from Saul Tamari. Signed-off-by: H. Peter Anvin --- diff --git a/arch/i386/boot/video-vga.c b/arch/i386/boot/video-vga.c index d660e608cd58..aef02f9ec0c1 100644 --- a/arch/i386/boot/video-vga.c +++ b/arch/i386/boot/video-vga.c @@ -73,9 +73,10 @@ static u8 vga_set_basic_mode(void) mode = 3; /* Set the mode */ + ax = mode; asm volatile(INT10 - : : "a" (mode) - : "ebx", "ecx", "edx", "esi", "edi"); + : "+a" (ax) + : : "ebx", "ecx", "edx", "esi", "edi"); do_restore = 1; return mode; }