summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/transitions/librm.S
diff options
context:
space:
mode:
authorMichael Brown2007-01-04 05:32:18 +0100
committerMichael Brown2007-01-04 05:32:18 +0100
commit290c5ee779764d76ddded979b390008daa71aec9 (patch)
treeeb6349a6f409d9a58104c01a864c4f208ab2d613 /src/arch/i386/transitions/librm.S
parentMake open() and close() an official part of the netdevice API. (diff)
downloadipxe-290c5ee779764d76ddded979b390008daa71aec9.tar.gz
ipxe-290c5ee779764d76ddded979b390008daa71aec9.tar.xz
ipxe-290c5ee779764d76ddded979b390008daa71aec9.zip
Don't automatically call gateA20_set() when returning from a real-mode
call.
Diffstat (limited to 'src/arch/i386/transitions/librm.S')
-rw-r--r--src/arch/i386/transitions/librm.S12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/arch/i386/transitions/librm.S b/src/arch/i386/transitions/librm.S
index 32faad4a..9edbd473 100644
--- a/src/arch/i386/transitions/librm.S
+++ b/src/arch/i386/transitions/librm.S
@@ -428,8 +428,13 @@ prot_call:
* function will be passed back to the protected-mode caller. A
* result of this is that this routine cannot be called directly from
* C code, since it clobbers registers that the C ABI expects the
- * callee to preserve. Gate A20 will be re-enabled in case the
- * real-mode routine disabled it.
+ * callee to preserve. Gate A20 will *not* be automatically
+ * re-enabled. Since we always run from an even megabyte of memory,
+ * we are guaranteed to return successfully to the protected-mode
+ * code, which should then call gateA20_set() if it suspects that gate
+ * A20 may have been disabled. Note that enabling gate A20 is a
+ * potentially slow operation that may also cause keyboard input to be
+ * lost; this is why it is not done automatically.
*
* librm.h defines a convenient macro REAL_CODE() for using real_call.
* See librm.h and realmode.h for details and examples.
@@ -477,9 +482,6 @@ real_call:
.section ".text"
.code32
1:
- /* Set up environment expected by C code */
- call gateA20_set
-
/* Restore registers and return */
popal
ret