From owner-svn-soc-all@FreeBSD.ORG Wed Jun 6 13:37:49 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 17C261065670 for ; Wed, 6 Jun 2012 13:37:47 +0000 (UTC) (envelope-from emc2@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Wed, 06 Jun 2012 13:37:47 +0000 Date: Wed, 06 Jun 2012 13:37:47 +0000 From: emc2@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120606133747.17C261065670@hub.freebsd.org> Cc: Subject: socsvn commit: r237213 - soc2012/emc2/experimental X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 13:37:49 -0000 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 + * 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 + +#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