Date: Fri, 29 Nov 2013 20:28:37 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r258754 - projects/uefi/sys/boot/amd64/efi Message-ID: <201311292028.rATKSbMJ097828@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Fri Nov 29 20:28:37 2013 New Revision: 258754 URL: http://svnweb.freebsd.org/changeset/base/258754 Log: Avoid printf after GetMemoryMap The printf may invalidate the memory map obtained in bi_load (resulting in a new MapKey), which then causes ExitBootServices to fail. Some more work is still needed to address GetMemoryMap retries for other situations that may invalidate the memory map, but this change at least allowed me to boot on an Intel DQ77MK system. Sponsored by: The FreeBSD Foundation Modified: projects/uefi/sys/boot/amd64/efi/elf64_freebsd.c Modified: projects/uefi/sys/boot/amd64/efi/elf64_freebsd.c ============================================================================== --- projects/uefi/sys/boot/amd64/efi/elf64_freebsd.c Fri Nov 29 20:19:00 2013 (r258753) +++ projects/uefi/sys/boot/amd64/efi/elf64_freebsd.c Fri Nov 29 20:28:37 2013 (r258754) @@ -159,12 +159,12 @@ elf64_exec(struct preloaded_file *fp) PT2[i] |= PG_V | PG_RW | PG_PS | PG_U; } + printf("Start @ 0x%lx ...\n", ehdr->e_entry); + err = bi_load(fp->f_args, &modulep, &kernend); if (err != 0) return(err); - printf("Start @ 0x%lx ...\n", ehdr->e_entry); - status = BS->ExitBootServices(IH, x86_efi_mapkey); if (EFI_ERROR(status)) { printf("%s: ExitBootServices() returned 0x%lx\n", __func__,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311292028.rATKSbMJ097828>