Browse Source

Provide access to rm_cs and rm_ds from protected-mode code.

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
5080668704
2 changed files with 6 additions and 1 deletions
  1. 4
    1
      src/arch/i386/include/librm.h
  2. 2
    0
      src/arch/i386/transitions/librm.S

+ 4
- 1
src/arch/i386/include/librm.h View File

@@ -46,8 +46,11 @@ extern char *text16;
46 46
 /* Variables in librm.S, present in the normal data segment */
47 47
 extern uint16_t rm_sp;
48 48
 extern uint16_t rm_ss;
49
-extern uint16_t rm_cs;
50 49
 extern uint32_t pm_esp;
50
+extern uint16_t __data16 ( rm_cs );
51
+#define rm_cs __use_data16 ( rm_cs )
52
+extern uint16_t __text16 ( rm_ds );
53
+#define rm_ds __use_text16 ( rm_ds )
51 54
 
52 55
 /* Functions that librm expects to be able to link to.  Included here
53 56
  * so that the compiler will catch prototype mismatches.

+ 2
- 0
src/arch/i386/transitions/librm.S View File

@@ -309,7 +309,9 @@ p2r_jump_target:
309 309
 	.section ".data16"
310 310
 p2r_jump_vector:
311 311
 	.word	p2r_jump_target
312
+	.globl rm_cs
312 313
 rm_cs:	.word 0
314
+	.globl rm_ds
313 315
 	.section ".text16.data"
314 316
 rm_ds:	.word 0
315 317
 	

Loading…
Cancel
Save