aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/loader/arch
diff options
context:
space:
mode:
Diffstat (limited to 'stand/efi/loader/arch')
-rw-r--r--stand/efi/loader/arch/arm/exec.c13
-rw-r--r--stand/efi/loader/arch/i386/elf32_freebsd.c9
2 files changed, 15 insertions, 7 deletions
diff --git a/stand/efi/loader/arch/arm/exec.c b/stand/efi/loader/arch/arm/exec.c
index 2de99a09849f..5fdf8e3daa39 100644
--- a/stand/efi/loader/arch/arm/exec.c
+++ b/stand/efi/loader/arch/arm/exec.c
@@ -74,16 +74,19 @@ __elfN(arm_exec)(struct preloaded_file *fp)
e = (Elf_Ehdr *)&fmp->md_data;
efi_time_fini();
+
+ entry = efi_translate(e->e_entry);
+
+ printf("Kernel entry at 0x%x...\n", (unsigned)entry);
+ printf("Kernel args: %s\n", fp->f_args);
+
if ((error = bi_load(fp->f_args, &modulep, &kernend)) != 0) {
efi_time_init();
return (error);
}
- entry = efi_translate(e->e_entry);
- printf("Kernel entry at 0x%x...\n", (unsigned)entry);
- printf("Kernel args: %s\n", fp->f_args);
- printf("modulep: %#x\n", modulep);
- printf("relocation_offset %llx\n", __elfN(relocation_offset));
+ /* At this point we've called ExitBootServices, so we can't call
+ * printf or any other function that uses Boot Services */
dev_cleanup();
diff --git a/stand/efi/loader/arch/i386/elf32_freebsd.c b/stand/efi/loader/arch/i386/elf32_freebsd.c
index 83e370e6f165..847d6eead097 100644
--- a/stand/efi/loader/arch/i386/elf32_freebsd.c
+++ b/stand/efi/loader/arch/i386/elf32_freebsd.c
@@ -75,14 +75,19 @@ elf32_exec(struct preloaded_file *fp)
ehdr = (Elf_Ehdr *)&(md->md_data);
efi_time_fini();
+
+ entry = ehdr->e_entry & 0xffffff;
+
+ printf("Start @ 0x%x ...\n", entry);
+
err = bi_load(fp->f_args, &modulep, &kernend);
if (err != 0) {
efi_time_init();
return(err);
}
- entry = ehdr->e_entry & 0xffffff;
- printf("Start @ 0x%x ...\n", entry);
+ /* At this point we've called ExitBootServices, so we can't call
+ * printf or any other function that uses Boot Services */
dev_cleanup();
__exec((void *)entry, boothowto, bootdev, 0, 0, 0, bootinfop, modulep, kernend);