Browse Source

Don't automatically call gateA20_set() when returning from a real-mode

call.
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
290c5ee779
1 changed files with 7 additions and 5 deletions
  1. 7
    5
      src/arch/i386/transitions/librm.S

+ 7
- 5
src/arch/i386/transitions/librm.S View File

428
  * function will be passed back to the protected-mode caller.  A
428
  * function will be passed back to the protected-mode caller.  A
429
  * result of this is that this routine cannot be called directly from
429
  * result of this is that this routine cannot be called directly from
430
  * C code, since it clobbers registers that the C ABI expects the
430
  * C code, since it clobbers registers that the C ABI expects the
431
- * callee to preserve.  Gate A20 will be re-enabled in case the
432
- * real-mode routine disabled it.
431
+ * callee to preserve.  Gate A20 will *not* be automatically
432
+ * re-enabled.  Since we always run from an even megabyte of memory,
433
+ * we are guaranteed to return successfully to the protected-mode
434
+ * code, which should then call gateA20_set() if it suspects that gate
435
+ * A20 may have been disabled.  Note that enabling gate A20 is a
436
+ * potentially slow operation that may also cause keyboard input to be
437
+ * lost; this is why it is not done automatically.
433
  *
438
  *
434
  * librm.h defines a convenient macro REAL_CODE() for using real_call.
439
  * librm.h defines a convenient macro REAL_CODE() for using real_call.
435
  * See librm.h and realmode.h for details and examples.
440
  * See librm.h and realmode.h for details and examples.
477
 	.section ".text"
482
 	.section ".text"
478
 	.code32
483
 	.code32
479
 1:
484
 1:
480
-	/* Set up environment expected by C code */
481
-	call	gateA20_set
482
-
483
 	/* Restore registers and return */
485
 	/* Restore registers and return */
484
 	popal
486
 	popal
485
 	ret
487
 	ret

Loading…
Cancel
Save