Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2014 21:18:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 192324] [uefi] 2014-07-14 11.0-CURRENT snapshot doesn't boot
Message-ID:  <bug-192324-8-uNOpMwHwKV@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-192324-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-192324-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192324

--- Comment #3 from Matt Smith <mgsmith@netgate.com> ---
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-192324-8-uNOpMwHwKV>