From owner-freebsd-bugs@FreeBSD.ORG Thu Sep 25 21:18:03 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45352E17 for ; Thu, 25 Sep 2014 21:18:03 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2535C159 for ; Thu, 25 Sep 2014 21:18:03 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8PLI3QJ009445 for ; Thu, 25 Sep 2014 21:18:03 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 192324] [uefi] 2014-07-14 11.0-CURRENT snapshot doesn't boot Date: Thu, 25 Sep 2014 21:18:03 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: uefi X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mgsmith@netgate.com X-Bugzilla-Status: Open X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2014 21:18:03 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192324 --- Comment #3 from Matt Smith --- I attempted to debug it a little further. I added debugging statements around the code where the last messages get printed: Index: sys/boot/amd64/efi/copy.c =================================================================== --- sys/boot/amd64/efi/copy.c (revision 272035) +++ sys/boot/amd64/efi/copy.c (working copy) @@ -91,6 +91,7 @@ void x86_efi_copy_finish(void) { + printf("BEGIN %s\n", __func__); uint64_t *src, *dst, *last; src = (uint64_t *)staging; @@ -99,4 +100,5 @@ while (src < last) *dst++ = *src++; + printf("END %s\n", __func__); } Index: sys/boot/amd64/efi/elf64_freebsd.c =================================================================== --- sys/boot/amd64/efi/elf64_freebsd.c (revision 272035) +++ sys/boot/amd64/efi/elf64_freebsd.c (working copy) @@ -167,8 +167,10 @@ err = bi_load(fp->f_args, &modulep, &kernend); if (err != 0) return(err); + printf("after bi_load\n"); status = BS->ExitBootServices(IH, x86_efi_mapkey); + printf("after ExitBootServices\n"); if (EFI_ERROR(status)) { printf("%s: ExitBootServices() returned 0x%lx\n", __func__, (long)status); @@ -176,9 +178,13 @@ } dev_cleanup(); + printf("after dev_cleanup\n"); + printf("kernend is %u, modulep is %u, PT4 is %u, ehdr->e_entry is %u\n", + kernend, modulep, PT4, ehdr->e_entry); trampoline(trampstack, x86_efi_copy_finish, kernend, modulep, PT4, ehdr->e_entry); + printf("after trampoline\n"); panic("exec returned"); } Here's the output: Loading /boot/defaults/loader.conf /boot/kernel/kernel text=0xfd1f00 data=0x12a530+0x608630 syms=[0x8+0x142c80+0x8+0x15dc80] Hit [Enter] to boot immediately, or any other key for command prompt. Type '?' for a list of commands, 'help' for more detailed help. OK set kern.vty=vt OK set comconsole_speed=115200 OK set console=comconsole OK set hw.textmode=1 OK boot -v Booting... Start @ 0xffffffff802dd000 ... EFI framebuffer information: addr, size 0x80000000, 0x7e9000 dimensions 1920 x 1080 stride 1920 masks 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 after bi_load after ExitBootServices after dev_cleanup kernend is 31100928, modulep is 31092736, PT4 is 1073725440, ehdr->e_entry is 2150486016 BEGIN x86_efi_copy_finish END x86_efi_copy_finish After that, there is no further output. So the trampoline call is invoked and runs at least to the point where it invokes x68_efi_copy_finish. I'm not too familiar with assembly code & hardware registers so I can't tell anything beyond that. -- You are receiving this mail because: You are the assignee for the bug.