FreeBSD Bugzilla – Attachment 160058 Details for
Bug 202455
[EFI] boot/loader.efi: ExitBootServices() returned 0x8000000000000002
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-sys-boot-efi-loader-arch-amd64-elf64_freebsd.c
patch-sys-boot-efi-loader-arch-amd64-elf64_freebsd.c (text/plain), 1.62 KB, created by
Ganael LAPLANCHE
on 2015-08-19 10:31:07 UTC
(
hide
)
Description:
patch-sys-boot-efi-loader-arch-amd64-elf64_freebsd.c
Filename:
MIME Type:
Creator:
Ganael LAPLANCHE
Created:
2015-08-19 10:31:07 UTC
Size:
1.62 KB
patch
obsolete
>Index: sys/boot/efi/loader/arch/amd64/elf64_freebsd.c >=================================================================== >--- sys/boot/efi/loader/arch/amd64/elf64_freebsd.c (revision 286279) >+++ sys/boot/efi/loader/arch/amd64/elf64_freebsd.c (working copy) >@@ -101,6 +101,9 @@ > char buf[24]; > int revision; > EFI_STATUS status; >+ EFI_MEMORY_DESCRIPTOR *map; >+ UINTN mmsz, sz; >+ UINT32 mmver; > > rsdp = efi_get_table(&acpi20_guid); > if (rsdp == NULL) { >@@ -176,9 +179,30 @@ > > status = BS->ExitBootServices(IH, efi_mapkey); > if (EFI_ERROR(status)) { >- printf("%s: ExitBootServices() returned 0x%lx\n", __func__, >- (long)status); >- return (EINVAL); >+ /* Map key is incorrect, update it and retry */ >+ printf("%s: ExitBootServices() returned 0x%lx, re-fetching " >+ "memory map key and retrying\n", __func__, (long)status); >+ sz = 0; >+ status = BS->GetMemoryMap(&sz, 0, &efi_mapkey, &mmsz, &mmver); >+ if (status != EFI_BUFFER_TOO_SMALL) { >+ printf("%s: GetMemoryMap() returned 0x%lx, cannot read " >+ "memory map size\n", __func__, (long)status); >+ return (EINVAL); >+ } >+ map = malloc(sz); >+ status = BS->GetMemoryMap(&sz, map, &efi_mapkey, &mmsz, &mmver); >+ free(map); /* The only thing we need is an updated map key */ >+ if (EFI_ERROR(status)) { >+ printf("%s: GetMemoryMap() returned 0x%lx, cannot read " >+ "memory map key\n", __func__, (long)status); >+ return (EINVAL); >+ } >+ status = BS->ExitBootServices(IH, efi_mapkey); >+ if (EFI_ERROR(status)) { >+ printf("%s: ExitBootServices() returned 0x%lx, no try " >+ "left\n", __func__, (long)status); >+ return (EINVAL); >+ } > } > > dev_cleanup();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 202455
:
160058
|
163513
|
163954