lkml.org 
[lkml]   [2007]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] fix i486 boot failure due to stale %ds
Mikael, can you try this patch (rev 3) on your 486?

-hpa
diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S
index 2e55923..d93a0c2 100644
--- a/arch/x86/boot/pmjump.S
+++ b/arch/x86/boot/pmjump.S
@@ -28,17 +28,21 @@
* 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
+ movl %eax, 3f # Patch ljmpl instruction
jmp 1f # Short jump to flush instruction q.
-
1:
+
movw $__BOOT_DS, %cx
+ xorl %ebx, %ebx # Per protocol
+ xorl %ebp, %ebp # Per protocol
+ xorl %edi, %edi # Per protocol

movl %cr0, %edx
orb $1, %dl # Protected mode (PE) bit
movl %edx, %cr0
+ jmp 2f # Short jump to serialize
+2:

movw %cx, %ds
movw %cx, %es
@@ -48,7 +52,7 @@ protected_mode_jump:

# Jump to the 32-bit entrypoint
.byte 0x66, 0xea # ljmpl opcode
-2: .long 0 # offset
+3: .long 0 # offset
.word __BOOT_CS # segment

.size protected_mode_jump, .-protected_mode_jump
\
 
 \ /
  Last update: 2007-11-05 00:57    [W:0.081 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site