[librm] Use libflat to enable A20 line on each real-to-protected transition

Use the shared code in libflat to perform the A20 transitions
automatically on each transition from real to protected mode.  This
allows us to remove all explicit calls to gateA20_set().

The old warnings about avoiding automatically enabling A20 are
essentially redundant; they date back to the time when we would always
start hammering the keyboard controller without first checking to see
if gate A20 was already enabled (which it almost always is).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2010-04-20 19:20:26 +01:00
parent 24b52ae476
commit 38cd2035ff
8 changed files with 12 additions and 227 deletions

View File

@@ -104,16 +104,6 @@ int undi_load ( struct undi_device *undi, struct undi_rom *undirom ) {
: "a" ( __from_data16 ( &undi_loader ) )
: "ebx", "ecx", "edx", "esi", "edi", "ebp" );
/* UNDI API calls may rudely change the status of A20 and not
* bother to restore it afterwards. Intel is known to be
* guilty of this.
*
* Note that we will return to this point even if A20 gets
* screwed up by the UNDI driver, because Etherboot always
* resides in an even megabyte of RAM.
*/
gateA20_set();
if ( exit != PXENV_EXIT_SUCCESS ) {
/* Clear entry point */
memset ( &undi_loader_entry, 0, sizeof ( undi_loader_entry ) );