diff --git a/sys/boot/ia64/efi/Makefile b/sys/boot/ia64/efi/Makefile index 7c2f631c984d..a3b126f3c3c2 100644 --- a/sys/boot/ia64/efi/Makefile +++ b/sys/boot/ia64/efi/Makefile @@ -2,7 +2,7 @@ PROG= loader.sym INTERNALPROG= -SRCS= conf.c dev_net.c main.c start.S vers.c +SRCS= conf.c dev_net.c efimd.c main.c start.S vers.c NOMAN= CFLAGS+= -DLOADER @@ -47,11 +47,16 @@ vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} OBJCOPY?= objcopy +OBJDUMP?= objdump loader.efi: loader.sym + if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \ + ${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \ + exit 1; \ + fi ${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \ -j .rela.dyn -j .reloc -j .sdata -j .text \ - --target=efi-app-${MACHINE_ARCH} loader.sym loader.efi + --target=efi-app-${MACHINE_ARCH} ${.ALLSRC} ${.TARGET} loader.help: help.common cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk \ diff --git a/sys/boot/ia64/efi/efimd.c b/sys/boot/ia64/efi/efimd.c new file mode 100644 index 000000000000..1ff40901e1ed --- /dev/null +++ b/sys/boot/ia64/efi/efimd.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2004 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 + +EFI_PHYSICAL_ADDRESS +efimd_va2pa(EFI_VIRTUAL_ADDRESS va) +{ + + return (IA64_RR_MASK(va)); +}