From owner-svn-src-projects@FreeBSD.ORG Sat Feb 15 14:41:45 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78F9E7B8; Sat, 15 Feb 2014 14:41:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 65C681C90; Sat, 15 Feb 2014 14:41:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FEfjPN052455; Sat, 15 Feb 2014 14:41:45 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FEfiHb052452; Sat, 15 Feb 2014 14:41:44 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201402151441.s1FEfiHb052452@svn.freebsd.org> From: Andrew Turner Date: Sat, 15 Feb 2014 14:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r261928 - projects/arm64/sys/boot/arm64/efi X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.17 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: Sat, 15 Feb 2014 14:41:45 -0000 Author: andrew Date: Sat Feb 15 14:41:44 2014 New Revision: 261928 URL: http://svnweb.freebsd.org/changeset/base/261928 Log: Start to support loading the kernel from loader. Added: projects/arm64/sys/boot/arm64/efi/exec.c (contents, props changed) Modified: projects/arm64/sys/boot/arm64/efi/Makefile projects/arm64/sys/boot/arm64/efi/conf.c Modified: projects/arm64/sys/boot/arm64/efi/Makefile ============================================================================== --- projects/arm64/sys/boot/arm64/efi/Makefile Sat Feb 15 14:36:33 2014 (r261927) +++ projects/arm64/sys/boot/arm64/efi/Makefile Sat Feb 15 14:41:44 2014 (r261928) @@ -11,7 +11,7 @@ INTERNALPROG= # architecture-specific loader code SRCS= start.S main.c conf.c vers.c reloc.c autoload.c -SRCS+= devicename.c +SRCS+= devicename.c exec.c CFLAGS+= -fno-builtin CFLAGS+= -I${.CURDIR} Modified: projects/arm64/sys/boot/arm64/efi/conf.c ============================================================================== --- projects/arm64/sys/boot/arm64/efi/conf.c Sat Feb 15 14:36:33 2014 (r261927) +++ projects/arm64/sys/boot/arm64/efi/conf.c Sat Feb 15 14:41:44 2014 (r261928) @@ -56,10 +56,6 @@ struct netif_driver *netif_drivers[] = { NULL }; -struct file_format *file_formats[] = { - NULL -}; - extern struct console efi_console; struct console *consoles[] = { Added: projects/arm64/sys/boot/arm64/efi/exec.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm64/sys/boot/arm64/efi/exec.c Sat Feb 15 14:41:44 2014 (r261928) @@ -0,0 +1,70 @@ +/*- + * Copyright (c) 2006 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include + +#include + +#include +#include + +static int elf64_exec(struct preloaded_file *amp); +static int elf64_obj_exec(struct preloaded_file *amp); + +static struct file_format arm64_elf = { + elf64_loadfile, + elf64_exec +}; + +struct file_format *file_formats[] = { + &arm64_elf, + NULL +}; + +static int +elf64_exec(struct preloaded_file *fp) +{ + printf("elf64_exec\n"); + return (EINVAL); +} + +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); +} +