summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/transitions
diff options
context:
space:
mode:
authorMichael Brown2005-05-20 13:23:51 +0200
committerMichael Brown2005-05-20 13:23:51 +0200
commitd3dec7c33152c10dac75ae00ce5f4ee16f1b9b69 (patch)
tree576d408cd83197383b727d18d750e156913f90cf /src/arch/i386/transitions
parentDon't use anonymous entries in a struct; it seems to aggravate gcc 3.4.3. (diff)
downloadipxe-d3dec7c33152c10dac75ae00ce5f4ee16f1b9b69.tar.gz
ipxe-d3dec7c33152c10dac75ae00ce5f4ee16f1b9b69.tar.xz
ipxe-d3dec7c33152c10dac75ae00ce5f4ee16f1b9b69.zip
Update to cope with changes in registers.h
Diffstat (limited to 'src/arch/i386/transitions')
-rw-r--r--src/arch/i386/transitions/libkir.S10
-rw-r--r--src/arch/i386/transitions/librm.S34
-rw-r--r--src/arch/i386/transitions/librm_mgmt.c4
3 files changed, 24 insertions, 24 deletions
diff --git a/src/arch/i386/transitions/libkir.S b/src/arch/i386/transitions/libkir.S
index 79a0aa00f..e0d6c57c2 100644
--- a/src/arch/i386/transitions/libkir.S
+++ b/src/arch/i386/transitions/libkir.S
@@ -135,12 +135,12 @@ kir_to_ext:
*
* Call a specific C function in the internal code. The prototype of
* the C function must be
- * void function ( struct real_mode_regs *rm_regs );
- * rm_regs will point to a struct containing the real-mode registers
+ * void function ( struct i386_all_resg *ix86 );
+ * ix86 will point to a struct containing the real-mode registers
* at entry to kir_call.
*
* All registers will be preserved across kir_call(), unless the C
- * function explicitly overwrites values in rm_regs. Interrupt status
+ * function explicitly overwrites values in ix86. Interrupt status
* will also be preserved.
*
* Parameters:
@@ -151,7 +151,7 @@ kir_to_ext:
* lcall $UNDI_CS, $kir_call
* addw $2, %sp
* to call in to the C function
- * void pxe_api_call ( struct real_mode_regs *rm_regs );
+ * void pxe_api_call ( struct i386_all_regs *ix86 );
****************************************************************************
*/
@@ -190,7 +190,7 @@ kir_call:
pushl %cs:ext_ds_and_es
pushl %cs:ext_cs_and_ss
- /* Push &rm_regs on stack and call function */
+ /* Push &ix86 on stack and call function */
pushl %esp
data32 call *%cs:save_function
popl %eax /* discard */
diff --git a/src/arch/i386/transitions/librm.S b/src/arch/i386/transitions/librm.S
index 6e2f12292..2e6ac47bb 100644
--- a/src/arch/i386/transitions/librm.S
+++ b/src/arch/i386/transitions/librm.S
@@ -106,11 +106,11 @@
/* Size of various C data structures */
#define SIZEOF_I386_SEG_REGS 12
#define SIZEOF_I386_REGS 32
-#define SIZEOF_I386_ALL_REGS ( SIZEOF_I386_SEG_REGS + SIZEOF_I386_REGS )
+#define SIZEOF_REAL_MODE_REGS ( SIZEOF_I386_SEG_REGS + SIZEOF_I386_REGS )
#define SIZEOF_I386_FLAGS 4
-#define SIZEOF_REAL_MODE_REGS ( SIZEOF_I386_ALL_REGS + SIZEOF_I386_FLAGS )
+#define SIZEOF_I386_ALL_REGS ( SIZEOF_REAL_MODE_REGS + SIZEOF_I386_FLAGS )
#define SIZEOF_SEGOFF_T 4
-#define SIZEOF_REAL_CALL_PARAMS ( SIZEOF_I386_ALL_REGS + 2 * SIZEOF_SEGOFF_T )
+#define SIZEOF_REAL_CALL_PARAMS ( SIZEOF_REAL_MODE_REGS + 2 * SIZEOF_SEGOFF_T )
.text
.arch i386
@@ -461,12 +461,12 @@ p2r_ljmp:
*
* Call a specific C function in the protected-mode code. The
* prototype of the C function must be
- * void function ( struct real_mode_regs *rm_regs );
- * rm_regs will point to a struct containing the real-mode registers
+ * void function ( struct i386_all_regs *ix86 );
+ * ix86 will point to a struct containing the real-mode registers
* at entry to prot_call.
*
* All registers will be preserved across prot_call(), unless the C
- * function explicitly overwrites values in rm_regs. Interrupt status
+ * function explicitly overwrites values in ix86. Interrupt status
* will also be preserved. Gate A20 will be enabled.
*
* The protected-mode code may install librm to a new location. If it
@@ -495,12 +495,12 @@ p2r_ljmp:
* lcall $LIBRM_SEGMENT, $prot_call
* addw $4, %sp
* to call in to the C function
- * void pxe_api_call ( struct real_mode_regs *rm_regs );
+ * void pxe_api_call ( struct i386_all_regs *ix86 );
****************************************************************************
*/
-#define PC_OFFSET_RM_REGS ( 0 )
-#define PC_OFFSET_RETADDR ( PC_OFFSET_RM_REGS + SIZEOF_REAL_MODE_REGS )
+#define PC_OFFSET_IX86 ( 0 )
+#define PC_OFFSET_RETADDR ( PC_OFFSET_IX86 + SIZEOF_I386_ALL_REGS )
#define PC_OFFSET_FUNCTION ( PC_OFFSET_RETADDR + 4 )
.code16
@@ -534,14 +534,14 @@ EXPORT(prot_call):
call real_to_prot
.code32
- /* Copy rm_regs from RM stack to PM stack */
- movl $SIZEOF_REAL_MODE_REGS, %ecx
+ /* Copy ix86 from RM stack to PM stack */
+ movl $SIZEOF_I386_ALL_REGS, %ecx
subl %ecx, %esp
movl %esp, %edi
pushl %esi
cld
rep movsb
- popl %edi /* %edi = phys addr of RM copy of rm_regs */
+ popl %edi /* %edi = phys addr of RM copy of ix86 */
/* Switch to virtual addresses. */
call 1f
@@ -555,7 +555,7 @@ EXPORT(prot_call):
popl %eax /* discard */
popal
- /* Push &rm_regs on the stack, and call function */
+ /* Push &ix86 on the stack, and call function */
pushl %esp
call *%ebx
popl %eax /* discard */
@@ -564,16 +564,16 @@ EXPORT(prot_call):
lcall $VIRTUAL_CS, $_virt_to_phys
popl %eax /* discard */
- /* Copy rm_regs from PM stack to RM stack, and remove rm_regs
+ /* Copy ix86 from PM stack to RM stack, and remove ix86
* from PM stack. (%edi still contains physical address of
- * rm_regs on RM stack from earlier, since C code preserves
+ * ix86 on RM stack from earlier, since C code preserves
* %edi).
*/
movl %esp, %esi
- movl $SIZEOF_REAL_MODE_REGS, %ecx
+ movl $SIZEOF_I386_ALL_REGS, %ecx
cld
rep movsb
- movl %esi, %esp /* remove rm_regs from PM stack */
+ movl %esi, %esp /* remove ix86 from PM stack */
/* Obtain physical base address of installed copy of librm in
* %ebx. (It's possible that this *isn't* the physical base
diff --git a/src/arch/i386/transitions/librm_mgmt.c b/src/arch/i386/transitions/librm_mgmt.c
index ffd55ff61..956408f54 100644
--- a/src/arch/i386/transitions/librm_mgmt.c
+++ b/src/arch/i386/transitions/librm_mgmt.c
@@ -139,7 +139,7 @@ POST_RELOC_FN ( POST_RELOC_LIBRM, librm_post_reloc );
* pointer to this new librm's entry point via es:di.
*
*/
-void initialise_via_librm ( struct i386_all_regs *regs ) {
+void initialise_via_librm ( struct i386_all_regs *ix86 ) {
/* Hand off to initialise() */
initialise ();
@@ -147,7 +147,7 @@ void initialise_via_librm ( struct i386_all_regs *regs ) {
* already set up by setup16, so all we need to do is point
* es:0000 to the start of the new librm.
*/
- regs->es = librm_base >> 4;
+ ix86->segs.es = librm_base >> 4;
}
/*