Index: coreboot-v4/src/devices/oprom/x86_asm.S
===================================================================
--- coreboot-v4/src/devices/oprom/x86_asm.S	(revision 5607)
+++ coreboot-v4/src/devices/oprom/x86_asm.S	(working copy)
@@ -87,6 +87,9 @@
 	shrl	$4, %eax
 	movw	%ax, __lcall_instr + 3
 
+        movl    $0x10000026, %ecx
+	movl	$0x10000028, %edx
+
 	/* initial register values */
 	movl	40(%ebp), %eax
 	movl	%eax, __registers +  0 /* eax */
@@ -101,6 +104,8 @@
 	movl	60(%ebp), %eax
 	movl	%eax, __registers + 20 /* edi */
 
+
+
 	/* Activate the right segment descriptor real mode. */
 	ljmp	$0x28, $RELOCATED(1f)
 1:
@@ -141,21 +146,25 @@
 	mov	%ax, %ds
 	lidt	__realmode_idt
 
+	/* initialize registers for option rom lcall */
+	movl	__registers +  0, %eax
+	movl	__registers +  4, %ebx
+	movl	__registers +  8, %ecx
+	movl	__registers + 12, %edx
+	movl	__registers + 16, %esi
+	movl	__registers + 20, %edi	
+	/* Put the registers back after changing segments */
+	pushal	
+
 	/* Set all segments to 0x0000, ds to 0x0040 */
+
 	mov	%ax, %es
 	mov	%ax, %fs
 	mov	%ax, %gs
 	mov	$0x40, %ax
 	mov	%ax, %ds
+	popal
 
-	/* initialize registers for option rom lcall */
-	movl	__registers +  0, %eax
-	movl	__registers +  4, %ebx
-	movl	__registers +  8, %ecx
-	movl	__registers + 12, %edx
-	movl	__registers + 16, %esi
-	movl	__registers + 20, %edi
-
 	/* ************************************ */
 __lcall_instr = RELOCATED(.)
 	.byte 0x9a
@@ -262,12 +271,6 @@
 	mov	%ax, %ds
 	lidt	__realmode_idt
 
-	/* Set all segments to 0x0000 */
-	mov	%ax, %ds
-	mov	%ax, %es
-	mov	%ax, %fs
-	mov	%ax, %gs
-
 	/* initialize registers for intXX call */
 	movl	__registers +  0, %eax
 	movl	__registers +  4, %ebx
@@ -275,7 +278,18 @@
 	movl	__registers + 12, %edx
 	movl	__registers + 16, %esi
 	movl	__registers + 20, %edi
+	pushal
 
+	/* Set all segments to 0x0000 */
+	mov	%ax, %ds
+	mov	%ax, %es
+	mov	%ax, %fs
+	mov	%ax, %gs
+	/* Put the registers back after changing segments */
+	popal
+
+
+
 __intXX_instr = RELOCATED(.)
 	.byte 0xcd, 0x00 /* This becomes intXX */
 
@@ -376,7 +390,7 @@
 	mov	%ax, %ds
 	lidt	__realmode_idt
 
-	/* Set up segment registers to segment 0x0000 */
+	/* Set up segment registers to segment 0x0000 and ds to 0x040 */
 	mov	%ax, %es
 	mov	%ax, %fs
 	mov	%ax, %gs
