From: H. Peter Anvin <hpa@zytor.com>
Date: Mon, 5 Nov 2007 01:54:31 +0000 (-0800)
Subject: x86 setup: set %ebx == %ebp == %edi == 0 on protected mode entry
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f259cc59ba45b8db401d60be9700e275676fb15;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git

x86 setup: set %ebx == %ebp == %edi == 0 on protected mode entry

In accordance with the newly formalized 32-bit boot protocol, set
%ebx == %ebp == %edi == 0 in order to support future extensions to the
protocol.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---

diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S
index 26baeab3a4d4..fa6bed1fac14 100644
--- a/arch/x86/boot/pmjump.S
+++ b/arch/x86/boot/pmjump.S
@@ -28,11 +28,13 @@
  * void protected_mode_jump(u32 entrypoint, u32 bootparams);
  */
 protected_mode_jump:
-	xorl	%ebx, %ebx		# Flag to indicate this is a boot
 	movl	%edx, %esi		# Pointer to boot_params table
 	movl	%eax, 2f		# Patch ljmpl instruction
 
 	movw	$__BOOT_DS, %cx
+	xorl	%ebx, %ebx		# Per the 32-bit boot protocol
+	xorl	%ebp, %ebp		# Per the 32-bit boot protocol
+	xorl	%edi, %edi		# Per the 32-bit boot protocol
 
 	movl	%cr0, %edx
 	orb	$1, %dl			# Protected mode (PE) bit