Fix bug of wrong stack16 stack for thunk call. This may cause Duet failed to enter graphic mode under Qemu simulator or some platforms.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7771 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1043,6 +1043,7 @@ BiosVideoCheckForVbe (
|
||||
VESA_BIOS_EXTENSIONS_VALID_EDID_TIMING ValidEdidTiming;
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *GraphicsOutputMode;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Enter BiosVideoCheckForVbe()\n"));
|
||||
//
|
||||
// Allocate buffer under 1MB for VBE data structures
|
||||
//
|
||||
@@ -1095,26 +1096,33 @@ BiosVideoCheckForVbe (
|
||||
Regs.X.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeInformationBlock);
|
||||
Regs.X.DI = EFI_OFFSET ((UINTN) BiosVideoPrivate->VbeInformationBlock);
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Before VESA!\n"));
|
||||
LegacyBiosInt86 (BiosVideoPrivate, 0x10, &Regs);
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Call VESA! Return Status=0x%X\n", Regs.X.AX));
|
||||
DEBUG ((EFI_D_INFO, "Call VESA! VESA Signature =0x%X\n", BiosVideoPrivate->VbeInformationBlock->VESASignature));
|
||||
DEBUG ((EFI_D_INFO, "Call VESA! VESA Version =0x%X\n", BiosVideoPrivate->VbeInformationBlock->VESAVersion));
|
||||
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
|
||||
//
|
||||
// See if the VESA call succeeded
|
||||
//
|
||||
if (Regs.X.AX != VESA_BIOS_EXTENSIONS_STATUS_SUCCESS) {
|
||||
DEBUG ((EFI_D_INFO, "Fail to call VESA! Status=0x%X\n", Regs.X.AX));
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Check for 'VESA' signature
|
||||
//
|
||||
if (BiosVideoPrivate->VbeInformationBlock->VESASignature != VESA_BIOS_EXTENSIONS_VESA_SIGNATURE) {
|
||||
DEBUG ((EFI_D_INFO, "Fail to check VESA signature!\n"));
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Check to see if this is VBE 2.0 or higher
|
||||
//
|
||||
if (BiosVideoPrivate->VbeInformationBlock->VESAVersion < VESA_BIOS_EXTENSIONS_VERSION_2_0) {
|
||||
DEBUG ((EFI_D_INFO, "VBE version is little than 2.0!\n"));
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user