From owner-svn-src-projects@FreeBSD.ORG Sun Mar 14 23:52:30 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2087106566B; Sun, 14 Mar 2010 23:52:30 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0F258FC08; Sun, 14 Mar 2010 23:52:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2ENqUpR091160; Sun, 14 Mar 2010 23:52:30 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ENqUpb091154; Sun, 14 Mar 2010 23:52:30 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201003142352.o2ENqUpb091154@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 14 Mar 2010 23:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205162 - in projects/altix/sys/boot/ia64: common efi ski X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2010 23:52:30 -0000 Author: marcel Date: Sun Mar 14 23:52:30 2010 New Revision: 205162 URL: http://svn.freebsd.org/changeset/base/205162 Log: Add ia64_elf_obj to file_formats[] and unify the SKI and EFI support by moving the definition from the separate conf.c to the common exec.c. Modified: projects/altix/sys/boot/ia64/common/exec.c projects/altix/sys/boot/ia64/common/libia64.h projects/altix/sys/boot/ia64/efi/conf.c projects/altix/sys/boot/ia64/ski/conf.c projects/altix/sys/boot/ia64/ski/libski.h Modified: projects/altix/sys/boot/ia64/common/exec.c ============================================================================== --- projects/altix/sys/boot/ia64/common/exec.c Sun Mar 14 23:23:57 2010 (r205161) +++ projects/altix/sys/boot/ia64/common/exec.c Sun Mar 14 23:52:30 2010 (r205162) @@ -36,19 +36,30 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include -#include "bootstrap.h" +#include "libia64.h" -#define _KERNEL +static int elf64_exec(struct preloaded_file *amp); +static int elf64_obj_exec(struct preloaded_file *amp); -static int elf64_exec(struct preloaded_file *amp); - -struct file_format ia64_elf = { elf64_loadfile, elf64_exec }; +static struct file_format ia64_elf = { + elf64_loadfile, + elf64_exec +}; +static struct file_format ia64_elf_obj = { + elf64_obj_loadfile, + elf64_obj_exec +}; + +struct file_format *file_formats[] = { + &ia64_elf, + &ia64_elf_obj, + NULL +}; /* * Entered with psr.ic and psr.i both zero. @@ -122,3 +133,12 @@ elf64_exec(struct preloaded_file *fp) /* NOTREACHED */ return (0); } + +static int +elf64_obj_exec(struct preloaded_file *fp) +{ + + printf("%s called for preloaded file %p (=%s):\n", __func__, fp, + fp->f_name); + return (ENOSYS); +} Modified: projects/altix/sys/boot/ia64/common/libia64.h ============================================================================== --- projects/altix/sys/boot/ia64/common/libia64.h Sun Mar 14 23:23:57 2010 (r205161) +++ projects/altix/sys/boot/ia64/common/libia64.h Sun Mar 14 23:52:30 2010 (r205162) @@ -32,27 +32,29 @@ #include #include +int bi_load(struct preloaded_file *, uint64_t *); + /* * Portability functions provided by the loader * implementation specific to the platform. */ -extern uint64_t ldr_alloc(vm_offset_t); -extern int ldr_bootinfo(struct bootinfo *, uint64_t *); -extern int ldr_enter(const char *); +uint64_t ldr_alloc(vm_offset_t); +int ldr_bootinfo(struct bootinfo *, uint64_t *); +int ldr_enter(const char *); /* * Functions and variables provided by the ia64 common code * and shared by all loader implementations. */ -extern int ia64_autoload(void); +int ia64_autoload(void); -extern ssize_t ia64_copyin(const void *, vm_offset_t, size_t); -extern ssize_t ia64_copyout(vm_offset_t, void *, size_t); -extern ssize_t ia64_readin(int, vm_offset_t, size_t); - -extern char *ia64_fmtdev(struct devdesc *); -extern int ia64_getdev(void **, const char *, const char **); -extern int ia64_setcurrdev(struct env_var *, int, const void *); +ssize_t ia64_copyin(const void *, vm_offset_t, size_t); +ssize_t ia64_copyout(vm_offset_t, void *, size_t); +ssize_t ia64_readin(int, vm_offset_t, size_t); + +char *ia64_fmtdev(struct devdesc *); +int ia64_getdev(void **, const char *, const char **); +int ia64_setcurrdev(struct env_var *, int, const void *); #endif /* !_LIBIA64_H_ */ Modified: projects/altix/sys/boot/ia64/efi/conf.c ============================================================================== --- projects/altix/sys/boot/ia64/efi/conf.c Sun Mar 14 23:23:57 2010 (r205161) +++ projects/altix/sys/boot/ia64/efi/conf.c Sun Mar 14 23:52:30 2010 (r205162) @@ -69,17 +69,6 @@ struct netif_driver *netif_drivers[] = { }; /* - * Sort formats so that those that can detect based on arguments - * rather than reading the file go first. - */ -extern struct file_format ia64_elf; - -struct file_format *file_formats[] = { - &ia64_elf, - NULL -}; - -/* * Consoles * * We don't prototype these in efiboot.h because they require Modified: projects/altix/sys/boot/ia64/ski/conf.c ============================================================================== --- projects/altix/sys/boot/ia64/ski/conf.c Sun Mar 14 23:23:57 2010 (r205161) +++ projects/altix/sys/boot/ia64/ski/conf.c Sun Mar 14 23:52:30 2010 (r205162) @@ -60,18 +60,6 @@ struct fs_ops *file_system[] = { NULL }; -/* Exported for ia64 only */ -/* - * Sort formats so that those that can detect based on arguments - * rather than reading the file go first. - */ -extern struct file_format ia64_elf; - -struct file_format *file_formats[] = { - &ia64_elf, - NULL -}; - /* * Consoles * Modified: projects/altix/sys/boot/ia64/ski/libski.h ============================================================================== --- projects/altix/sys/boot/ia64/ski/libski.h Sun Mar 14 23:23:57 2010 (r205161) +++ projects/altix/sys/boot/ia64/ski/libski.h Sun Mar 14 23:52:30 2010 (r205162) @@ -46,7 +46,6 @@ extern int ski_boot(void); struct bootinfo; struct preloaded_file; -extern int bi_load(struct bootinfo *, struct preloaded_file *); #define SSC_CONSOLE_INIT 20 #define SSC_GETCHAR 21