mirror of https://github.com/acidanthera/audk.git
Fix BiosVideo thunk bug about invalid legacy region area.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8099 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0cb4d53d77
commit
6c8e40caa9
|
@ -30,26 +30,25 @@ InitializeBiosIntCaller (
|
||||||
UINT32 RealModeBufferSize;
|
UINT32 RealModeBufferSize;
|
||||||
UINT32 ExtraStackSize;
|
UINT32 ExtraStackSize;
|
||||||
EFI_PHYSICAL_ADDRESS LegacyRegionBase;
|
EFI_PHYSICAL_ADDRESS LegacyRegionBase;
|
||||||
|
UINT32 LegacyRegionSize;
|
||||||
//
|
//
|
||||||
// Get LegacyRegion
|
// Get LegacyRegion
|
||||||
//
|
//
|
||||||
AsmGetThunk16Properties (&RealModeBufferSize, &ExtraStackSize);
|
AsmGetThunk16Properties (&RealModeBufferSize, &ExtraStackSize);
|
||||||
|
LegacyRegionSize = (((RealModeBufferSize + ExtraStackSize) / EFI_PAGE_SIZE) + 1) * EFI_PAGE_SIZE;
|
||||||
LegacyRegionBase = 0x100000;
|
LegacyRegionBase = 0x100000;
|
||||||
Status = gBS->AllocatePages (
|
Status = gBS->AllocatePages (
|
||||||
AllocateMaxAddress,
|
AllocateMaxAddress,
|
||||||
EfiACPIMemoryNVS,
|
EfiACPIMemoryNVS,
|
||||||
EFI_SIZE_TO_PAGES(RealModeBufferSize + ExtraStackSize + 200),
|
EFI_SIZE_TO_PAGES(LegacyRegionSize),
|
||||||
&LegacyRegionBase
|
&LegacyRegionBase
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
ThunkContext->RealModeBuffer = (VOID*)(UINTN)LegacyRegionBase;
|
ThunkContext->RealModeBuffer = (VOID*)(UINTN)LegacyRegionBase;
|
||||||
ThunkContext->RealModeBufferSize = EFI_PAGES_TO_SIZE (RealModeBufferSize);
|
ThunkContext->RealModeBufferSize = LegacyRegionSize;
|
||||||
ThunkContext->ThunkAttributes = 3;
|
ThunkContext->ThunkAttributes = THUNK_ATTRIBUTE_BIG_REAL_MODE|THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15;
|
||||||
AsmPrepareThunk16(ThunkContext);
|
AsmPrepareThunk16(ThunkContext);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -108,14 +108,14 @@ INF IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
|
||||||
# ISA Support
|
# ISA Support
|
||||||
INF PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
|
INF PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
|
||||||
INF IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
|
INF IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
|
||||||
#INF IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
|
INF IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
|
||||||
INF IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
|
INF IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
|
||||||
INF IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf
|
INF IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf
|
||||||
|
|
||||||
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
||||||
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
||||||
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
||||||
#INF DuetPkg/BiosVideoThunkDxe/BiosVideo.inf
|
INF DuetPkg/BiosVideoThunkDxe/BiosVideo.inf
|
||||||
|
|
||||||
# Binary INF file to support toggle among different CPU architectures.
|
# Binary INF file to support toggle among different CPU architectures.
|
||||||
INF FatBinPkg/EnhancedFatDxe/Fat.inf
|
INF FatBinPkg/EnhancedFatDxe/Fat.inf
|
||||||
|
|
Loading…
Reference in New Issue