mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 01:52:39 +03:00
[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:
@@ -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 ) );
|
||||
|
||||
Reference in New Issue
Block a user