From owner-svn-src-all@freebsd.org Fri Oct 14 17:25:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC596C122FD; Fri, 14 Oct 2016 17:25:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 9695C3C6; Fri, 14 Oct 2016 17:25:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9EHPTRP096073; Fri, 14 Oct 2016 17:25:29 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9EHPT5p096069; Fri, 14 Oct 2016 17:25:29 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201610141725.u9EHPT5p096069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 14 Oct 2016 17:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307327 - in head: sys/boot/efi/loader/arch/i386 targets/pseudo/userland/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2016 17:25:30 -0000 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 #include +#include +#include + #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}