Check if active video mode is changed after OpROM starts, if active video mode is not changed, skip INT10 calls to improve performance.
Signed-off-by: Li Elvin <elvin.li@intel.com> Reviewed-by: Yao Jiewen<jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13609 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -2380,7 +2380,7 @@ LegacyBiosInstallRom (
|
||||
//
|
||||
// Store current mode settings since PrepareToScanRom may change mode.
|
||||
//
|
||||
VideoMode = *(UINT8 *) ((UINTN) 0x449);
|
||||
VideoMode = *(UINT8 *) ((UINTN) (0x400 + BDA_VIDEO_MODE));
|
||||
}
|
||||
//
|
||||
// Notify the platform that we are about to scan the ROM
|
||||
@@ -2520,9 +2520,14 @@ LegacyBiosInstallRom (
|
||||
//
|
||||
// Set mode settings since PrepareToScanRom may change mode
|
||||
//
|
||||
Regs.H.AH = 0x00;
|
||||
Regs.H.AL = VideoMode;
|
||||
Private->LegacyBios.Int86 (&Private->LegacyBios, 0x10, &Regs);
|
||||
if (VideoMode != *(UINT8 *) ((UINTN) (0x400 + BDA_VIDEO_MODE))) {
|
||||
//
|
||||
// The active video mode is changed, restore it to original mode.
|
||||
//
|
||||
Regs.H.AH = 0x00;
|
||||
Regs.H.AL = VideoMode;
|
||||
Private->LegacyBios.Int86 (&Private->LegacyBios, 0x10, &Regs);
|
||||
}
|
||||
}
|
||||
//
|
||||
// Regs.X.AX from the adapter initializion is ignored since some adapters
|
||||
|
Reference in New Issue
Block a user