Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2014 14:41:44 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r261928 - projects/arm64/sys/boot/arm64/efi
Message-ID:  <201402151441.s1FEfiHb052452@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <stand.h>
+#include <string.h>
+
+#include <sys/param.h>
+#include <sys/linker.h>
+#include <machine/elf.h>
+
+#include <bootstrap.h>
+
+#include <efi.h>
+#include <efilib.h>
+
+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);
+}
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402151441.s1FEfiHb052452>