summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2006-05-13 13:45:31 +0200
committerMichael Brown2006-05-13 13:45:31 +0200
commit50806687047310ed2470ceff729f8370640544d8 (patch)
tree2bb4b6a32b7bffb77816780485611f6f7dad5804
parentProvide a global counter for the number of interrupts hooked. (diff)
downloadipxe-50806687047310ed2470ceff729f8370640544d8.tar.gz
ipxe-50806687047310ed2470ceff729f8370640544d8.tar.xz
ipxe-50806687047310ed2470ceff729f8370640544d8.zip
Provide access to rm_cs and rm_ds from protected-mode code.
-rw-r--r--src/arch/i386/include/librm.h5
-rw-r--r--src/arch/i386/transitions/librm.S2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/i386/include/librm.h b/src/arch/i386/include/librm.h
index 4301ff52..fdcd25f1 100644
--- a/src/arch/i386/include/librm.h
+++ b/src/arch/i386/include/librm.h
@@ -46,8 +46,11 @@ extern char *text16;
/* Variables in librm.S, present in the normal data segment */
extern uint16_t rm_sp;
extern uint16_t rm_ss;
-extern uint16_t rm_cs;
extern uint32_t pm_esp;
+extern uint16_t __data16 ( rm_cs );
+#define rm_cs __use_data16 ( rm_cs )
+extern uint16_t __text16 ( rm_ds );
+#define rm_ds __use_text16 ( rm_ds )
/* Functions that librm expects to be able to link to. Included here
* so that the compiler will catch prototype mismatches.
diff --git a/src/arch/i386/transitions/librm.S b/src/arch/i386/transitions/librm.S
index 3dca53ab..1fba5c56 100644
--- a/src/arch/i386/transitions/librm.S
+++ b/src/arch/i386/transitions/librm.S
@@ -309,7 +309,9 @@ p2r_jump_target:
.section ".data16"
p2r_jump_vector:
.word p2r_jump_target
+ .globl rm_cs
rm_cs: .word 0
+ .globl rm_ds
.section ".text16.data"
rm_ds: .word 0