Skip to content

Commit

Permalink
Merge pull request #14 from HonokaNo/bug-of-print
Browse files Browse the repository at this point in the history
fixed bug
  • Loading branch information
uchan-nos authored Apr 11, 2021
2 parents d51271d + d36c6ee commit a68d282
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions MikanLoaderPkg/Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,22 +401,6 @@ EFI_STATUS EFIAPI UefiMain(
}
}

status = gBS->ExitBootServices(image_handle, memmap.map_key);
if (EFI_ERROR(status)) {
status = GetMemoryMap(&memmap);
if (EFI_ERROR(status)) {
Print(L"failed to get memory map: %r\n", status);
Halt();
}
status = gBS->ExitBootServices(image_handle, memmap.map_key);
if (EFI_ERROR(status)) {
Print(L"Could not exit boot service: %r\n", status);
Halt();
}
}

UINT64 entry_addr = *(UINT64*)(kernel_first_addr + 24);

struct FrameBufferConfig config = {
(UINT8*)gop->Mode->FrameBufferBase,
gop->Mode->Info->PixelsPerScanLine,
Expand All @@ -436,6 +420,22 @@ EFI_STATUS EFIAPI UefiMain(
Halt();
}

status = gBS->ExitBootServices(image_handle, memmap.map_key);
if (EFI_ERROR(status)) {
status = GetMemoryMap(&memmap);
if (EFI_ERROR(status)) {
Print(L"failed to get memory map: %r\n", status);
Halt();
}
status = gBS->ExitBootServices(image_handle, memmap.map_key);
if (EFI_ERROR(status)) {
Print(L"Could not exit boot service: %r\n", status);
Halt();
}
}

UINT64 entry_addr = *(UINT64*)(kernel_first_addr + 24);

VOID* acpi_table = NULL;
for (UINTN i = 0; i < system_table->NumberOfTableEntries; ++i) {
if (CompareGuid(&gEfiAcpiTableGuid,
Expand Down

0 comments on commit a68d282

Please sign in to comment.