diff --git a/MdeModulePkg/Application/UefiSeven/UefiSeven.c b/MdeModulePkg/Application/UefiSeven/UefiSeven.c index 464c47322..39fe5dafb 100644 --- a/MdeModulePkg/Application/UefiSeven/UefiSeven.c +++ b/MdeModulePkg/Application/UefiSeven/UefiSeven.c @@ -57,12 +57,18 @@ UefiMain ( EFI_PHYSICAL_ADDRESS IvtAddress; EFI_STATUS Status; EFI_STATUS IvtAllocationStatus; + EFI_STATUS IvtFreeStatus; EFI_INPUT_KEY Key; CHAR16 *LaunchPath = NULL; CHAR16 *EfiFilePath = NULL; CHAR16 *VerboseFilePath = NULL; CHAR16 *SkipFilePath = NULL; + // + // Try freeing IVT memory area in case it has already been allocated. + // + IvtFreeStatus = gBS->FreePages(IVT_ADDRESS, 1); + // // Claim real mode IVT memory area before any allocation can // grab it. This can be done as the IDT has already been @@ -71,6 +77,8 @@ UefiMain ( IvtAddress = IVT_ADDRESS; IvtAllocationStatus = gBS->AllocatePages(AllocateAddress, EfiBootServicesCode, 1, &IvtAddress); + PrintDebug(L"Force free IVT area result: %r\n", IvtFreeStatus); + // // Initialization. // diff --git a/MdeModulePkg/Application/UefiSeven/Version.h b/MdeModulePkg/Application/UefiSeven/Version.h index 35bee4f55..e5c704d33 100644 --- a/MdeModulePkg/Application/UefiSeven/Version.h +++ b/MdeModulePkg/Application/UefiSeven/Version.h @@ -16,6 +16,6 @@ #ifndef __VERSION_H #define __VERSION_H -#define VERSION L"1.22" +#define VERSION L"1.23" #endif