|
@@ -496,8 +496,10 @@ EXPORT(prot_call):
|
496
|
496
|
movl $SIZEOF_REAL_MODE_REGS, %ecx
|
497
|
497
|
subl %ecx, %esp
|
498
|
498
|
movl %esp, %edi
|
|
499
|
+ pushl %esi
|
499
|
500
|
cld
|
500
|
|
- rep movsb
|
|
501
|
+ rep movsb
|
|
502
|
+ popl %edi /* %edi = phys addr of RM copy of rm_regs */
|
501
|
503
|
|
502
|
504
|
/* Switch to virtual addresses. */
|
503
|
505
|
call 1f
|
|
@@ -522,7 +524,18 @@ EXPORT(prot_call):
|
522
|
524
|
|
523
|
525
|
/* Switch to physical addresses, discard PM register store */
|
524
|
526
|
lcall $VIRTUAL_CS, $_virt_to_phys
|
525
|
|
- addl $SIZEOF_REAL_MODE_REGS+4, %esp /* also discard lcall seg */
|
|
527
|
+ popl %eax /* discard */
|
|
528
|
+
|
|
529
|
+ /* Copy rm_regs from PM stack to RM stack, and remove rm_regs
|
|
530
|
+ * from PM stack. (%edi still contains physical address of
|
|
531
|
+ * rm_regs on RM stack from earlier, since C code preserves
|
|
532
|
+ * %edi).
|
|
533
|
+ */
|
|
534
|
+ movl %esp, %esi
|
|
535
|
+ movl $SIZEOF_REAL_MODE_REGS, %ecx
|
|
536
|
+ cld
|
|
537
|
+ rep movsb
|
|
538
|
+ movl %esi, %esp /* remove rm_regs from PM stack */
|
526
|
539
|
|
527
|
540
|
/* Switch to real mode */
|
528
|
541
|
call prot_to_real
|