Skip to content

Commit

Permalink
Try freeing IVT memory area in case it has already been allocated.
Browse files Browse the repository at this point in the history
  • Loading branch information
manatails committed Aug 10, 2020
1 parent 3c16e04 commit 84a6807
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions MdeModulePkg/Application/UefiSeven/UefiSeven.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion MdeModulePkg/Application/UefiSeven/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
#ifndef __VERSION_H
#define __VERSION_H

#define VERSION L"1.22"
#define VERSION L"1.23"

#endif

0 comments on commit 84a6807

Please sign in to comment.