From owner-svn-src-projects@FreeBSD.ORG Wed Feb 27 04:42:31 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 80ACEDA3; Wed, 27 Feb 2013 04:42:31 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 642D28F7; Wed, 27 Feb 2013 04:42:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1R4gVJ2005576; Wed, 27 Feb 2013 04:42:31 GMT (envelope-from benno@svn.freebsd.org) Received: (from benno@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1R4gUs3005570; Wed, 27 Feb 2013 04:42:30 GMT (envelope-from benno@svn.freebsd.org) Message-Id: <201302270442.r1R4gUs3005570@svn.freebsd.org> From: Benno Rice Date: Wed, 27 Feb 2013 04:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r247376 - in projects/uefi/sys/boot: common i386/efi i386/efi/amd64 i386/efi/i386 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.14 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: Wed, 27 Feb 2013 04:42:31 -0000 Author: benno Date: Wed Feb 27 04:42:30 2013 New Revision: 247376 URL: http://svnweb.freebsd.org/changeset/base/247376 Log: Remove 32-bit support. This can be resurrected later if needed but I feel that concentrating on 64-bit is more worthwhile. Added: projects/uefi/sys/boot/i386/efi/start.S - copied unchanged from r247371, projects/uefi/sys/boot/i386/efi/amd64/start.S Deleted: projects/uefi/sys/boot/i386/efi/amd64/start.S projects/uefi/sys/boot/i386/efi/i386/ projects/uefi/sys/boot/i386/efi/ldscript.i386 Modified: projects/uefi/sys/boot/common/Makefile.inc projects/uefi/sys/boot/i386/efi/Makefile projects/uefi/sys/boot/i386/efi/conf.c Modified: projects/uefi/sys/boot/common/Makefile.inc ============================================================================== --- projects/uefi/sys/boot/common/Makefile.inc Wed Feb 27 04:37:09 2013 (r247375) +++ projects/uefi/sys/boot/common/Makefile.inc Wed Feb 27 04:42:30 2013 (r247376) @@ -4,9 +4,11 @@ SRCS+= boot.c commands.c console.c devop SRCS+= interp_backslash.c interp_parse.c ls.c misc.c SRCS+= module.c panic.c -.if ${MACHINE} == "i386" || ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE} == "i386" SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c SRCS+= load_elf64.c load_elf64_obj.c reloc_elf64.c +.elif ${MACHINE_CPUARCH} == "amd64" +SRCS+= load_elf64.c load_elf64_obj.c reloc_elf64.c .elif ${MACHINE_CPUARCH} == "ia64" SRCS+= load_elf64.c load_elf64_obj.c reloc_elf64.c .elif ${MACHINE} == "pc98" Modified: projects/uefi/sys/boot/i386/efi/Makefile ============================================================================== --- projects/uefi/sys/boot/i386/efi/Makefile Wed Feb 27 04:37:09 2013 (r247375) +++ projects/uefi/sys/boot/i386/efi/Makefile Wed Feb 27 04:42:30 2013 (r247376) @@ -10,12 +10,9 @@ PROG= loader.sym INTERNALPROG= # architecture-specific loader code -SRCS= main.c exec.c conf.c vers.c reloc.c elf32_freebsd.c elf64_freebsd.c +SRCS= main.c exec.c conf.c vers.c reloc.c elf64_freebsd.c SRCS+= x86_efi_copy.c bootinfo.c bootinfo64.c autoload.c devicename.c efimd.c -SRCS+= efifb.c amd64_tramp.S - -.PATH: ${.CURDIR}/${MACHINE_CPUARCH} -SRCS+= start.S +SRCS+= efifb.c amd64_tramp.S start.S CFLAGS+= -fPIC CFLAGS+= -I. Modified: projects/uefi/sys/boot/i386/efi/conf.c ============================================================================== --- projects/uefi/sys/boot/i386/efi/conf.c Wed Feb 27 04:37:09 2013 (r247375) +++ projects/uefi/sys/boot/i386/efi/conf.c Wed Feb 27 04:42:30 2013 (r247376) @@ -54,14 +54,10 @@ struct netif_driver *netif_drivers[] = { extern struct file_format amd64_elf; extern struct file_format amd64_elf_obj; -extern struct file_format i386_elf; -extern struct file_format i386_elf_obj; struct file_format *file_formats[] = { &amd64_elf, &amd64_elf_obj, - &i386_elf, - &i386_elf_obj, NULL }; Copied: projects/uefi/sys/boot/i386/efi/start.S (from r247371, projects/uefi/sys/boot/i386/efi/amd64/start.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/uefi/sys/boot/i386/efi/start.S Wed Feb 27 04:42:30 2013 (r247376, copy of r247371, projects/uefi/sys/boot/i386/efi/amd64/start.S) @@ -0,0 +1,72 @@ +/* crt0-efi-x86_64.S - x86_64 EFI startup code. + Copyright (C) 1999 Hewlett-Packard Co. + Contributed by David Mosberger . + Copyright (C) 2005 Intel Co. + Contributed by Fenghua Yu . + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Hewlett-Packard Co. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANYDIRECT, 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. +*/ + .text + .align 4 + + .globl _start +_start: + subq $8, %rsp + pushq %rcx + pushq %rdx + +0: + lea ImageBase(%rip), %rdi + lea _DYNAMIC(%rip), %rsi + + popq %rcx + popq %rdx + pushq %rcx + pushq %rdx + call _reloc + + popq %rdi + popq %rsi + + call efi_main + addq $8, %rsp + +.exit: + ret + + // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: + + .data + .section .reloc, "a" + .long 0 + .long 10 + .word 0 +