Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Jun 2012 13:37:47 +0000
From:      emc2@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r237213 - soc2012/emc2/experimental
Message-ID:  <20120606133747.17C261065670@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emc2
Date: Wed Jun  6 13:37:46 2012
New Revision: 237213
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=237213

Log:
  Forgot to commit adding this.  For some reason, the linking process seems
  to be getting the addresses of called functions wrong.  This is causing
  attempts to run anything I produce from this directory, as well as
  loader.efi to hang.
  

Added:
  soc2012/emc2/experimental/start.S
Modified:
  soc2012/emc2/experimental/helloworld.c

Modified: soc2012/emc2/experimental/helloworld.c
==============================================================================
--- soc2012/emc2/experimental/helloworld.c	Wed Jun  6 13:28:41 2012	(r237212)
+++ soc2012/emc2/experimental/helloworld.c	Wed Jun  6 13:37:46 2012	(r237213)
@@ -5,8 +5,8 @@
 
 EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE* systab)
 {
-
+  /*
   systab->ConOut->OutputString(systab->ConOut, str);
-
+  */
   return EFI_SUCCESS;
 }

Added: soc2012/emc2/experimental/start.S
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2012/emc2/experimental/start.S	Wed Jun  6 13:37:46 2012	(r237213)
@@ -0,0 +1,58 @@
+/*-
+ * Copyright (c) 2008-2010 Rui Paulo <rpaulo@FreeBSD.org>
+ * 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
+ *
+ *	$FreeBSD: soc2012/emc2/head/sys/boot/i386/efi/start.S 206419 2010-04-07 18:16:05Z rpaulo $
+ */
+
+	.text
+
+#include <machine/asm.h>
+
+#define EFI_SUCCESS		0
+
+/*
+ * EFI entry point. 
+ * _start(EFI_IMAGE image_handle, EFI_SYSTEM_TABLE *system_table);
+ *
+ * We calculate the base address along with _DYNAMIC, relocate us and finally
+ * pass control to efi_main.
+ */
+
+ENTRY(_start)
+	pushl	%ebp
+	movl	%esp, %ebp
+
+	pushl	12(%ebp)	/* image_handle */
+	pushl	8(%ebp)		/* system_table */
+	call	efi_main
+	leave
+	ret
+END(_start)
+
+	.data
+	.section .reloc, "a"
+	.long	0
+	.long	10
+	.word	0



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