Index: sys/boot/common/load_elf.c =================================================================== --- sys/boot/common/load_elf.c +++ sys/boot/common/load_elf.c @@ -856,7 +856,7 @@ error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md)); if (error == EOPNOTSUPP) { md.md_cval += ef->off; - md.md_data = (void *)((uintptr_t)md.md_data + ef->off); + md.md_data = (void *)((uintptr_t)md.md_data + (uintptr_t)ef->off); } else if (error != 0) return (error); #endif Index: sys/boot/efi/Makefile =================================================================== --- sys/boot/efi/Makefile +++ sys/boot/efi/Makefile @@ -11,5 +11,9 @@ .endif # ${COMPILER_TYPE} != "gcc" +.if ${MACHINE_CPUARCH} == "ia64" +SUBDIR+= libefi +.endif + .include Index: sys/boot/efi/libefi/Makefile =================================================================== --- sys/boot/efi/libefi/Makefile +++ sys/boot/efi/libefi/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= efi INTERNALLIB= WARNS?= 2 @@ -7,6 +9,10 @@ SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \ libefi.c time.c +.if ${MACHINE_CPUARCH} == "ia64" +IGNORE_PRAGMA= 1 +.endif + .if ${MACHINE_ARCH} == "amd64" CFLAGS+= -fPIC -mno-red-zone .endif Index: sys/boot/ia64/efi/main.c =================================================================== --- sys/boot/ia64/efi/main.c +++ sys/boot/ia64/efi/main.c @@ -179,7 +179,7 @@ BS->HandleProtocol(IH, &imgid, (VOID**)&img); bzero(&currdev, sizeof(currdev)); - efi_handle_lookup(img->DeviceHandle, &currdev.d_dev, &currdev.d_unit); + efi_handle_lookup(img->DeviceHandle, &currdev.d_dev, &currdev.d_unit, NULL); currdev.d_type = currdev.d_dev->dv_type; env_setenv("loaddev", EV_VOLATILE, ia64_fmtdev(&currdev), env_noset,