svn commit: r307327 - in head: sys/boot/efi/loader/arch/i386 targets/pseudo/userland/misc
Sean Bruno
sbruno at FreeBSD.org
Fri Oct 14 17:25:30 UTC 2016
Author: sbruno
Date: Fri Oct 14 17:25:29 2016
New Revision: 307327
URL: https://svnweb.freebsd.org/changeset/base/307327
Log:
Update i386 build of loader.efi (but leave it disabled) so that we at
least build it now.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D7801
Modified:
head/sys/boot/efi/loader/arch/i386/efimd.c
head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c
head/sys/boot/efi/loader/arch/i386/exec.c
head/targets/pseudo/userland/misc/Makefile.depend
Modified: head/sys/boot/efi/loader/arch/i386/efimd.c
==============================================================================
--- head/sys/boot/efi/loader/arch/i386/efimd.c Fri Oct 14 17:10:53 2016 (r307326)
+++ head/sys/boot/efi/loader/arch/i386/efimd.c Fri Oct 14 17:25:29 2016 (r307327)
@@ -48,7 +48,10 @@ static EFI_GUID hcdp_guid = HCDP_TABLE_G
static UINTN mapkey;
-uint64_t
+int ldr_bootinfo(struct bootinfo *, uint64_t *);
+int ldr_enter(const char *);
+
+static uint64_t
ldr_alloc(vm_offset_t va)
{
Modified: head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c
==============================================================================
--- head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c Fri Oct 14 17:10:53 2016 (r307326)
+++ head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c Fri Oct 14 17:25:29 2016 (r307327)
@@ -35,12 +35,16 @@ __FBSDID("$FreeBSD$");
#include <machine/elf.h>
#include <stand.h>
+#include <efi.h>
+#include <efilib.h>
+
#include "bootstrap.h"
#include "../libi386/libi386.h"
#include "../btx/lib/btxv86.h"
extern void __exec(caddr_t addr, ...);
-
+extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp);
+extern int ldr_enter(const char *kernel);
static int elf32_exec(struct preloaded_file *amp);
static int elf32_obj_exec(struct preloaded_file *amp);
@@ -72,14 +76,14 @@ elf32_exec(struct preloaded_file *fp)
ehdr = (Elf_Ehdr *)&(md->md_data);
efi_time_fini();
- err = bi_load(fp->f_args, &boothowto, &bootdev, &bootinfop, &modulep, &kernend);
+ err = bi_load(fp->f_args, &modulep, &kernend);
if (err != 0) {
efi_time_init();
return(err);
}
entry = ehdr->e_entry & 0xffffff;
- printf("Start @ 0x%lx ...\n", entry);
+ printf("Start @ 0x%x ...\n", entry);
ldr_enter(fp->f_name);
Modified: head/sys/boot/efi/loader/arch/i386/exec.c
==============================================================================
--- head/sys/boot/efi/loader/arch/i386/exec.c Fri Oct 14 17:10:53 2016 (r307326)
+++ head/sys/boot/efi/loader/arch/i386/exec.c Fri Oct 14 17:25:29 2016 (r307327)
@@ -36,6 +36,12 @@ __FBSDID("$FreeBSD$");
uint32_t __base;
struct __v86 __v86;
+/* XXX - Needed a definition here to implicitly define exit(); do not remove. */
+static void
+exit(int x)
+{
+}
+
void
__v86int()
{
Modified: head/targets/pseudo/userland/misc/Makefile.depend
==============================================================================
--- head/targets/pseudo/userland/misc/Makefile.depend Fri Oct 14 17:10:53 2016 (r307326)
+++ head/targets/pseudo/userland/misc/Makefile.depend Fri Oct 14 17:25:29 2016 (r307327)
@@ -77,7 +77,7 @@ DIRDEPS.amd64+= \
DIRDEPS.arm= ${_sys_boot_fdt} ${_sys_boot_efi}
DIRDEPS.arm64= ${_sys_boot_fdt} ${_sys_boot_efi}
-DIRDEPS.i386= ${DIRDEPS.x86sys} sys/boot/efi/libefi
+DIRDEPS.i386= ${DIRDEPS.x86sys} ${_sys_boot_efi}
DIRDEPS.powerpc= ${_sys_boot_fdt} sys/boot/libstand32 sys/boot/ofw sys/boot/uboot
DIRDEPS.pc98= sys/boot/libstand32
DIRDEPS.sparc64= sys/boot/ofw ${_sys_boot_zfs}
More information about the svn-src-head
mailing list