|
@@ -106,11 +106,11 @@
|
106
|
106
|
/* Size of various C data structures */
|
107
|
107
|
#define SIZEOF_I386_SEG_REGS 12
|
108
|
108
|
#define SIZEOF_I386_REGS 32
|
109
|
|
-#define SIZEOF_I386_ALL_REGS ( SIZEOF_I386_SEG_REGS + SIZEOF_I386_REGS )
|
|
109
|
+#define SIZEOF_REAL_MODE_REGS ( SIZEOF_I386_SEG_REGS + SIZEOF_I386_REGS )
|
110
|
110
|
#define SIZEOF_I386_FLAGS 4
|
111
|
|
-#define SIZEOF_REAL_MODE_REGS ( SIZEOF_I386_ALL_REGS + SIZEOF_I386_FLAGS )
|
|
111
|
+#define SIZEOF_I386_ALL_REGS ( SIZEOF_REAL_MODE_REGS + SIZEOF_I386_FLAGS )
|
112
|
112
|
#define SIZEOF_SEGOFF_T 4
|
113
|
|
-#define SIZEOF_REAL_CALL_PARAMS ( SIZEOF_I386_ALL_REGS + 2 * SIZEOF_SEGOFF_T )
|
|
113
|
+#define SIZEOF_REAL_CALL_PARAMS ( SIZEOF_REAL_MODE_REGS + 2 * SIZEOF_SEGOFF_T )
|
114
|
114
|
|
115
|
115
|
.text
|
116
|
116
|
.arch i386
|
|
@@ -461,12 +461,12 @@ p2r_ljmp:
|
461
|
461
|
*
|
462
|
462
|
* Call a specific C function in the protected-mode code. The
|
463
|
463
|
* prototype of the C function must be
|
464
|
|
- * void function ( struct real_mode_regs *rm_regs );
|
465
|
|
- * rm_regs will point to a struct containing the real-mode registers
|
|
464
|
+ * void function ( struct i386_all_regs *ix86 );
|
|
465
|
+ * ix86 will point to a struct containing the real-mode registers
|
466
|
466
|
* at entry to prot_call.
|
467
|
467
|
*
|
468
|
468
|
* All registers will be preserved across prot_call(), unless the C
|
469
|
|
- * function explicitly overwrites values in rm_regs. Interrupt status
|
|
469
|
+ * function explicitly overwrites values in ix86. Interrupt status
|
470
|
470
|
* will also be preserved. Gate A20 will be enabled.
|
471
|
471
|
*
|
472
|
472
|
* The protected-mode code may install librm to a new location. If it
|
|
@@ -495,12 +495,12 @@ p2r_ljmp:
|
495
|
495
|
* lcall $LIBRM_SEGMENT, $prot_call
|
496
|
496
|
* addw $4, %sp
|
497
|
497
|
* to call in to the C function
|
498
|
|
- * void pxe_api_call ( struct real_mode_regs *rm_regs );
|
|
498
|
+ * void pxe_api_call ( struct i386_all_regs *ix86 );
|
499
|
499
|
****************************************************************************
|
500
|
500
|
*/
|
501
|
501
|
|
502
|
|
-#define PC_OFFSET_RM_REGS ( 0 )
|
503
|
|
-#define PC_OFFSET_RETADDR ( PC_OFFSET_RM_REGS + SIZEOF_REAL_MODE_REGS )
|
|
502
|
+#define PC_OFFSET_IX86 ( 0 )
|
|
503
|
+#define PC_OFFSET_RETADDR ( PC_OFFSET_IX86 + SIZEOF_I386_ALL_REGS )
|
504
|
504
|
#define PC_OFFSET_FUNCTION ( PC_OFFSET_RETADDR + 4 )
|
505
|
505
|
|
506
|
506
|
.code16
|
|
@@ -534,14 +534,14 @@ EXPORT(prot_call):
|
534
|
534
|
call real_to_prot
|
535
|
535
|
.code32
|
536
|
536
|
|
537
|
|
- /* Copy rm_regs from RM stack to PM stack */
|
538
|
|
- movl $SIZEOF_REAL_MODE_REGS, %ecx
|
|
537
|
+ /* Copy ix86 from RM stack to PM stack */
|
|
538
|
+ movl $SIZEOF_I386_ALL_REGS, %ecx
|
539
|
539
|
subl %ecx, %esp
|
540
|
540
|
movl %esp, %edi
|
541
|
541
|
pushl %esi
|
542
|
542
|
cld
|
543
|
543
|
rep movsb
|
544
|
|
- popl %edi /* %edi = phys addr of RM copy of rm_regs */
|
|
544
|
+ popl %edi /* %edi = phys addr of RM copy of ix86 */
|
545
|
545
|
|
546
|
546
|
/* Switch to virtual addresses. */
|
547
|
547
|
call 1f
|
|
@@ -555,7 +555,7 @@ EXPORT(prot_call):
|
555
|
555
|
popl %eax /* discard */
|
556
|
556
|
popal
|
557
|
557
|
|
558
|
|
- /* Push &rm_regs on the stack, and call function */
|
|
558
|
+ /* Push &ix86 on the stack, and call function */
|
559
|
559
|
pushl %esp
|
560
|
560
|
call *%ebx
|
561
|
561
|
popl %eax /* discard */
|
|
@@ -564,16 +564,16 @@ EXPORT(prot_call):
|
564
|
564
|
lcall $VIRTUAL_CS, $_virt_to_phys
|
565
|
565
|
popl %eax /* discard */
|
566
|
566
|
|
567
|
|
- /* Copy rm_regs from PM stack to RM stack, and remove rm_regs
|
|
567
|
+ /* Copy ix86 from PM stack to RM stack, and remove ix86
|
568
|
568
|
* from PM stack. (%edi still contains physical address of
|
569
|
|
- * rm_regs on RM stack from earlier, since C code preserves
|
|
569
|
+ * ix86 on RM stack from earlier, since C code preserves
|
570
|
570
|
* %edi).
|
571
|
571
|
*/
|
572
|
572
|
movl %esp, %esi
|
573
|
|
- movl $SIZEOF_REAL_MODE_REGS, %ecx
|
|
573
|
+ movl $SIZEOF_I386_ALL_REGS, %ecx
|
574
|
574
|
cld
|
575
|
575
|
rep movsb
|
576
|
|
- movl %esi, %esp /* remove rm_regs from PM stack */
|
|
576
|
+ movl %esi, %esp /* remove ix86 from PM stack */
|
577
|
577
|
|
578
|
578
|
/* Obtain physical base address of installed copy of librm in
|
579
|
579
|
* %ebx. (It's possible that this *isn't* the physical base
|