diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-11-04 20:54:31 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-11-04 22:48:04 -0500 |
commit | 9f259cc59ba45b8db401d60be9700e275676fb15 (patch) | |
tree | dc57ec27c11c98fbb2ed4448d13030c4fc0b6cca /arch/x86 | |
parent | 7ed192906a2144ebc8ca2925a85d27b9c5355668 (diff) |
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/boot/pmjump.S | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ | |||
28 | * void protected_mode_jump(u32 entrypoint, u32 bootparams); | 28 | * void protected_mode_jump(u32 entrypoint, u32 bootparams); |
29 | */ | 29 | */ |
30 | protected_mode_jump: | 30 | protected_mode_jump: |
31 | xorl %ebx, %ebx # Flag to indicate this is a boot | ||
32 | movl %edx, %esi # Pointer to boot_params table | 31 | movl %edx, %esi # Pointer to boot_params table |
33 | movl %eax, 2f # Patch ljmpl instruction | 32 | movl %eax, 2f # Patch ljmpl instruction |
34 | 33 | ||
35 | movw $__BOOT_DS, %cx | 34 | movw $__BOOT_DS, %cx |
35 | xorl %ebx, %ebx # Per the 32-bit boot protocol | ||
36 | xorl %ebp, %ebp # Per the 32-bit boot protocol | ||
37 | xorl %edi, %edi # Per the 32-bit boot protocol | ||
36 | 38 | ||
37 | movl %cr0, %edx | 39 | movl %cr0, %edx |
38 | orb $1, %dl # Protected mode (PE) bit | 40 | orb $1, %dl # Protected mode (PE) bit |