grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 1/6] ia64: Remove support


From: Ard Biesheuvel
Subject: [PATCH v2 1/6] ia64: Remove support
Date: Thu, 11 May 2023 14:06:35 +0200

Itanium IA-64 support is obsolete, and implements its own flavor of EFI
boot that deviates from other architectures. Given that IA64 is unused
and unmaintained, it makes no sense to pretend that the EFI changes we
are making are tested or supported on IA64, so let's just get rid of it.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 .travis.yml                       |   7 +-
 Makefile.util.def                 |   1 -
 configure.ac                      |   8 -
 docs/grub-dev.texi                |   2 +-
 docs/grub.texi                    |   2 +-
 gentpl.py                         |   6 +-
 grub-core/Makefile.am             |   6 -
 grub-core/Makefile.core.def       |  15 -
 grub-core/commands/file.c         |  33 --
 grub-core/kern/dl.c               |  12 -
 grub-core/kern/emu/cache.c        |   4 +-
 grub-core/kern/emu/cache_s.S      |   2 +-
 grub-core/kern/emu/lite.c         |   3 -
 grub-core/kern/ia64/cache.c       |  35 --
 grub-core/kern/ia64/dl.c          | 150 -----
 grub-core/kern/ia64/dl_helper.c   | 241 --------
 grub-core/kern/ia64/efi/init.c    |  80 ---
 grub-core/kern/ia64/efi/startup.S |  44 --
 grub-core/kern/misc.c             |   2 +-
 grub-core/lib/efi/halt.c          |   2 +-
 grub-core/lib/ia64/longjmp.S      | 162 ------
 grub-core/lib/ia64/setjmp.S       | 177 ------
 grub-core/lib/setjmp.S            |   3 -
 grub-core/loader/ia64/efi/linux.c | 607 --------------------
 include/grub/cache.h              |   2 +-
 include/grub/dl.h                 |  12 +-
 include/grub/efi/pe32.h           |   2 -
 include/grub/elf.h                | 109 ----
 include/grub/ia64/efi/memory.h    |   6 -
 include/grub/ia64/efi/time.h      |  23 -
 include/grub/ia64/kernel.h        |  25 -
 include/grub/ia64/reloc.h         |  44 --
 include/grub/ia64/setjmp.h        |  28 -
 include/grub/ia64/time.h          |  28 -
 include/grub/ia64/types.h         |  32 --
 include/grub/misc.h               |   2 +-
 include/grub/util/install.h       |   1 -
 include/grub/util/mkimage.h       |   2 -
 tests/core_compress_test.in       |   2 +-
 util/grub-install-common.c        |   1 -
 util/grub-install.c               |  16 -
 util/grub-mkimage.c               |   1 -
 util/grub-mkimagexx.c             | 175 +-----
 util/grub-mknetdir.c              |   1 -
 util/grub-mkrescue.c              |   7 -
 util/grub-module-verifier.c       |  22 -
 util/mkimage.c                    |  17 -
 47 files changed, 16 insertions(+), 2146 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 4bd05a30a27ad15c..7bea51b2f0c4da89 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,7 +23,7 @@ addons:
 env:
   global:
     # Include all cross toolchain paths, so we can just call them later down.
-    - 
PATH=/tmp/qemu-install/bin:/tmp/grub/bin:/usr/bin:/bin:/tmp/cross/gcc-8.1.0-nolibc/aarch64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/arm-linux-gnueabi/bin:/tmp/cross/gcc-8.1.0-nolibc/ia64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/mips64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/powerpc64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/riscv32-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/riscv64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/sparc64-linux/bin
+    - 
PATH=/tmp/qemu-install/bin:/tmp/grub/bin:/usr/bin:/bin:/tmp/cross/gcc-8.1.0-nolibc/aarch64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/arm-linux-gnueabi/bin:/tmp/cross/gcc-8.1.0-nolibc/mips64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/powerpc64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/riscv32-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/riscv64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/sparc64-linux/bin
 
 before_script:
   # Install necessary toolchains based on $CROSS_TARGETS variable.
@@ -44,7 +44,6 @@ script:
       arch=${target%-*};
       [ "$arch" = "arm64" ] && arch=aarch64-linux;
       [ "$arch" = "arm" ] && arch=arm-linux-gnueabi;
-      [ "$arch" = "ia64" ] && arch=ia64-linux;
       [ "$arch" = "mipsel" ] && arch=mips64-linux;
       [ "$arch" = "powerpc" ] && arch=powerpc64-linux;
       [ "$arch" = "riscv32" ] && arch=riscv32-linux;
@@ -83,10 +82,6 @@ matrix:
       env:
         - GRUB_TARGETS="sparc64-ieee1275"
         - CROSS_TARGETS="sparc64-linux"
-    - name: "ia64"
-      env:
-        - GRUB_TARGETS="ia64-efi"
-        - CROSS_TARGETS="ia64-linux"
     - name: "mips"
       env:
         - GRUB_TARGETS="mips-arc mipsel-arc mipsel-qemu_mips mips-qemu_mips"
diff --git a/Makefile.util.def b/Makefile.util.def
index beaef1168f0d09b0..ae9e628e5c85b751 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -160,7 +160,6 @@ library = {
   common = grub-core/io/gzio.c;
   common = grub-core/io/xzio.c;
   common = grub-core/io/lzopio.c;
-  common = grub-core/kern/ia64/dl_helper.c;
   common = grub-core/kern/arm/dl_helper.c;
   common = grub-core/kern/arm64/dl_helper.c;
   common = grub-core/lib/minilzo/minilzo.c;
diff --git a/configure.ac b/configure.ac
index ca42ff8f73182511..789e5658e4d9ab9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,7 +141,6 @@ if test "x$with_platform" = x; then
     sparc64-*) platform=ieee1275 ;;
     mipsel-*) platform=loongson ;;
     mips-*) platform=arc ;;
-    ia64-*) platform=efi ;;
     arm-*) platform=uboot ;;
     arm64-*) platform=efi ;;
     riscv32-*) platform=efi ;;
@@ -180,7 +179,6 @@ case "$target_cpu"-"$platform" in
   i386-qemu) ;;
   powerpc-ieee1275) ;;
   sparc64-ieee1275) ;;
-  ia64-efi) ;;
   mips-qemu_mips) ;;
   mips-qemu-mips) platform=qemu_mips;;
   mips-arc) ;;
@@ -890,11 +888,6 @@ if test x"$platform" != xemu ; then
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
                         
[grub_cv_target_cc_soft_float="-march=rv64imac_zicsr_zifencei -mabi=lp64"], [])
     fi
-    if test "x$target_cpu" = xia64; then
-       CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt 
-Werror"
-       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
-                        
[grub_cv_target_cc_soft_float="-mno-inline-float-divide -mno-inline-sqrt"], [])
-    fi
     if test "x$target_cpu" = xsh4; then
        CFLAGS="$TARGET_CFLAGS -m4-nofpu -Werror"
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
@@ -1997,7 +1990,6 @@ AM_CONDITIONAL([COND_arm_coreboot], [test x$target_cpu = 
xarm -a x$platform = xc
 AM_CONDITIONAL([COND_arm_efi], [test x$target_cpu = xarm -a x$platform = xefi])
 AM_CONDITIONAL([COND_arm64], [test x$target_cpu = xarm64 ])
 AM_CONDITIONAL([COND_arm64_efi], [test x$target_cpu = xarm64 -a x$platform = 
xefi])
-AM_CONDITIONAL([COND_ia64_efi], [test x$target_cpu = xia64 -a x$platform = 
xefi])
 AM_CONDITIONAL([COND_i386_pc], [test x$target_cpu = xi386 -a x$platform = xpc])
 AM_CONDITIONAL([COND_i386_efi], [test x$target_cpu = xi386 -a x$platform = 
xefi])
 AM_CONDITIONAL([COND_i386_qemu], [test x$target_cpu = xi386 -a x$platform = 
xqemu])
diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
index 31eb99ea29943c39..ab68676b03814cfc 100644
--- a/docs/grub-dev.texi
+++ b/docs/grub-dev.texi
@@ -753,7 +753,7 @@ ones (sorry that this list is duplicated):
 GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot",
                    "i386_multiboot", "i386_ieee1275", "x86_64_efi",
                    "mips_loongson", "sparc64_ieee1275",
-                   "powerpc_ieee1275", "mips_arc", "ia64_efi",
+                   "powerpc_ieee1275", "mips_arc",
                    "mips_qemu_mips", "s390_mainframe" ]
 @end example
 
diff --git a/docs/grub.texi b/docs/grub.texi
index a3e9ce2d1ac7e780..c0b7f832f79f7c16 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -6848,7 +6848,7 @@ X86 support is summarised in the following table. ``Yes'' 
means that the kernel
 @item Requires ACPI
 @end enumerate
 
-PowerPC, IA64 and Sparc64 ports support only Linux. MIPS port supports Linux
+PowerPC and Sparc64 ports support only Linux. MIPS port supports Linux
 and multiboot2.
 
 @section Boot tests
diff --git a/gentpl.py b/gentpl.py
index 88abe5b0a119321c..2b5ead8afad95cd7 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -30,7 +30,7 @@ GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", 
"i386_coreboot",
                    "i386_multiboot", "i386_ieee1275", "x86_64_efi",
                    "i386_xen", "x86_64_xen", "i386_xen_pvh",
                    "mips_loongson", "sparc64_ieee1275",
-                   "powerpc_ieee1275", "mips_arc", "ia64_efi",
+                   "powerpc_ieee1275", "mips_arc",
                    "mips_qemu_mips", "arm_uboot", "arm_efi", "arm64_efi",
                    "arm_coreboot", "riscv32_efi", "riscv64_efi" ]
 
@@ -51,7 +51,7 @@ GROUPS["riscv32"]  = [ "riscv32_efi" ]
 GROUPS["riscv64"]  = [ "riscv64_efi" ]
 
 # Groups based on firmware
-GROUPS["efi"]  = [ "i386_efi", "x86_64_efi", "ia64_efi", "arm_efi", 
"arm64_efi",
+GROUPS["efi"]  = [ "i386_efi", "x86_64_efi", "arm_efi", "arm64_efi",
                   "riscv32_efi", "riscv64_efi" ]
 GROUPS["ieee1275"]   = [ "i386_ieee1275", "sparc64_ieee1275", 
"powerpc_ieee1275" ]
 GROUPS["uboot"] = [ "arm_uboot" ]
@@ -83,7 +83,7 @@ GROUPS["fdt"] = [ "arm64_efi", "arm_uboot", "arm_efi", 
"riscv32_efi", "riscv64_e
 
 # Needs software helpers for division
 # Must match GRUB_DIVISION_IN_SOFTWARE in misc.h
-GROUPS["softdiv"] = GROUPS["arm"] + ["ia64_efi"] + GROUPS["riscv32"]
+GROUPS["softdiv"] = GROUPS["arm"] + GROUPS["riscv32"]
 GROUPS["no_softdiv"]   = GRUB_PLATFORMS[:]
 for i in GROUPS["softdiv"]: GROUPS["no_softdiv"].remove(i)
 
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
index 80e7a83edf9ba3aa..6feecfdef0db6385 100644
--- a/grub-core/Makefile.am
+++ b/grub-core/Makefile.am
@@ -188,12 +188,6 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pmtimer.h
 endif
 
-if COND_ia64_efi
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
-endif
-
 if COND_mips
 KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/kernel.h
 endif
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 801df7c21de663ec..9194be1d4f796bd7 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -57,10 +57,6 @@ kernel = {
   x86_64_efi_ldflags       = '-Wl,-r';
   x86_64_efi_stripflags    = '--strip-unneeded -K start -R .note -R .comment 
-R .note.gnu.gold-version';
 
-  ia64_efi_cflags = '-fshort-wchar -fno-builtin -fpic 
-minline-int-divide-max-throughput';
-  ia64_efi_ldflags = '-Wl,-r';
-  ia64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R 
.note.gnu.gold-version';
-
   arm_efi_cflags           = '-fshort-wchar';
   arm_efi_ldflags          = '-Wl,-r';
   arm_efi_stripflags       = '--strip-unneeded -K start -R .note -R .comment 
-R .note.gnu.gold-version';
@@ -252,12 +248,6 @@ kernel = {
   i386_xen_pvh = kern/xen/init.c;
   i386_xen_pvh = term/xen/console.c;
 
-  ia64_efi = kern/ia64/efi/startup.S;
-  ia64_efi = kern/ia64/efi/init.c;
-  ia64_efi = kern/ia64/dl.c;
-  ia64_efi = kern/ia64/dl_helper.c;
-  ia64_efi = kern/ia64/cache.c;
-
   arm_efi = kern/arm/efi/init.c;
   arm_efi = kern/efi/fdt.c;
 
@@ -837,7 +827,6 @@ module = {
   enable = sparc64_ieee1275;
   enable = powerpc_ieee1275;
   enable = mips_arc;
-  enable = ia64_efi;
   enable = arm_efi;
   enable = arm64_efi;
   enable = arm_uboot;
@@ -1730,8 +1719,6 @@ module = {
   extra_dist = lib/x86_64/setjmp.S;
   extra_dist = lib/sparc64/setjmp.S;
   extra_dist = lib/powerpc/setjmp.S;
-  extra_dist = lib/ia64/setjmp.S;
-  extra_dist = lib/ia64/longjmp.S;
   extra_dist = lib/arm/setjmp.S;
   extra_dist = lib/arm64/setjmp.S;
   extra_dist = lib/riscv/setjmp.S;
@@ -1831,7 +1818,6 @@ module = {
   mips = loader/mips/linux.c;
   powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
   sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
-  ia64_efi = loader/ia64/efi/linux.c;
   arm_coreboot = loader/arm/linux.c;
   arm_efi = loader/efi/linux.c;
   arm_uboot = loader/arm/linux.c;
@@ -1929,7 +1915,6 @@ module = {
 
   enable = x86;
   enable = i386_xen_pvh;
-  enable = ia64_efi;
   enable = arm_efi;
   enable = arm64_efi;
   enable = riscv32_efi;
diff --git a/grub-core/commands/file.c b/grub-core/commands/file.c
index 7c13e976b505b3bf..574353491296e48a 100644
--- a/grub-core/commands/file.c
+++ b/grub-core/commands/file.c
@@ -52,8 +52,6 @@ static const struct grub_arg_option options[] = {
    N_("Check if FILE is ARM Linux"), 0, 0},
   {"is-arm64-linux", 0, 0,
    N_("Check if FILE is ARM64 Linux"), 0, 0},
-  {"is-ia64-linux", 0, 0,
-   N_("Check if FILE is IA64 Linux"), 0, 0},
   {"is-mips-linux", 0, 0,
    N_("Check if FILE is MIPS Linux"), 0, 0},
   {"is-mipsel-linux", 0, 0,
@@ -84,8 +82,6 @@ static const struct grub_arg_option options[] = {
    N_("Check if FILE is i386 EFI file"), 0, 0},
   {"is-x86_64-efi", 0, 0,
    N_("Check if FILE is x86_64 EFI file"), 0, 0},
-  {"is-ia64-efi", 0, 0,
-   N_("Check if FILE is IA64 EFI file"), 0, 0},
   {"is-arm64-efi", 0, 0,
    N_("Check if FILE is ARM64 EFI file"), 0, 0},
   {"is-arm-efi", 0, 0,
@@ -116,7 +112,6 @@ enum
   IS_MULTIBOOT2,
   IS_ARM_LINUX,
   IS_ARM64_LINUX,
-  IS_IA64_LINUX,
   IS_MIPS_LINUX,
   IS_MIPSEL_LINUX,
   IS_SPARC64_LINUX,
@@ -190,30 +185,6 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char 
**args)
        ret = 1;
        break;
       }
-    case IS_IA64_LINUX:
-      {
-       Elf64_Ehdr ehdr;
-
-       if (grub_file_read (file, &ehdr, sizeof (ehdr)) != sizeof (ehdr))
-         break;
-
-       if (ehdr.e_ident[EI_MAG0] != ELFMAG0
-           || ehdr.e_ident[EI_MAG1] != ELFMAG1
-           || ehdr.e_ident[EI_MAG2] != ELFMAG2
-           || ehdr.e_ident[EI_MAG3] != ELFMAG3
-           || ehdr.e_ident[EI_VERSION] != EV_CURRENT
-           || ehdr.e_version != EV_CURRENT)
-         break;
-
-       if (ehdr.e_ident[EI_CLASS] != ELFCLASS64
-           || ehdr.e_ident[EI_DATA] != ELFDATA2LSB
-           || ehdr.e_machine != grub_cpu_to_le16_compile_time (EM_IA_64))
-         break;
-
-       ret = 1;
-
-       break;
-      }
 
     case IS_SPARC64_LINUX:
       {
@@ -623,10 +594,6 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char 
**args)
            && coff_head.machine !=
            grub_cpu_to_le16_compile_time (GRUB_PE32_MACHINE_X86_64))
          break;
-       if (type == IS_IA_EFI
-           && coff_head.machine !=
-           grub_cpu_to_le16_compile_time (GRUB_PE32_MACHINE_IA64))
-         break;
        if (type == IS_ARM64_EFI
            && coff_head.machine !=
            grub_cpu_to_le16_compile_time (GRUB_PE32_MACHINE_ARM64))
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
index e447fd0fab4e303b..b3009fce4a3cae93 100644
--- a/grub-core/kern/dl.c
+++ b/grub-core/kern/dl.c
@@ -391,18 +391,6 @@ grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e)
        case STT_FUNC:
          sym->st_value += (Elf_Addr) grub_dl_get_section_addr (mod,
                                                                sym->st_shndx);
-#ifdef __ia64__
-         {
-             /* FIXME: free descriptor once it's not used anymore. */
-             char **desc;
-             desc = grub_malloc (2 * sizeof (char *));
-             if (!desc)
-               return grub_errno;
-             desc[0] = (void *) sym->st_value;
-             desc[1] = mod->base;
-             sym->st_value = (grub_addr_t) desc;
-         }
-#endif
          if (bind != STB_LOCAL)
            if (grub_dl_register_symbol (name, (void *) sym->st_value, 1, mod))
              return grub_errno;
diff --git a/grub-core/kern/emu/cache.c b/grub-core/kern/emu/cache.c
index 113682cc42c1d6e8..0fdb763a57bd006a 100644
--- a/grub-core/kern/emu/cache.c
+++ b/grub-core/kern/emu/cache.c
@@ -4,9 +4,7 @@
 
 #include <grub/cache.h>
 
-#if defined(__ia64__)
-#include "../ia64/cache.c"
-#elif defined (__arm__) || defined (__aarch64__)
+#if defined (__arm__) || defined (__aarch64__)
 
 void __clear_cache (void *beg, void *end);
 
diff --git a/grub-core/kern/emu/cache_s.S b/grub-core/kern/emu/cache_s.S
index 6885ffd69bde2b59..2ad520474ea28609 100644
--- a/grub-core/kern/emu/cache_s.S
+++ b/grub-core/kern/emu/cache_s.S
@@ -13,7 +13,7 @@
 #include "../sparc64/cache.S"
 #elif defined(__powerpc__)
 #include "../powerpc/cache.S"
-#elif defined(__ia64__) || defined(__arm__) || defined(__aarch64__) || \
+#elif defined(__arm__) || defined(__aarch64__) || \
       defined(__mips__) || defined(__riscv)
 #else
 #error "No target cpu type is defined"
diff --git a/grub-core/kern/emu/lite.c b/grub-core/kern/emu/lite.c
index b327d4e418841bc1..81baec907669dcd3 100644
--- a/grub-core/kern/emu/lite.c
+++ b/grub-core/kern/emu/lite.c
@@ -15,9 +15,6 @@
 #include "../mips/dl.c"
 #elif defined(__powerpc__)
 #include "../powerpc/dl.c"
-#elif defined(__ia64__)
-#include "../ia64/dl_helper.c"
-#include "../ia64/dl.c"
 #elif defined(__arm__)
 #include "../arm/dl_helper.c"
 #include "../arm/dl.c"
diff --git a/grub-core/kern/ia64/cache.c b/grub-core/kern/ia64/cache.c
deleted file mode 100644
index 13efd308f7158943..0000000000000000
--- a/grub-core/kern/ia64/cache.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* init.c - initialize an ia64-based EFI system */
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2008  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <grub/types.h>
-#include <grub/cache.h>
-
-void
-grub_arch_sync_caches (void *address, grub_size_t len)
-{
-  /* Cache line length is at least 32.  */
-  len += (grub_uint64_t)address & 0x1f;
-  grub_uint64_t a = (grub_uint64_t)address & ~0x1f;
-
-  /* Flush data.  */
-  for (len = (len + 31) & ~0x1f; len > 0; len -= 0x20, a += 0x20)
-    asm volatile ("fc.i %0" : : "r" (a));
-  /* Sync and serialize.  Maybe extra.  */
-  asm volatile (";; sync.i;; srlz.i;;");
-}
diff --git a/grub-core/kern/ia64/dl.c b/grub-core/kern/ia64/dl.c
deleted file mode 100644
index db59300fea3ceec9..0000000000000000
--- a/grub-core/kern/ia64/dl.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* dl.c - arch-dependent part of loadable module support */
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2004,2005,2007,2009  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <grub/dl.h>
-#include <grub/elf.h>
-#include <grub/misc.h>
-#include <grub/err.h>
-#include <grub/mm.h>
-#include <grub/i18n.h>
-#include <grub/ia64/reloc.h>
-
-#define MASK19 ((1 << 19) - 1)
-#define MASK20 ((1 << 20) - 1)
-
-/* Check if EHDR is a valid ELF header.  */
-grub_err_t
-grub_arch_dl_check_header (void *ehdr)
-{
-  Elf_Ehdr *e = ehdr;
-
-  /* Check the magic numbers.  */
-  if (e->e_ident[EI_CLASS] != ELFCLASS64
-      || e->e_ident[EI_DATA] != ELFDATA2LSB
-      || e->e_machine != EM_IA_64)
-    return grub_error (GRUB_ERR_BAD_OS, N_("invalid arch-dependent ELF 
magic"));
-
-  return GRUB_ERR_NONE;
-}
-
-#pragma GCC diagnostic ignored "-Wcast-align"
-
-/* Relocate symbols.  */
-grub_err_t
-grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
-                              Elf_Shdr *s, grub_dl_segment_t seg)
-{
-  Elf_Rela *rel, *max;
-
-  for (rel = (Elf_Rela *) ((char *) ehdr + s->sh_offset),
-        max = (Elf_Rela *) ((char *) rel + s->sh_size);
-       rel < max;
-       rel = (Elf_Rela *) ((char *) rel + s->sh_entsize))
-    {
-      grub_addr_t addr;
-      Elf_Sym *sym;
-      grub_uint64_t value;
-
-      if (seg->size < (rel->r_offset & ~3))
-       return grub_error (GRUB_ERR_BAD_MODULE,
-                          "reloc offset is out of the segment");
-
-      addr = (grub_addr_t) seg->addr + rel->r_offset;
-      sym = (Elf_Sym *) ((char *) mod->symtab
-                        + mod->symsize * ELF_R_SYM (rel->r_info));
-
-      /* On the PPC the value does not have an explicit
-        addend, add it.  */
-      value = sym->st_value + rel->r_addend;
-
-      switch (ELF_R_TYPE (rel->r_info))
-       {
-       case R_IA64_PCREL21B:
-         {
-           grub_int64_t noff;
-           if (ELF_ST_TYPE (sym->st_info) == STT_FUNC)
-             {
-               struct grub_ia64_trampoline *tr = mod->trampptr;
-               grub_ia64_make_trampoline (tr, value);
-               noff = ((char *) tr - (char *) (addr & ~3)) >> 4;
-               mod->trampptr = tr + 1;
-             }
-           else
-             noff = ((char *) value - (char *) (addr & ~3)) >> 4;
-
-           if ((noff & ~MASK19) && ((-noff) & ~MASK19))
-             return grub_error (GRUB_ERR_BAD_MODULE,
-                                "jump offset too big (%lx)", noff);
-           grub_ia64_add_value_to_slot_20b (addr, noff);
-         }
-         break;
-       case R_IA64_SEGREL64LSB:
-         *(grub_uint64_t *) addr += value - (grub_addr_t) seg->addr;
-         break;
-       case R_IA64_FPTR64LSB:
-       case R_IA64_DIR64LSB:
-         *(grub_uint64_t *) addr += value;
-         break;
-       case R_IA64_PCREL64LSB:
-         *(grub_uint64_t *) addr += value - addr;
-         break;
-       case R_IA64_GPREL64I:
-         grub_ia64_set_immu64 (addr, value - (grub_addr_t) mod->base);
-         break;
-       case R_IA64_GPREL22:
-         if ((value - (grub_addr_t) mod->base) & ~MASK20)
-           return grub_error (GRUB_ERR_BAD_MODULE,
-                              "gprel offset too big (%lx)",
-                              value - (grub_addr_t) mod->base);
-         grub_ia64_add_value_to_slot_21 (addr, value - (grub_addr_t) 
mod->base);
-         break;
-
-       case R_IA64_LTOFF22X:
-       case R_IA64_LTOFF22:
-         if (ELF_ST_TYPE (sym->st_info) == STT_FUNC)
-           value = *(grub_uint64_t *) sym->st_value + rel->r_addend;
-         /* Fallthrough.  */
-       case R_IA64_LTOFF_FPTR22:
-         {
-           grub_uint64_t *gpptr = mod->gotptr;
-           *gpptr = value;
-           if (((grub_addr_t) gpptr - (grub_addr_t) mod->base) & ~MASK20)
-             return grub_error (GRUB_ERR_BAD_MODULE,
-                                "gprel offset too big (%lx)",
-                                (grub_addr_t) gpptr - (grub_addr_t) mod->base);
-           grub_ia64_add_value_to_slot_21 (addr, (grub_addr_t) gpptr - 
(grub_addr_t) mod->base);
-           mod->gotptr = gpptr + 1;
-           break;
-         }
-         /* We treat LTOFF22X as LTOFF22, so we can ignore LDXMOV.  */
-       case R_IA64_LDXMOV:
-         break;
-       default:
-         {
-           char rel_info[17]; /* log16(2^64) = 16, plus NUL. */
-
-           grub_snprintf (rel_info, sizeof (rel_info) - 1, "%" 
PRIxGRUB_UINT64_T,
-                          ELF_R_TYPE (rel->r_info));
-           return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
-                              N_("relocation 0x%s is not implemented yet"), 
rel_info);
-         }
-       }
-    }
-  return GRUB_ERR_NONE;
-}
diff --git a/grub-core/kern/ia64/dl_helper.c b/grub-core/kern/ia64/dl_helper.c
deleted file mode 100644
index 05a0a68db7a1263c..0000000000000000
--- a/grub-core/kern/ia64/dl_helper.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/* dl.c - arch-dependent part of loadable module support */
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2004,2005,2007,2009  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <grub/dl.h>
-#include <grub/elf.h>
-#include <grub/misc.h>
-#include <grub/err.h>
-#include <grub/mm.h>
-#include <grub/i18n.h>
-#include <grub/ia64/reloc.h>
-
-#pragma GCC diagnostic ignored "-Wcast-align"
-
-#define MASK20 ((1 << 20) - 1)
-#define MASK3 (~(grub_addr_t) 3)
-
-void
-grub_ia64_set_immu64 (grub_addr_t addr, grub_uint64_t val)
-{
-  /* Copied from binutils.  */
-  grub_uint64_t *ptr = ((grub_uint64_t *) (addr & MASK3));
-  grub_uint64_t t0, t1;
-
-  t0 = grub_le_to_cpu64 (ptr[0]);
-  t1 = grub_le_to_cpu64 (ptr[1]);
-
-  /* tmpl/s: bits  0.. 5 in t0
-     slot 0: bits  5..45 in t0
-     slot 1: bits 46..63 in t0, bits 0..22 in t1
-     slot 2: bits 23..63 in t1 */
-
-  /* First, clear the bits that form the 64 bit constant.  */
-  t0 &= ~(0x3ffffLL << 46);
-  t1 &= ~(0x7fffffLL
-         | ((  (0x07fLL << 13) | (0x1ffLL << 27)
-               | (0x01fLL << 22) | (0x001LL << 21)
-               | (0x001LL << 36)) << 23));
-
-  t0 |= ((val >> 22) & 0x03ffffLL) << 46;              /* 18 lsbs of imm41 */
-  t1 |= ((val >> 40) & 0x7fffffLL) <<  0;              /* 23 msbs of imm41 */
-  t1 |= (  (((val >>  0) & 0x07f) << 13)               /* imm7b */
-          | (((val >>  7) & 0x1ff) << 27)              /* imm9d */
-          | (((val >> 16) & 0x01f) << 22)              /* imm5c */
-          | (((val >> 21) & 0x001) << 21)              /* ic */
-          | (((val >> 63) & 0x001) << 36)) << 23;      /* i */
-
-  ptr[0] = t0;
-  ptr[1] = t1;
-}
-
-void
-grub_ia64_add_value_to_slot_20b (grub_addr_t addr, grub_uint32_t value)
-{
-  grub_uint32_t val;
-  switch (addr & 3)
-    {
-    case 0:
-      val = grub_le_to_cpu32 (grub_get_unaligned32 (((grub_uint8_t *)
-                                                    (addr & MASK3) + 2)));
-      val = (((((val & MASK20) + value) & MASK20) << 2)
-           | (val & ~(MASK20 << 2)));
-      grub_set_unaligned32 (((grub_uint8_t *) (addr & MASK3) + 2),
-                           grub_cpu_to_le32 (val));
-      break;
-    case 1:
-      val = grub_le_to_cpu32 (grub_get_unaligned32 (((grub_uint8_t *)
-                                                    (addr & MASK3) + 7)));
-      val = ((((((val >> 3) & MASK20) + value) & MASK20) << 3)
-           | (val & ~(MASK20 << 3)));
-      grub_set_unaligned32 (((grub_uint8_t *) (addr & MASK3) + 7),
-                           grub_cpu_to_le32 (val));
-      break;
-    case 2:
-      val = grub_le_to_cpu32 (grub_get_unaligned32 (((grub_uint8_t *)
-                                                    (addr & MASK3) + 12)));
-      val = ((((((val >> 4) & MASK20) + value) & MASK20) << 4)
-           | (val & ~(MASK20 << 4)));
-      grub_set_unaligned32 (((grub_uint8_t *) (addr & MASK3) + 12),
-                           grub_cpu_to_le32 (val));
-      break;
-    }
-}
-
-#define MASKF21 ( ((1 << 23) - 1) & ~((1 << 7) | (1 << 8)) )
-
-static grub_uint32_t
-add_value_to_slot_21_real (grub_uint32_t a, grub_uint32_t value)
-{
-  grub_uint32_t high, mid, low, c;
-  low  = (a & 0x00007f);
-  mid  = (a & 0x7fc000) >> 7;
-  high = (a & 0x003e00) << 7;
-  c = (low | mid | high) + value;
-  return (c & 0x7f) | ((c << 7) & 0x7fc000) | ((c >> 7) & 0x0003e00); 
//0x003e00
-}
-
-void
-grub_ia64_add_value_to_slot_21 (grub_addr_t addr, grub_uint32_t value)
-{
-  grub_uint32_t val;
-  switch (addr & 3)
-    {
-    case 0:
-      val = grub_le_to_cpu32 (grub_get_unaligned32 (((grub_uint8_t *)
-                                                    (addr & MASK3) + 2)));
-      val = ((add_value_to_slot_21_real (((val >> 2) & MASKF21), value)
-             & MASKF21) << 2) | (val & ~(MASKF21 << 2));
-      grub_set_unaligned32 (((grub_uint8_t *) (addr & MASK3) + 2),
-                           grub_cpu_to_le32 (val));
-      break;
-    case 1:
-      val = grub_le_to_cpu32 (grub_get_unaligned32 (((grub_uint8_t *)
-                                                    (addr & MASK3) + 7)));
-      val = ((add_value_to_slot_21_real (((val >> 3) & MASKF21), value)
-             & MASKF21) << 3) | (val & ~(MASKF21 << 3));
-      grub_set_unaligned32 (((grub_uint8_t *) (addr & MASK3) + 7),
-                           grub_cpu_to_le32 (val));
-      break;
-    case 2:
-      val = grub_le_to_cpu32 (grub_get_unaligned32 (((grub_uint8_t *)
-                                                    (addr & MASK3) + 12)));
-      val = ((add_value_to_slot_21_real (((val >> 4) & MASKF21), value)
-             & MASKF21) << 4) | (val & ~(MASKF21 << 4));
-      grub_set_unaligned32 (((grub_uint8_t *) (addr & MASK3) + 12),
-                           grub_cpu_to_le32 (val));
-      break;
-    }
-}
-
-static const grub_uint8_t nopm[5] =
-  {
-    /* [MLX]       nop.m 0x0 */
-    0x05, 0x00, 0x00, 0x00, 0x01
-  };
-
-#ifdef GRUB_UTIL
-static grub_uint8_t jump[0x20] =
-  {
-    /* [MMI]       add r15=r15,r1;; */
-    0x0b, 0x78, 0x3c, 0x02, 0x00, 0x20,
-    /* ld8 r16=[r15],8 */
-    0x00, 0x41, 0x3c, 0x30, 0x28, 0xc0,
-    /* mov r14=r1;; */
-    0x01, 0x08, 0x00, 0x84,
-    /*         [MIB]       ld8 r1=[r15] */
-    0x11, 0x08, 0x00, 0x1e, 0x18, 0x10,
-    /* mov b6=r16 */
-    0x60, 0x80, 0x04, 0x80, 0x03, 0x00,
-    /* br.few b6;; */
-    0x60, 0x00, 0x80, 0x00
-  };
-#else
-static const grub_uint8_t jump[0x20] =
-  {
-    /* ld8 r16=[r15],8 */
-    0x02, 0x80, 0x20, 0x1e, 0x18, 0x14,
-    /* mov r14=r1;; */
-    0xe0, 0x00, 0x04, 0x00, 0x42, 0x00,
-    /* nop.i 0x0 */
-    0x00, 0x00, 0x04, 0x00,
-    /* ld8 r1=[r15] */
-    0x11, 0x08, 0x00, 0x1e, 0x18, 0x10,
-    /* mov b6=r16 */
-    0x60, 0x80, 0x04, 0x80, 0x03, 0x00,
-    /* br.few b6;; */
-    0x60, 0x00, 0x80, 0x00
-  };
-#endif
-
-void
-grub_ia64_make_trampoline (struct grub_ia64_trampoline *tr, grub_uint64_t addr)
-{
-  grub_memcpy (tr->nop, nopm, sizeof (tr->nop));
-  tr->addr_hi[0] = ((addr & 0xc00000) >> 16);
-  tr->addr_hi[1] = (addr >> 24) & 0xff;
-  tr->addr_hi[2] = (addr >> 32) & 0xff;
-  tr->addr_hi[3] = (addr >> 40) & 0xff;
-  tr->addr_hi[4] = (addr >> 48) & 0xff;
-  tr->addr_hi[5] = (addr >> 56) & 0xff;
-  tr->e0 = 0xe0;
-  tr->addr_lo[0] = ((addr & 0x000f) << 4) | 0x01;
-  tr->addr_lo[1] = (((addr & 0x0070) >> 4) | ((addr & 0x070000) >> 11)
-                   | ((addr & 0x200000) >> 17));
-  tr->addr_lo[2] = ((addr & 0x1f80) >> 5) | ((addr & 0x180000) >> 19);
-  tr->addr_lo[3] = ((addr & 0xe000) >> 13) | 0x60;
-  grub_memcpy (tr->jump, jump, sizeof (tr->jump));
-}
-
-grub_err_t
-grub_ia64_dl_get_tramp_got_size (const void *ehdr, grub_size_t *tramp,
-                                grub_size_t *got)
-{
-  const Elf64_Ehdr *e = ehdr;
-  grub_size_t cntt = 0, cntg = 0;
-  const Elf64_Shdr *s;
-  unsigned i;
-
-  for (i = 0, s = (Elf64_Shdr *) ((char *) e + grub_le_to_cpu64 (e->e_shoff));
-       i < grub_le_to_cpu16 (e->e_shnum);
-       i++, s = (Elf64_Shdr *) ((char *) s + grub_le_to_cpu16 
(e->e_shentsize)))
-    if (s->sh_type == grub_cpu_to_le32_compile_time (SHT_RELA))
-      {
-       const Elf64_Rela *rel, *max;
-
-       for (rel = (Elf64_Rela *) ((char *) e + grub_le_to_cpu64 
(s->sh_offset)),
-              max = (const Elf64_Rela *) ((char *) rel + grub_le_to_cpu64 
(s->sh_size));
-            rel < max; rel = (const Elf64_Rela *) ((char *) rel + 
grub_le_to_cpu64 (s->sh_entsize)))
-         switch (ELF64_R_TYPE (grub_le_to_cpu64 (rel->r_info)))
-           {
-           case R_IA64_PCREL21B:
-             cntt++;
-             break;
-           case R_IA64_LTOFF_FPTR22:
-           case R_IA64_LTOFF22X:
-           case R_IA64_LTOFF22:
-             cntg++;
-             break;
-           }
-      }
-  *tramp = cntt * sizeof (struct grub_ia64_trampoline);
-  *got = cntg * sizeof (grub_uint64_t);
-
-  return GRUB_ERR_NONE;
-}
-
diff --git a/grub-core/kern/ia64/efi/init.c b/grub-core/kern/ia64/efi/init.c
deleted file mode 100644
index f1965571b1dc0dce..0000000000000000
--- a/grub-core/kern/ia64/efi/init.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* init.c - initialize an ia64-based EFI system */
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2008  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <grub/types.h>
-#include <grub/misc.h>
-#include <grub/mm.h>
-#include <grub/time.h>
-#include <grub/err.h>
-#include <grub/dl.h>
-#include <grub/kernel.h>
-#include <grub/efi/efi.h>
-#include <grub/loader.h>
-
-static grub_uint64_t divisor = 1;
-
-static grub_uint64_t
-get_itc (void)
-{
-  grub_uint64_t ret;
-  asm volatile ("mov %0=ar.itc" : "=r" (ret));
-  return ret;
-}
-
-grub_uint64_t
-grub_rtc_get_time_ms (void)
-{
-  return get_itc () / divisor;
-}
-
-void
-grub_machine_init (void)
-{
-  grub_efi_event_t event;
-  grub_uint64_t before, after;
-  grub_efi_uintn_t idx;
-  grub_efi_init ();
-
-  efi_call_5 (grub_efi_system_table->boot_services->create_event,
-             GRUB_EFI_EVT_TIMER, GRUB_EFI_TPL_CALLBACK, 0, 0, &event);
-
-  before = get_itc ();
-  efi_call_3 (grub_efi_system_table->boot_services->set_timer, event,
-             GRUB_EFI_TIMER_RELATIVE, 200000);
-  efi_call_3 (grub_efi_system_table->boot_services->wait_for_event, 1,
-             &event, &idx);
-  after = get_itc ();
-  efi_call_1 (grub_efi_system_table->boot_services->close_event, event);
-  divisor = (after - before + 5) / 20;
-  if (divisor == 0)
-    divisor = 800000;
-  grub_install_get_time_ms (grub_rtc_get_time_ms);
-}
-
-void
-grub_machine_fini (int flags)
-{
-  if (!(flags & GRUB_LOADER_FLAG_NORETURN))
-    return;
-
-  grub_efi_fini ();
-
-  if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY))
-    grub_efi_memory_fini ();
-}
diff --git a/grub-core/kern/ia64/efi/startup.S 
b/grub-core/kern/ia64/efi/startup.S
deleted file mode 100644
index d75c6d7cc741d5eb..0000000000000000
--- a/grub-core/kern/ia64/efi/startup.S
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2008  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-#include <config.h>
-#include <grub/symbol.h>
-#include <grub/offsets.h>
-
-       .text
-       .psr abi64
-       .psr lsb
-       .lsb
-
-       .global _start
-       .proc _start
-_start:
-       alloc loc0=ar.pfs,2,4,0,0
-       mov loc1=rp
-       addl loc2=@gprel(grub_efi_image_handle),gp
-       addl loc3=@gprel(grub_efi_system_table),gp
-       ;;
-       st8 [loc2]=in0
-       st8 [loc3]=in1
-       br.call.sptk.few rp=grub_main
-       ;;
-       mov ar.pfs=loc0
-       mov rp=loc1
-       ;;
-       br.ret.sptk.few rp
-
-       .endp _start
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index dfae4f9d7897a71d..dad79abf0c6fdebb 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -620,7 +620,7 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, 
grub_uint64_t *r)
   grub_uint64_t q = 0;
   grub_uint64_t m = 0;
 
-  /* ARM and IA64 don't have a fast 32-bit division.
+  /* ARM doesn't have a fast 32-bit division.
      Using that code would just make us use software division routines, calling
      ourselves indirectly and hence getting infinite recursion.
   */
diff --git a/grub-core/lib/efi/halt.c b/grub-core/lib/efi/halt.c
index 29d41364168eaeba..0b42be6740f246b7 100644
--- a/grub-core/lib/efi/halt.c
+++ b/grub-core/lib/efi/halt.c
@@ -30,7 +30,7 @@ grub_halt (void)
 {
   grub_machine_fini (GRUB_LOADER_FLAG_NORETURN |
                     GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY);
-#if !defined(__ia64__) && !defined(__arm__) && !defined(__aarch64__) && \
+#if !defined(__arm__) && !defined(__aarch64__) && \
     !defined(__riscv)
   grub_acpi_halt ();
 #endif
diff --git a/grub-core/lib/ia64/longjmp.S b/grub-core/lib/ia64/longjmp.S
deleted file mode 100644
index 38afb2243c6b9f87..0000000000000000
--- a/grub-core/lib/ia64/longjmp.S
+++ /dev/null
@@ -1,162 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001, 2002, 2008  Free Software Foundation, Inc.
-   Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.
-
-   Note that __sigsetjmp() did NOT flush the register stack.  Instead,
-   we do it here since __longjmp() is usually much less frequently
-   invoked than __sigsetjmp(). The only difficulty is that __sigsetjmp()
-   didn't (and wouldn't be able to) save ar.rnat either.  This is a problem
-   because if we're not careful, we could end up loading random NaT bits.
-   There are two cases:
-
-       (i)  ar.bsp < ia64_rse_rnat_addr(jmpbuf.ar_bsp)
-               ar.rnat contains the desired bits---preserve ar.rnat
-               across loadrs and write to ar.bspstore
-
-       (ii) ar.bsp >= ia64_rse_rnat_addr(jmpbuf.ar_bsp)
-               The desired ar.rnat is stored in
-               ia64_rse_rnat_addr(jmpbuf.ar_bsp).  Load those
-               bits into ar.rnat after setting ar.bspstore. */
-
-
-
-#      define  pPos    p6      /* is rotate count positive? */
-#      define  pNeg    p7      /* is rotate count negative? */
-
-
-       /* __longjmp(__jmp_buf buf, int val) */
-
-       .text
-
-       .proc EXT_C(grub_longjmp)
-FUNCTION(grub_longjmp)
-       alloc r8=ar.pfs,2,1,0,0
-       mov r27=ar.rsc
-       add r2=0x98,in0         // r2 <- &jmpbuf.orig_jmp_buf_addr
-       ;;
-       ld8 r8=[r2],-16         // r8 <- orig_jmp_buf_addr
-       mov r10=ar.bsp
-       and r11=~0x3,r27        // clear ar.rsc.mode
-       ;;
-       flushrs                 // flush dirty regs to backing store (must be 
first in insn grp)
-       ld8 r23=[r2],8          // r23 <- jmpbuf.ar_bsp
-       sub r8=r8,in0           // r8 <- &orig_jmpbuf - &jmpbuf
-       ;;
-       ld8 r25=[r2]            // r25 <- jmpbuf.ar_unat
-       extr.u r8=r8,3,6        // r8 <- (&orig_jmpbuf - &jmpbuf)/8 & 0x3f
-       ;;
-       cmp.lt pNeg,pPos=r8,r0
-       mov r2=in0
-       ;;
-(pPos) mov r16=r8
-(pNeg) add r16=64,r8
-(pPos) sub r17=64,r8
-(pNeg) sub r17=r0,r8
-       ;;
-       mov ar.rsc=r11          // put RSE in enforced lazy mode
-       shr.u r8=r25,r16
-       add r3=8,in0            // r3 <- &jmpbuf.r1
-       shl r9=r25,r17
-       ;;
-       or r25=r8,r9
-       ;;
-       mov r26=ar.rnat
-       mov ar.unat=r25         // setup ar.unat (NaT bits for r1, r4-r7, and 
r12)
-       ;;
-       ld8.fill.nta sp=[r2],16 // r12 (sp)
-       ld8.fill.nta gp=[r3],16         // r1 (gp)
-       dep r11=-1,r23,3,6      // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp)
-       ;;
-       ld8.nta r16=[r2],16             // caller's unat
-       ld8.nta r17=[r3],16             // fpsr
-       ;;
-       ld8.fill.nta r4=[r2],16 // r4
-       ld8.fill.nta r5=[r3],16         // r5 (gp)
-       cmp.geu p8,p0=r10,r11   // p8 <- (ar.bsp >= jmpbuf.ar_bsp)
-       ;;
-       ld8.fill.nta r6=[r2],16 // r6
-       ld8.fill.nta r7=[r3],16         // r7
-       ;;
-       mov ar.unat=r16                 // restore caller's unat
-       mov ar.fpsr=r17                 // restore fpsr
-       ;;
-       ld8.nta r16=[r2],16             // b0
-       ld8.nta r17=[r3],16             // b1
-       ;;
-(p8)   ld8 r26=[r11]           // r26 <- *ia64_rse_rnat_addr(jmpbuf.ar_bsp)
-       mov ar.bspstore=r23     // restore ar.bspstore
-       ;;
-       ld8.nta r18=[r2],16             // b2
-       ld8.nta r19=[r3],16             // b3
-       ;;
-       ld8.nta r20=[r2],16             // b4
-       ld8.nta r21=[r3],16             // b5
-       ;;
-       ld8.nta r11=[r2],16             // ar.pfs
-       ld8.nta r22=[r3],56             // ar.lc
-       ;;
-       ld8.nta r24=[r2],32             // pr
-       mov b0=r16
-       ;;
-       ldf.fill.nta f2=[r2],32
-       ldf.fill.nta f3=[r3],32
-       mov b1=r17
-       ;;
-       ldf.fill.nta f4=[r2],32
-       ldf.fill.nta f5=[r3],32
-       mov b2=r18
-       ;;
-       ldf.fill.nta f16=[r2],32
-       ldf.fill.nta f17=[r3],32
-       mov b3=r19
-       ;;
-       ldf.fill.nta f18=[r2],32
-       ldf.fill.nta f19=[r3],32
-       mov b4=r20
-       ;;
-       ldf.fill.nta f20=[r2],32
-       ldf.fill.nta f21=[r3],32
-       mov b5=r21
-       ;;
-       ldf.fill.nta f22=[r2],32
-       ldf.fill.nta f23=[r3],32
-       mov ar.lc=r22
-       ;;
-       ldf.fill.nta f24=[r2],32
-       ldf.fill.nta f25=[r3],32
-       cmp.eq p8,p9=0,in1
-       ;;
-       ldf.fill.nta f26=[r2],32
-       ldf.fill.nta f27=[r3],32
-       mov ar.pfs=r11
-       ;;
-       ldf.fill.nta f28=[r2],32
-       ldf.fill.nta f29=[r3],32
-       ;;
-       ldf.fill.nta f30=[r2]
-       ldf.fill.nta f31=[r3]
-(p8)   mov r8=1
-
-       mov ar.rnat=r26         // restore ar.rnat
-       ;;
-       mov ar.rsc=r27          // restore ar.rsc
-(p9)   mov r8=in1
-
-       invala                  // virt. -> phys. regnum mapping may change
-       mov pr=r24,-1
-       br.ret.dptk.few rp
-       .endp EXT_C(grub_longjmp)
diff --git a/grub-core/lib/ia64/setjmp.S b/grub-core/lib/ia64/setjmp.S
deleted file mode 100644
index a0382d83d602d9b4..0000000000000000
--- a/grub-core/lib/ia64/setjmp.S
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001, 2002, 2008 Free Software Foundation, Inc.
-   Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.
-
-   The layout of the jmp_buf is as follows.  This is subject to change
-   and user-code should never depend on the particular layout of
-   jmp_buf!
-
-
-       offset: description:
-       ------- ------------
-       0x000   stack pointer (r12)     ; unchangeable (see _JMPBUF_UNWINDS)
-       0x008   r1 (gp)
-       0x010   caller's unat
-       0x018   fpsr
-       0x020   r4
-       0x028   r5
-       0x030   r6
-       0x038   r7
-       0x040   rp (b0)
-       0x048   b1
-       0x050   b2
-       0x058   b3
-       0x060   b4
-       0x068   b5
-       0x070   ar.pfs
-       0x078   ar.lc
-       0x080   pr
-       0x088   ar.bsp                  ; unchangeable (see __longjmp.S)
-       0x090   ar.unat
-       0x098   &__jmp_buf      ; address of the jmpbuf (needed to locate NaT 
bits in unat)
-       0x0a0    f2
-       0x0b0    f3
-       0x0c0    f4
-       0x0d0    f5
-       0x0e0   f16
-       0x0f0   f17
-       0x100   f18
-       0x110   f19
-       0x120   f20
-       0x130   f21
-       0x130   f22
-       0x140   f23
-       0x150   f24
-       0x160   f25
-       0x170   f26
-       0x180   f27
-       0x190   f28
-       0x1a0   f29
-       0x1b0   f30
-       0x1c0   f31 */
-
-#include <grub/symbol.h>
-#include <grub/dl.h>
-
-       .file   "setjmp.S"
-
-GRUB_MOD_LICENSE "GPLv2+"
-
-       /* The following two entry points are the traditional entry points: */
-
-       .text
-       
-       .proc EXT_C(grub_setjmp)
-FUNCTION(grub_setjmp)
-       alloc r8=ar.pfs,2,0,0,0
-       mov in1=1
-       br.cond.sptk.many __sigsetjmp
-       .endp EXT_C(grub_setjmp)
-
-       /* __sigsetjmp(__jmp_buf buf, int savemask) */
-
-       .proc __sigsetjmp
-__sigsetjmp:
-       //.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
-       alloc loc1=ar.pfs,2,2,2,0
-       mov r16=ar.unat
-       ;;
-       mov r17=ar.fpsr
-       mov r2=in0
-       add r3=8,in0
-       ;;
-       st8.spill.nta [r2]=sp,16        // r12 (sp)
-       st8.spill.nta [r3]=gp,16        // r1 (gp)
-       ;;
-       st8.nta [r2]=r16,16             // save caller's unat
-       st8.nta [r3]=r17,16             // save fpsr
-       add r8=0xa0,in0
-       ;;
-       st8.spill.nta [r2]=r4,16        // r4
-       st8.spill.nta [r3]=r5,16        // r5
-       add r9=0xb0,in0
-       ;;
-       stf.spill.nta [r8]=f2,32
-       stf.spill.nta [r9]=f3,32
-       mov loc0=rp
-       .body
-       ;;
-       stf.spill.nta [r8]=f4,32
-       stf.spill.nta [r9]=f5,32
-       mov r17=b1
-       ;;
-       stf.spill.nta [r8]=f16,32
-       stf.spill.nta [r9]=f17,32
-       mov r18=b2
-       ;;
-       stf.spill.nta [r8]=f18,32
-       stf.spill.nta [r9]=f19,32
-       mov r19=b3
-       ;;
-       stf.spill.nta [r8]=f20,32
-       stf.spill.nta [r9]=f21,32
-       mov r20=b4
-       ;;
-       stf.spill.nta [r8]=f22,32
-       stf.spill.nta [r9]=f23,32
-       mov r21=b5
-       ;;
-       stf.spill.nta [r8]=f24,32
-       stf.spill.nta [r9]=f25,32
-       mov r22=ar.lc
-       ;;
-       stf.spill.nta [r8]=f26,32
-       stf.spill.nta [r9]=f27,32
-       mov r24=pr
-       ;;
-       stf.spill.nta [r8]=f28,32
-       stf.spill.nta [r9]=f29,32
-       ;;
-       stf.spill.nta [r8]=f30
-       stf.spill.nta [r9]=f31
-
-       st8.spill.nta [r2]=r6,16        // r6
-       st8.spill.nta [r3]=r7,16        // r7
-       ;;
-       mov r23=ar.bsp
-       mov r25=ar.unat
-       mov out0=in0
-
-       st8.nta [r2]=loc0,16            // b0
-       st8.nta [r3]=r17,16             // b1
-       mov out1=in1
-       ;;
-       st8.nta [r2]=r18,16             // b2
-       st8.nta [r3]=r19,16             // b3
-       ;;
-       st8.nta [r2]=r20,16             // b4
-       st8.nta [r3]=r21,16             // b5
-       ;;
-       st8.nta [r2]=loc1,16            // ar.pfs
-       st8.nta [r3]=r22,16             // ar.lc
-       ;;
-       st8.nta [r2]=r24,16             // pr
-       st8.nta [r3]=r23,16             // ar.bsp
-       ;;
-       st8.nta [r2]=r25                // ar.unat
-       st8.nta [r3]=in0                // &__jmp_buf
-       mov r8=0
-       mov rp=loc0
-       mov ar.pfs=loc1
-       br.ret.sptk.many rp
-
-       .endp __sigsetjmp
diff --git a/grub-core/lib/setjmp.S b/grub-core/lib/setjmp.S
index 9c8721088a3ff8f1..1bf29c3cce773658 100644
--- a/grub-core/lib/setjmp.S
+++ b/grub-core/lib/setjmp.S
@@ -12,9 +12,6 @@
 #include "./mips/setjmp.S"
 #elif defined(__powerpc__) || defined(__PPC__)
 #include "./powerpc/setjmp.S"
-#elif defined(__ia64__)
-#include "./ia64/setjmp.S"
-#include "./ia64/longjmp.S"
 #elif defined(__arm__)
 #include "./arm/setjmp.S"
 #elif defined(__aarch64__)
diff --git a/grub-core/loader/ia64/efi/linux.c 
b/grub-core/loader/ia64/efi/linux.c
deleted file mode 100644
index fb9b961f71a20208..0000000000000000
--- a/grub-core/loader/ia64/efi/linux.c
+++ /dev/null
@@ -1,607 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2008,2010  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <grub/loader.h>
-#include <grub/file.h>
-#include <grub/disk.h>
-#include <grub/err.h>
-#include <grub/misc.h>
-#include <grub/types.h>
-#include <grub/command.h>
-#include <grub/dl.h>
-#include <grub/mm.h>
-#include <grub/cache.h>
-#include <grub/kernel.h>
-#include <grub/efi/api.h>
-#include <grub/efi/efi.h>
-#include <grub/elf.h>
-#include <grub/i18n.h>
-#include <grub/env.h>
-#include <grub/linux.h>
-#include <grub/verify.h>
-
-GRUB_MOD_LICENSE ("GPLv3+");
-
-#pragma GCC diagnostic ignored "-Wcast-align"
-
-#define ALIGN_MIN (256*1024*1024)
-
-#define GRUB_ELF_SEARCH 1024
-
-#define BOOT_PARAM_SIZE        16384
-
-struct ia64_boot_param
-{
-  grub_uint64_t command_line;  /* physical address of command line. */
-  grub_uint64_t efi_systab;    /* physical address of EFI system table */
-  grub_uint64_t efi_memmap;    /* physical address of EFI memory map */
-  grub_uint64_t efi_memmap_size;       /* size of EFI memory map */
-  grub_uint64_t efi_memdesc_size; /* size of an EFI memory map descriptor */
-  grub_uint32_t efi_memdesc_version;   /* memory descriptor version */
-  struct
-  {
-    grub_uint16_t num_cols;    /* number of columns on console output dev */
-    grub_uint16_t num_rows;    /* number of rows on console output device */
-    grub_uint16_t orig_x;      /* cursor's x position */
-    grub_uint16_t orig_y;      /* cursor's y position */
-  } console_info;
-  grub_uint64_t fpswa;         /* physical address of the fpswa interface */
-  grub_uint64_t initrd_start;
-  grub_uint64_t initrd_size;
-};
-
-typedef struct
-{
-  grub_uint32_t        revision;
-  grub_uint32_t        reserved;
-  void *fpswa;
-} fpswa_interface_t;
-static fpswa_interface_t *fpswa;
-
-#define NEXT_MEMORY_DESCRIPTOR(desc, size)      \
-  ((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
-
-static grub_dl_t my_mod;
-
-static int loaded;
-
-/* Kernel base and size.  */
-static void *kernel_mem;
-static grub_efi_uintn_t kernel_pages;
-static grub_uint64_t entry;
-
-/* Initrd base and size.  */
-static void *initrd_mem;
-static grub_efi_uintn_t initrd_pages;
-static grub_efi_uintn_t initrd_size;
-
-static struct ia64_boot_param *boot_param;
-static grub_efi_uintn_t boot_param_pages;
-
-static inline grub_size_t
-page_align (grub_size_t size)
-{
-  return (size + (1 << 12) - 1) & (~((1 << 12) - 1));
-}
-
-static void
-query_fpswa (void)
-{
-  grub_efi_handle_t fpswa_image;
-  grub_efi_boot_services_t *bs;
-  grub_efi_status_t status;
-  grub_efi_uintn_t size;
-  static const grub_efi_guid_t fpswa_protocol =
-    { 0xc41b6531, 0x97b9, 0x11d3,
-      {0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} };
-
-  if (fpswa != NULL)
-    return;
-
-  size = sizeof(grub_efi_handle_t);
-
-  bs = grub_efi_system_table->boot_services;
-  status = bs->locate_handle (GRUB_EFI_BY_PROTOCOL,
-                             (void *) &fpswa_protocol,
-                             NULL, &size, &fpswa_image);
-  if (status != GRUB_EFI_SUCCESS)
-    {
-      grub_printf ("%s\n", _("Could not locate FPSWA driver"));
-      return;
-    }
-  status = bs->handle_protocol (fpswa_image,
-                               (void *) &fpswa_protocol, (void *) &fpswa);
-  if (status != GRUB_EFI_SUCCESS)
-    {
-      grub_printf ("%s\n",
-                  _("FPSWA protocol wasn't able to find the interface"));
-      return;
-    }
-}
-
-static void
-free_pages (void)
-{
-  if (kernel_mem)
-    {
-      grub_efi_free_pages ((grub_addr_t) kernel_mem, kernel_pages);
-      kernel_mem = 0;
-    }
-
-  if (initrd_mem)
-    {
-      grub_efi_free_pages ((grub_addr_t) initrd_mem, initrd_pages);
-      initrd_mem = 0;
-    }
-
-  if (boot_param)
-    {
-      /* Free bootparam.  */
-      grub_efi_free_pages ((grub_efi_physical_address_t) boot_param,
-                          boot_param_pages);
-      boot_param = 0;
-    }
-}
-
-static void *
-allocate_pages (grub_uint64_t align, grub_uint64_t size_pages,
-               grub_uint64_t nobase)
-{
-  grub_uint64_t size;
-  grub_efi_uintn_t desc_size;
-  grub_efi_memory_descriptor_t *mmap, *mmap_end;
-  grub_efi_uintn_t mmap_size, tmp_mmap_size;
-  grub_efi_memory_descriptor_t *desc;
-  void *mem = NULL;
-
-  size = size_pages << 12;
-
-  mmap_size = grub_efi_find_mmap_size ();
-  if (!mmap_size)
-    return 0;
-
-    /* Read the memory map temporarily, to find free space.  */
-  mmap = grub_malloc (mmap_size);
-  if (! mmap)
-    return 0;
-
-  tmp_mmap_size = mmap_size;
-  if (grub_efi_get_memory_map (&tmp_mmap_size, mmap, 0, &desc_size, 0) <= 0)
-    {
-      grub_error (GRUB_ERR_IO, "cannot get memory map");
-      goto fail;
-    }
-
-  mmap_end = NEXT_MEMORY_DESCRIPTOR (mmap, tmp_mmap_size);
-
-  /* First, find free pages for the real mode code
-     and the memory map buffer.  */
-  for (desc = mmap;
-       desc < mmap_end;
-       desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size))
-    {
-      grub_uint64_t start, end;
-      grub_uint64_t aligned_start;
-
-      if (desc->type != GRUB_EFI_CONVENTIONAL_MEMORY)
-       continue;
-
-      start = desc->physical_start;
-      end = start + (desc->num_pages << 12);
-      /* Align is a power of 2.  */
-      aligned_start = (start + align - 1) & ~(align - 1);
-      if (aligned_start + size > end)
-       continue;
-      if (aligned_start == nobase)
-       aligned_start += align;
-      if (aligned_start + size > end)
-       continue;
-      mem = grub_efi_allocate_fixed (aligned_start, size_pages);
-      if (! mem)
-       {
-         grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot allocate memory");
-         goto fail;
-       }
-      break;
-    }
-
-  if (! mem)
-    {
-      grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot allocate memory");
-      goto fail;
-    }
-
-  grub_free (mmap);
-  return mem;
-
- fail:
-  grub_free (mmap);
-  free_pages ();
-  return 0;
-}
-
-static void
-set_boot_param_console (void)
-{
-  grub_efi_simple_text_output_interface_t *conout;
-  grub_efi_uintn_t cols, rows;
-
-  conout = grub_efi_system_table->con_out;
-  if (conout->query_mode (conout, conout->mode->mode, &cols, &rows)
-      != GRUB_EFI_SUCCESS)
-    return;
-
-  grub_dprintf ("linux",
-               "Console info: cols=%lu rows=%lu x=%u y=%u\n",
-               cols, rows,
-               conout->mode->cursor_column, conout->mode->cursor_row);
-
-  boot_param->console_info.num_cols = cols;
-  boot_param->console_info.num_rows = rows;
-  boot_param->console_info.orig_x = conout->mode->cursor_column;
-  boot_param->console_info.orig_y = conout->mode->cursor_row;
-}
-
-static grub_err_t
-grub_linux_boot (void)
-{
-  grub_efi_uintn_t mmap_size;
-  grub_efi_uintn_t map_key;
-  grub_efi_uintn_t desc_size;
-  grub_efi_uint32_t desc_version;
-  grub_efi_memory_descriptor_t *mmap_buf;
-  grub_err_t err;
-
-  /* FPSWA.  */
-  query_fpswa ();
-  boot_param->fpswa = (grub_uint64_t)fpswa;
-
-  /* Initrd.  */
-  boot_param->initrd_start = (grub_uint64_t)initrd_mem;
-  boot_param->initrd_size = (grub_uint64_t)initrd_size;
-
-  set_boot_param_console ();
-
-  grub_dprintf ("linux", "Jump to %016lx\n", entry);
-
-  /* MDT.
-     Must be done after grub_machine_fini because map_key is used by
-     exit_boot_services.  */
-  mmap_size = grub_efi_find_mmap_size ();
-  if (! mmap_size)
-    return grub_errno;
-  mmap_buf = grub_efi_allocate_any_pages (page_align (mmap_size) >> 12);
-  if (! mmap_buf)
-    return grub_error (GRUB_ERR_IO, "cannot allocate memory map");
-  err = grub_efi_finish_boot_services (&mmap_size, mmap_buf, &map_key,
-                                      &desc_size, &desc_version);
-  if (err)
-    return err;
-
-  boot_param->efi_memmap = (grub_uint64_t)mmap_buf;
-  boot_param->efi_memmap_size = mmap_size;
-  boot_param->efi_memdesc_size = desc_size;
-  boot_param->efi_memdesc_version = desc_version;
-
-  /* See you next boot.  */
-  asm volatile ("mov r28=%1; br.sptk.few %0" :: "b"(entry),"r"(boot_param));
-
-  /* Never reach here.  */
-  return GRUB_ERR_NONE;
-}
-
-static grub_err_t
-grub_linux_unload (void)
-{
-  free_pages ();
-  grub_dl_unref (my_mod);
-  loaded = 0;
-  return GRUB_ERR_NONE;
-}
-
-static grub_err_t
-grub_load_elf64 (grub_file_t file, void *buffer, const char *filename)
-{
-  Elf64_Ehdr *ehdr = (Elf64_Ehdr *) buffer;
-  Elf64_Phdr *phdr;
-  int i;
-  grub_uint64_t low_addr;
-  grub_uint64_t high_addr;
-  grub_uint64_t align;
-  grub_uint64_t reloc_offset;
-  const char *relocate;
-
-  if (ehdr->e_ident[EI_MAG0] != ELFMAG0
-      || ehdr->e_ident[EI_MAG1] != ELFMAG1
-      || ehdr->e_ident[EI_MAG2] != ELFMAG2
-      || ehdr->e_ident[EI_MAG3] != ELFMAG3
-      || ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
-    return grub_error(GRUB_ERR_UNKNOWN_OS,
-                     N_("invalid arch-independent ELF magic"));
-
-  if (ehdr->e_ident[EI_CLASS] != ELFCLASS64
-      || ehdr->e_version != EV_CURRENT
-      || ehdr->e_machine != EM_IA_64)
-    return grub_error (GRUB_ERR_UNKNOWN_OS,
-                      N_("invalid arch-dependent ELF magic"));
-
-  if (ehdr->e_type != ET_EXEC)
-    return grub_error (GRUB_ERR_UNKNOWN_OS,
-                      N_("this ELF file is not of the right type"));
-
-  /* FIXME: Should we support program headers at strange locations?  */
-  if (ehdr->e_phoff + ehdr->e_phnum * ehdr->e_phentsize > GRUB_ELF_SEARCH)
-    return grub_error (GRUB_ERR_BAD_OS, "program header at a too high offset");
-
-  entry = ehdr->e_entry;
-
-  /* Compute low, high and align addresses.  */
-  low_addr = ~0UL;
-  high_addr = 0;
-  align = 0;
-  for (i = 0; i < ehdr->e_phnum; i++)
-    {
-      phdr = (Elf64_Phdr *) ((char *) buffer + ehdr->e_phoff
-                            + i * ehdr->e_phentsize);
-      if (phdr->p_type == PT_LOAD)
-       {
-         if (phdr->p_paddr < low_addr)
-           low_addr = phdr->p_paddr;
-         if (phdr->p_paddr + phdr->p_memsz > high_addr)
-           high_addr = phdr->p_paddr + phdr->p_memsz;
-         if (phdr->p_align > align)
-           align = phdr->p_align;
-       }
-    }
-
-  if (align < ALIGN_MIN)
-    align = ALIGN_MIN;
-
-  if (high_addr == 0)
-    return grub_error (GRUB_ERR_BAD_OS, "no program entries");
-
-  kernel_pages = page_align (high_addr - low_addr) >> 12;
-
-  /* Undocumented on purpose.  */
-  relocate = grub_env_get ("linux_relocate");
-  if (!relocate || grub_strcmp (relocate, "force") != 0)
-    {
-      kernel_mem = grub_efi_allocate_fixed (low_addr, kernel_pages);
-      reloc_offset = 0;
-    }
-  /* Try to relocate.  */
-  if (! kernel_mem && (!relocate || grub_strcmp (relocate, "off") != 0))
-    {
-      kernel_mem = allocate_pages (align, kernel_pages, low_addr);
-      if (kernel_mem)
-       {
-         reloc_offset = (grub_uint64_t)kernel_mem - low_addr;
-         grub_dprintf ("linux", "  Relocated at %p (offset=%016lx)\n",
-                       kernel_mem, reloc_offset);
-         entry += reloc_offset;
-       }
-    }
-  if (! kernel_mem)
-    return grub_error (GRUB_ERR_OUT_OF_MEMORY,
-                      "cannot allocate memory for OS");
-
-  /* Load every loadable segment in memory.  */
-  for (i = 0; i < ehdr->e_phnum; i++)
-    {
-      phdr = (Elf64_Phdr *) ((char *) buffer + ehdr->e_phoff
-                            + i * ehdr->e_phentsize);
-      if (phdr->p_type == PT_LOAD)
-        {
-         grub_dprintf ("linux", "  [paddr=%lx load=%lx memsz=%08lx "
-                       "off=%lx flags=%x]\n",
-                       phdr->p_paddr, phdr->p_paddr + reloc_offset,
-                       phdr->p_memsz, phdr->p_offset, phdr->p_flags);
-
-         if (grub_file_seek (file, phdr->p_offset) == (grub_off_t)-1)
-           return grub_errno;
-
-         if (grub_file_read (file, (void *) (phdr->p_paddr + reloc_offset),
-                             phdr->p_filesz)
-              != (grub_ssize_t) phdr->p_filesz)
-           {
-             if (!grub_errno)
-               grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
-                           filename);
-             return grub_errno;
-           }
-
-          if (phdr->p_filesz < phdr->p_memsz)
-           grub_memset
-             ((char *)(phdr->p_paddr + reloc_offset + phdr->p_filesz),
-              0, phdr->p_memsz - phdr->p_filesz);
-
-         /* Sync caches if necessary.  */
-         if (phdr->p_flags & PF_X)
-           grub_arch_sync_caches
-             ((void *)(phdr->p_paddr + reloc_offset), phdr->p_memsz);
-        }
-    }
-  loaded = 1;
-  return 0;
-}
-
-static grub_err_t
-grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
-               int argc, char *argv[])
-{
-  grub_file_t file = 0;
-  char buffer[GRUB_ELF_SEARCH];
-  char *cmdline, *p;
-  grub_ssize_t len;
-  int i;
-
-  grub_dl_ref (my_mod);
-
-  grub_loader_unset ();
-
-  if (argc == 0)
-    {
-      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
-      goto fail;
-    }
-
-  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
-  if (! file)
-    goto fail;
-
-  len = grub_file_read (file, buffer, sizeof (buffer));
-  if (len < (grub_ssize_t) sizeof (Elf64_Ehdr))
-    {
-      if (!grub_errno)
-       grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
-                   argv[0]);
-      goto fail;
-    }
-
-  grub_dprintf ("linux", "Loading linux: %s\n", argv[0]);
-
-  if (grub_load_elf64 (file, buffer, argv[0]))
-    goto fail;
-
-  len = sizeof("BOOT_IMAGE=") + 8;
-  for (i = 0; i < argc; i++)
-    len += grub_strlen (argv[i]) + 1;
-  len += sizeof (struct ia64_boot_param) + 512; /* Room for extensions.  */
-  boot_param_pages = page_align (len) >> 12;
-  boot_param = grub_efi_allocate_any_pages (boot_param_pages);
-  if (boot_param == 0)
-    {
-      grub_error (GRUB_ERR_OUT_OF_MEMORY,
-                 "cannot allocate memory for bootparams");
-      goto fail;
-    }
-
-  grub_memset (boot_param, 0, len);
-  cmdline = ((char *)(boot_param + 1)) + 256;
-
-  /* Build cmdline.  */
-  p = grub_stpcpy (cmdline, "BOOT_IMAGE");
-  for (i = 0; i < argc; i++)
-    {
-      *p++ = ' ';
-      p = grub_stpcpy (p, argv[i]);
-    }
-  cmdline[10] = '=';
-
-  *p = '\0';
-
-  if (grub_verify_string (cmdline, GRUB_VERIFY_KERNEL_CMDLINE))
-    goto fail;
-
-  boot_param->command_line = (grub_uint64_t) cmdline;
-  boot_param->efi_systab = (grub_uint64_t) grub_efi_system_table;
-
-  grub_errno = GRUB_ERR_NONE;
-
-  grub_loader_set (grub_linux_boot, grub_linux_unload, 0);
-
- fail:
-  if (file)
-    grub_file_close (file);
-
-  if (grub_errno != GRUB_ERR_NONE)
-    {
-      grub_efi_free_pages ((grub_efi_physical_address_t) boot_param,
-                          boot_param_pages);
-      grub_dl_unref (my_mod);
-    }
-  return grub_errno;
-}
-
-static grub_err_t
-grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
-                int argc, char *argv[])
-{
-  struct grub_linux_initrd_context initrd_ctx = { 0, 0, 0 };
-
-  if (argc == 0)
-    {
-      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
-      goto fail;
-    }
-
-  if (! loaded)
-    {
-      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("you need to load the kernel 
first"));
-      goto fail;
-    }
-
-  if (grub_initrd_init (argc, argv, &initrd_ctx))
-    goto fail;
-
-  initrd_size = grub_get_initrd_size (&initrd_ctx);
-  grub_dprintf ("linux", "Loading initrd\n");
-
-  initrd_pages = (page_align (initrd_size) >> 12);
-  initrd_mem = grub_efi_allocate_any_pages (initrd_pages);
-  if (! initrd_mem)
-    {
-      grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot allocate pages");
-      goto fail;
-    }
-
-  grub_dprintf ("linux", "[addr=0x%lx, size=0x%lx]\n",
-               (grub_uint64_t) initrd_mem, initrd_size);
-
-  if (grub_initrd_load (&initrd_ctx, initrd_mem))
-    goto fail;
- fail:
-  grub_initrd_close (&initrd_ctx);
-  return grub_errno;
-}
-
-static grub_err_t
-grub_cmd_fpswa (grub_command_t cmd __attribute__ ((unused)),
-               int argc __attribute__((unused)),
-               char *argv[] __attribute__((unused)))
-{
-  query_fpswa ();
-  if (fpswa == NULL)
-    grub_puts_ (N_("No FPSWA found"));
-  else
-    grub_printf (_("FPSWA revision: %x\n"), fpswa->revision);
-  return GRUB_ERR_NONE;
-}
-
-static grub_command_t cmd_linux, cmd_initrd, cmd_fpswa;
-
-GRUB_MOD_INIT(linux)
-{
-  cmd_linux = grub_register_command ("linux", grub_cmd_linux,
-                                    N_("FILE [ARGS...]"), N_("Load Linux."));
-
-  cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
-                                     N_("FILE"), N_("Load initrd."));
-
-  cmd_fpswa = grub_register_command ("fpswa", grub_cmd_fpswa,
-                                    "", N_("Display FPSWA version."));
-
-  my_mod = mod;
-}
-
-GRUB_MOD_FINI(linux)
-{
-  grub_unregister_command (cmd_linux);
-  grub_unregister_command (cmd_initrd);
-  grub_unregister_command (cmd_fpswa);
-}
diff --git a/include/grub/cache.h b/include/grub/cache.h
index 7aa8d793395ad2c9..0a424616f9c2c92d 100644
--- a/include/grub/cache.h
+++ b/include/grub/cache.h
@@ -34,7 +34,7 @@ void EXPORT_FUNC(grub_arch_sync_caches) (void *address, 
grub_size_t len);
 #endif
 
 #ifndef GRUB_MACHINE_EMU
-#if defined (__aarch64__) || defined (__ia64__) || defined (__powerpc__) || \
+#if defined (__aarch64__) || defined (__powerpc__) || \
     defined (__sparc__)
 
 #elif defined (__i386__) || defined (__x86_64__)
diff --git a/include/grub/dl.h b/include/grub/dl.h
index acb4d42327d78ebd..7b4841b0be54bdc3 100644
--- a/include/grub/dl.h
+++ b/include/grub/dl.h
@@ -271,21 +271,11 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
 void grub_arch_dl_init_linker (void);
 #endif
 
-#define GRUB_IA64_DL_TRAMP_ALIGN 16
-#define GRUB_IA64_DL_GOT_ALIGN 16
-
-grub_err_t
-grub_ia64_dl_get_tramp_got_size (const void *ehdr, grub_size_t *tramp,
-                                grub_size_t *got);
 grub_err_t
 grub_arm64_dl_get_tramp_got_size (const void *ehdr, grub_size_t *tramp,
                                  grub_size_t *got);
 
-#if defined (__ia64__)
-#define GRUB_ARCH_DL_TRAMP_ALIGN GRUB_IA64_DL_TRAMP_ALIGN
-#define GRUB_ARCH_DL_GOT_ALIGN GRUB_IA64_DL_GOT_ALIGN
-#define grub_arch_dl_get_tramp_got_size grub_ia64_dl_get_tramp_got_size
-#elif defined (__aarch64__)
+#if defined (__aarch64__)
 #define grub_arch_dl_get_tramp_got_size grub_arm64_dl_get_tramp_got_size
 #else
 grub_err_t
diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h
index 98c4ff177e19f0fa..57743cd8dcb5b0ad 100644
--- a/include/grub/efi/pe32.h
+++ b/include/grub/efi/pe32.h
@@ -84,7 +84,6 @@ struct grub_pe32_coff_header
 };
 
 #define GRUB_PE32_MACHINE_I386                 0x14c
-#define GRUB_PE32_MACHINE_IA64                 0x200
 #define GRUB_PE32_MACHINE_X86_64               0x8664
 #define GRUB_PE32_MACHINE_ARMTHUMB_MIXED       0x01c2
 #define GRUB_PE32_MACHINE_ARM64                        0xAA64
@@ -304,7 +303,6 @@ struct grub_pe32_fixup_block
 #define GRUB_PE32_REL_BASED_ARM_MOV32T  7
 #define GRUB_PE32_REL_BASED_RISCV_LOW12I 7
 #define GRUB_PE32_REL_BASED_RISCV_LOW12S 8
-#define GRUB_PE32_REL_BASED_IA64_IMM64 9
 #define GRUB_PE32_REL_BASED_DIR64      10
 #define GRUB_PE32_REL_BASED_HIGH3ADJ   11
 
diff --git a/include/grub/elf.h b/include/grub/elf.h
index e6f073bc90331cd4..10d9a119928c730c 100644
--- a/include/grub/elf.h
+++ b/include/grub/elf.h
@@ -2233,115 +2233,6 @@ typedef Elf32_Addr Elf32_Conflict;
 /* Keep this the last entry.  */
 #define R_ARM_NUM              256
 
-/* IA-64 specific declarations.  */
-
-/* Processor specific flags for the Ehdr e_flags field.  */
-#define EF_IA_64_MASKOS                0x0000000f      /* os-specific flags */
-#define EF_IA_64_ABI64         0x00000010      /* 64-bit ABI */
-#define EF_IA_64_ARCH          0xff000000      /* arch. version mask */
-
-/* Processor specific values for the Phdr p_type field.  */
-#define PT_IA_64_ARCHEXT       (PT_LOPROC + 0) /* arch extension bits */
-#define PT_IA_64_UNWIND                (PT_LOPROC + 1) /* ia64 unwind bits */
-
-/* Processor specific flags for the Phdr p_flags field.  */
-#define PF_IA_64_NORECOV       0x80000000      /* spec insns w/o recovery */
-
-/* Processor specific values for the Shdr sh_type field.  */
-#define SHT_IA_64_EXT          (SHT_LOPROC + 0) /* extension bits */
-#define SHT_IA_64_UNWIND       (SHT_LOPROC + 1) /* unwind bits */
-
-/* Processor specific flags for the Shdr sh_flags field.  */
-#define SHF_IA_64_SHORT                0x10000000      /* section near gp */
-#define SHF_IA_64_NORECOV      0x20000000      /* spec insns w/o recovery */
-
-/* Processor specific values for the Dyn d_tag field.  */
-#define DT_IA_64_PLT_RESERVE   (DT_LOPROC + 0)
-#define DT_IA_64_NUM           1
-
-/* IA-64 relocations.  */
-#define R_IA64_NONE            0x00    /* none */
-#define R_IA64_IMM14           0x21    /* symbol + addend, add imm14 */
-#define R_IA64_IMM22           0x22    /* symbol + addend, add imm22 */
-#define R_IA64_IMM64           0x23    /* symbol + addend, mov imm64 */
-#define R_IA64_DIR32MSB                0x24    /* symbol + addend, data4 MSB */
-#define R_IA64_DIR32LSB                0x25    /* symbol + addend, data4 LSB */
-#define R_IA64_DIR64MSB                0x26    /* symbol + addend, data8 MSB */
-#define R_IA64_DIR64LSB                0x27    /* symbol + addend, data8 LSB */
-#define R_IA64_GPREL22         0x2a    /* @gprel(sym + add), add imm22 */
-#define R_IA64_GPREL64I                0x2b    /* @gprel(sym + add), mov imm64 
*/
-#define R_IA64_GPREL32MSB      0x2c    /* @gprel(sym + add), data4 MSB */
-#define R_IA64_GPREL32LSB      0x2d    /* @gprel(sym + add), data4 LSB */
-#define R_IA64_GPREL64MSB      0x2e    /* @gprel(sym + add), data8 MSB */
-#define R_IA64_GPREL64LSB      0x2f    /* @gprel(sym + add), data8 LSB */
-#define R_IA64_LTOFF22         0x32    /* @ltoff(sym + add), add imm22 */
-#define R_IA64_LTOFF64I                0x33    /* @ltoff(sym + add), mov imm64 
*/
-#define R_IA64_PLTOFF22                0x3a    /* @pltoff(sym + add), add 
imm22 */
-#define R_IA64_PLTOFF64I       0x3b    /* @pltoff(sym + add), mov imm64 */
-#define R_IA64_PLTOFF64MSB     0x3e    /* @pltoff(sym + add), data8 MSB */
-#define R_IA64_PLTOFF64LSB     0x3f    /* @pltoff(sym + add), data8 LSB */
-#define R_IA64_FPTR64I         0x43    /* @fptr(sym + add), mov imm64 */
-#define R_IA64_FPTR32MSB       0x44    /* @fptr(sym + add), data4 MSB */
-#define R_IA64_FPTR32LSB       0x45    /* @fptr(sym + add), data4 LSB */
-#define R_IA64_FPTR64MSB       0x46    /* @fptr(sym + add), data8 MSB */
-#define R_IA64_FPTR64LSB       0x47    /* @fptr(sym + add), data8 LSB */
-#define R_IA64_PCREL60B                0x48    /* @pcrel(sym + add), brl */
-#define R_IA64_PCREL21B                0x49    /* @pcrel(sym + add), ptb, call 
*/
-#define R_IA64_PCREL21M                0x4a    /* @pcrel(sym + add), chk.s */
-#define R_IA64_PCREL21F                0x4b    /* @pcrel(sym + add), fchkf */
-#define R_IA64_PCREL32MSB      0x4c    /* @pcrel(sym + add), data4 MSB */
-#define R_IA64_PCREL32LSB      0x4d    /* @pcrel(sym + add), data4 LSB */
-#define R_IA64_PCREL64MSB      0x4e    /* @pcrel(sym + add), data8 MSB */
-#define R_IA64_PCREL64LSB      0x4f    /* @pcrel(sym + add), data8 LSB */
-#define R_IA64_LTOFF_FPTR22    0x52    /* @ltoff(@fptr(s+a)), imm22 */
-#define R_IA64_LTOFF_FPTR64I   0x53    /* @ltoff(@fptr(s+a)), imm64 */
-#define R_IA64_LTOFF_FPTR32MSB 0x54    /* @ltoff(@fptr(s+a)), data4 MSB */
-#define R_IA64_LTOFF_FPTR32LSB 0x55    /* @ltoff(@fptr(s+a)), data4 LSB */
-#define R_IA64_LTOFF_FPTR64MSB 0x56    /* @ltoff(@fptr(s+a)), data8 MSB */
-#define R_IA64_LTOFF_FPTR64LSB 0x57    /* @ltoff(@fptr(s+a)), data8 LSB */
-#define R_IA64_SEGREL32MSB     0x5c    /* @segrel(sym + add), data4 MSB */
-#define R_IA64_SEGREL32LSB     0x5d    /* @segrel(sym + add), data4 LSB */
-#define R_IA64_SEGREL64MSB     0x5e    /* @segrel(sym + add), data8 MSB */
-#define R_IA64_SEGREL64LSB     0x5f    /* @segrel(sym + add), data8 LSB */
-#define R_IA64_SECREL32MSB     0x64    /* @secrel(sym + add), data4 MSB */
-#define R_IA64_SECREL32LSB     0x65    /* @secrel(sym + add), data4 LSB */
-#define R_IA64_SECREL64MSB     0x66    /* @secrel(sym + add), data8 MSB */
-#define R_IA64_SECREL64LSB     0x67    /* @secrel(sym + add), data8 LSB */
-#define R_IA64_REL32MSB                0x6c    /* data 4 + REL */
-#define R_IA64_REL32LSB                0x6d    /* data 4 + REL */
-#define R_IA64_REL64MSB                0x6e    /* data 8 + REL */
-#define R_IA64_REL64LSB                0x6f    /* data 8 + REL */
-#define R_IA64_LTV32MSB                0x74    /* symbol + addend, data4 MSB */
-#define R_IA64_LTV32LSB                0x75    /* symbol + addend, data4 LSB */
-#define R_IA64_LTV64MSB                0x76    /* symbol + addend, data8 MSB */
-#define R_IA64_LTV64LSB                0x77    /* symbol + addend, data8 LSB */
-#define R_IA64_PCREL21BI       0x79    /* @pcrel(sym + add), 21bit inst */
-#define R_IA64_PCREL22         0x7a    /* @pcrel(sym + add), 22bit inst */
-#define R_IA64_PCREL64I                0x7b    /* @pcrel(sym + add), 64bit 
inst */
-#define R_IA64_IPLTMSB         0x80    /* dynamic reloc, imported PLT, MSB */
-#define R_IA64_IPLTLSB         0x81    /* dynamic reloc, imported PLT, LSB */
-#define R_IA64_COPY            0x84    /* copy relocation */
-#define R_IA64_SUB             0x85    /* Addend and symbol difference */
-#define R_IA64_LTOFF22X                0x86    /* LTOFF22, relaxable.  */
-#define R_IA64_LDXMOV          0x87    /* Use of LTOFF22X.  */
-#define R_IA64_TPREL14         0x91    /* @tprel(sym + add), imm14 */
-#define R_IA64_TPREL22         0x92    /* @tprel(sym + add), imm22 */
-#define R_IA64_TPREL64I                0x93    /* @tprel(sym + add), imm64 */
-#define R_IA64_TPREL64MSB      0x96    /* @tprel(sym + add), data8 MSB */
-#define R_IA64_TPREL64LSB      0x97    /* @tprel(sym + add), data8 LSB */
-#define R_IA64_LTOFF_TPREL22   0x9a    /* @ltoff(@tprel(s+a)), imm2 */
-#define R_IA64_DTPMOD64MSB     0xa6    /* @dtpmod(sym + add), data8 MSB */
-#define R_IA64_DTPMOD64LSB     0xa7    /* @dtpmod(sym + add), data8 LSB */
-#define R_IA64_LTOFF_DTPMOD22  0xaa    /* @ltoff(@dtpmod(sym + add)), imm22 */
-#define R_IA64_DTPREL14                0xb1    /* @dtprel(sym + add), imm14 */
-#define R_IA64_DTPREL22                0xb2    /* @dtprel(sym + add), imm22 */
-#define R_IA64_DTPREL64I       0xb3    /* @dtprel(sym + add), imm64 */
-#define R_IA64_DTPREL32MSB     0xb4    /* @dtprel(sym + add), data4 MSB */
-#define R_IA64_DTPREL32LSB     0xb5    /* @dtprel(sym + add), data4 LSB */
-#define R_IA64_DTPREL64MSB     0xb6    /* @dtprel(sym + add), data8 MSB */
-#define R_IA64_DTPREL64LSB     0xb7    /* @dtprel(sym + add), data8 LSB */
-#define R_IA64_LTOFF_DTPREL22  0xba    /* @ltoff(@dtprel(s+a)), imm22 */
-
 /* SH specific declarations */
 
 /* SH relocs.  */
diff --git a/include/grub/ia64/efi/memory.h b/include/grub/ia64/efi/memory.h
deleted file mode 100644
index 2c64918e3f711610..0000000000000000
--- a/include/grub/ia64/efi/memory.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef GRUB_MEMORY_CPU_HEADER
-#include <grub/efi/memory.h>
-
-#define GRUB_EFI_MAX_USABLE_ADDRESS 0xffffffff
-
-#endif /* ! GRUB_MEMORY_CPU_HEADER */
diff --git a/include/grub/ia64/efi/time.h b/include/grub/ia64/efi/time.h
deleted file mode 100644
index 897ce9c00738b834..0000000000000000
--- a/include/grub/ia64/efi/time.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2008  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef GRUB_MACHINE_TIME_HEADER
-#define GRUB_MACHINE_TIME_HEADER       1
-
-#include <grub/efi/time.h>
-
-#endif /* ! GRUB_MACHINE_TIME_HEADER */
diff --git a/include/grub/ia64/kernel.h b/include/grub/ia64/kernel.h
deleted file mode 100644
index c5496a00b65afbad..0000000000000000
--- a/include/grub/ia64/kernel.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2010  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef GRUB_CPU_KERNEL_HEADER
-#define GRUB_CPU_KERNEL_HEADER   1
-
-#define GRUB_MOD_ALIGN 0x1
-#define GRUB_MOD_GAP   0x0
-
-#endif /* ! GRUB_CPU_KERNEL_HEADER */
diff --git a/include/grub/ia64/reloc.h b/include/grub/ia64/reloc.h
deleted file mode 100644
index 45c8fba2728ce5b3..0000000000000000
--- a/include/grub/ia64/reloc.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2013  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef GRUB_IA64_RELOC_H
-#define GRUB_IA64_RELOC_H 1
-
-struct grub_ia64_trampoline;
-
-void
-grub_ia64_add_value_to_slot_20b (grub_addr_t addr, grub_uint32_t value);
-void
-grub_ia64_add_value_to_slot_21 (grub_addr_t addr, grub_uint32_t value);
-void
-grub_ia64_set_immu64 (grub_addr_t addr, grub_uint64_t value);
-void
-grub_ia64_make_trampoline (struct grub_ia64_trampoline *tr, grub_uint64_t 
addr);
-
-struct grub_ia64_trampoline
-{
-  /* nop.m */
-  grub_uint8_t nop[5];
-  /* movl r15 = addr*/
-  grub_uint8_t addr_hi[6];
-  grub_uint8_t e0;
-  grub_uint8_t addr_lo[4];
-  grub_uint8_t jump[0x20];
-};
-
-#endif
diff --git a/include/grub/ia64/setjmp.h b/include/grub/ia64/setjmp.h
deleted file mode 100644
index 0a62113795ef49b3..0000000000000000
--- a/include/grub/ia64/setjmp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Define the machine-dependent type `jmp_buf'.  Linux/IA-64 version.
-   Copyright (C) 1999, 2000, 2008 Free Software Foundation, Inc.
-   Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* User code must not depend on the internal representation of jmp_buf. */
-
-#define _JBLEN 70
-
-/* the __jmp_buf element type should be __float80 per ABI... */
-typedef long grub_jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* 
guarantees 128-bit alignment! */
-
-int grub_setjmp (grub_jmp_buf env) RETURNS_TWICE;
-void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn));
diff --git a/include/grub/ia64/time.h b/include/grub/ia64/time.h
deleted file mode 100644
index 03ee79fa4e454dd2..0000000000000000
--- a/include/grub/ia64/time.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2007, 2008  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef KERNEL_CPU_TIME_HEADER
-#define KERNEL_CPU_TIME_HEADER 1
-
-static __inline void
-grub_cpu_idle (void)
-{
-  /* FIXME: not implemented */
-}
-
-#endif /* ! KERNEL_CPU_TIME_HEADER */
diff --git a/include/grub/ia64/types.h b/include/grub/ia64/types.h
deleted file mode 100644
index 91a546dd2c5e9080..0000000000000000
--- a/include/grub/ia64/types.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2008  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef GRUB_TYPES_CPU_HEADER
-#define GRUB_TYPES_CPU_HEADER  1
-
-/* The size of void *.  */
-#define GRUB_TARGET_SIZEOF_VOID_P      8
-
-/* The size of long.  */
-#define GRUB_TARGET_SIZEOF_LONG                8
-
-/* ia64 is little-endian (usually).  */
-#undef GRUB_TARGET_WORDS_BIGENDIAN
-
-
-#endif /* ! GRUB_TYPES_CPU_HEADER */
diff --git a/include/grub/misc.h b/include/grub/misc.h
index 6c9d56de9264ff20..b12ded5b1b9577be 100644
--- a/include/grub/misc.h
+++ b/include/grub/misc.h
@@ -392,7 +392,7 @@ grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
                                          grub_uint64_t *r);
 
 /* Must match softdiv group in gentpl.py.  */
-#if !defined(GRUB_MACHINE_EMU) && (defined(__arm__) || defined(__ia64__) || \
+#if !defined(GRUB_MACHINE_EMU) && (defined(__arm__) || \
     (defined(__riscv) && (__riscv_xlen == 32)))
 #define GRUB_DIVISION_IN_SOFTWARE 1
 #else
diff --git a/include/grub/util/install.h b/include/grub/util/install.h
index 7d7445af9815eb93..2785eddc1ac3f202 100644
--- a/include/grub/util/install.h
+++ b/include/grub/util/install.h
@@ -97,7 +97,6 @@ enum grub_install_plat
     GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275,
     GRUB_INSTALL_PLATFORM_MIPSEL_ARC,
     GRUB_INSTALL_PLATFORM_MIPS_ARC,
-    GRUB_INSTALL_PLATFORM_IA64_EFI,
     GRUB_INSTALL_PLATFORM_ARM_UBOOT,
     GRUB_INSTALL_PLATFORM_ARM_EFI,
     GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS,
diff --git a/include/grub/util/mkimage.h b/include/grub/util/mkimage.h
index 3819a67441c86958..7c31c23d302a7000 100644
--- a/include/grub/util/mkimage.h
+++ b/include/grub/util/mkimage.h
@@ -29,11 +29,9 @@ struct grub_mkimage_layout
   void *reloc_section;
   size_t reloc_size;
   size_t align;
-  grub_size_t ia64jmp_off;
   grub_size_t tramp_off;
   grub_size_t got_off;
   grub_size_t got_size;
-  unsigned ia64jmpnum;
   grub_uint32_t bss_start;
   grub_uint32_t end;
 };
diff --git a/tests/core_compress_test.in b/tests/core_compress_test.in
index 24a811418aad8dfa..78a411e0984a7cf0 100644
--- a/tests/core_compress_test.in
+++ b/tests/core_compress_test.in
@@ -21,7 +21,7 @@ grubshell=@builddir@/grub-shell
 
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # FIXME: Only mips currently supports configurable core compression
-    *-emu | i386-* | x86_64-* | sparc64-* | ia64-*)
+    *-emu | i386-* | x86_64-* | sparc64-*)
        exit 77
        ;;
 esac
diff --git a/util/grub-install-common.c b/util/grub-install-common.c
index e45fb290307150bc..6fa9776df078d1d9 100644
--- a/util/grub-install-common.c
+++ b/util/grub-install-common.c
@@ -903,7 +903,6 @@ static struct
     [GRUB_INSTALL_PLATFORM_MIPS_ARC] =         { "mips",    "arc"       },
     [GRUB_INSTALL_PLATFORM_SPARC64_IEEE1275] = { "sparc64", "ieee1275"  },
     [GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275] = { "powerpc", "ieee1275"  },
-    [GRUB_INSTALL_PLATFORM_IA64_EFI] =         { "ia64",    "efi"       },
     [GRUB_INSTALL_PLATFORM_ARM_EFI] =          { "arm",     "efi"       },
     [GRUB_INSTALL_PLATFORM_ARM64_EFI] =        { "arm64",   "efi"       },
     [GRUB_INSTALL_PLATFORM_ARM_UBOOT] =        { "arm",     "uboot"     },
diff --git a/util/grub-install.c b/util/grub-install.c
index 53b46480428878cb..db7b3e7dfc613310 100644
--- a/util/grub-install.c
+++ b/util/grub-install.c
@@ -316,8 +316,6 @@ get_default_platform (void)
    return "mipsel-loongson";
 #elif defined (__MIPSEB__)
    return "mips-arc";
-#elif defined (__ia64__)
-   return "ia64-efi";
 #elif defined (__arm__)
    return grub_install_get_default_arm_platform ();
 #elif defined (__aarch64__)
@@ -482,7 +480,6 @@ have_bootdev (enum grub_install_plat pl)
     case GRUB_INSTALL_PLATFORM_I386_PC:
     case GRUB_INSTALL_PLATFORM_I386_EFI:
     case GRUB_INSTALL_PLATFORM_X86_64_EFI:
-    case GRUB_INSTALL_PLATFORM_IA64_EFI:
     case GRUB_INSTALL_PLATFORM_ARM_EFI:
     case GRUB_INSTALL_PLATFORM_ARM64_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV32_EFI:
@@ -925,7 +922,6 @@ main (int argc, char *argv[])
     case GRUB_INSTALL_PLATFORM_ARM64_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV32_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV64_EFI:
-    case GRUB_INSTALL_PLATFORM_IA64_EFI:
     case GRUB_INSTALL_PLATFORM_I386_IEEE1275:
     case GRUB_INSTALL_PLATFORM_SPARC64_IEEE1275:
     case GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275:
@@ -972,7 +968,6 @@ main (int argc, char *argv[])
     case GRUB_INSTALL_PLATFORM_ARM64_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV32_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV64_EFI:
-    case GRUB_INSTALL_PLATFORM_IA64_EFI:
     case GRUB_INSTALL_PLATFORM_I386_IEEE1275:
     case GRUB_INSTALL_PLATFORM_ARM_UBOOT:
     case GRUB_INSTALL_PLATFORM_I386_QEMU:
@@ -1027,7 +1022,6 @@ main (int argc, char *argv[])
     case GRUB_INSTALL_PLATFORM_ARM64_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV32_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV64_EFI:
-    case GRUB_INSTALL_PLATFORM_IA64_EFI:
       is_efi = 1;
       break;
     default:
@@ -1150,9 +1144,6 @@ main (int argc, char *argv[])
            case GRUB_INSTALL_PLATFORM_X86_64_EFI:
              efi_file = "BOOTX64.EFI";
              break;
-           case GRUB_INSTALL_PLATFORM_IA64_EFI:
-             efi_file = "BOOTIA64.EFI";
-             break;
            case GRUB_INSTALL_PLATFORM_ARM_EFI:
              efi_file = "BOOTARM.EFI";
              break;
@@ -1183,9 +1174,6 @@ main (int argc, char *argv[])
            case GRUB_INSTALL_PLATFORM_X86_64_EFI:
              efi_file = "grubx64.efi";
              break;
-           case GRUB_INSTALL_PLATFORM_IA64_EFI:
-             efi_file = "grubia64.efi";
-             break;
            case GRUB_INSTALL_PLATFORM_ARM_EFI:
              efi_file = "grubarm.efi";
              break;
@@ -1502,7 +1490,6 @@ main (int argc, char *argv[])
                  case GRUB_INSTALL_PLATFORM_ARM64_EFI:
                  case GRUB_INSTALL_PLATFORM_RISCV32_EFI:
                  case GRUB_INSTALL_PLATFORM_RISCV64_EFI:
-                 case GRUB_INSTALL_PLATFORM_IA64_EFI:
                    g = grub_util_guess_efi_drive (*curdev);
                    break;
                  case GRUB_INSTALL_PLATFORM_SPARC64_IEEE1275:
@@ -1597,7 +1584,6 @@ main (int argc, char *argv[])
     case GRUB_INSTALL_PLATFORM_ARM64_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV32_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV64_EFI:
-    case GRUB_INSTALL_PLATFORM_IA64_EFI:
       core_name = "core.efi";
       snprintf (mkimage_target, sizeof (mkimage_target),
                "%s-%s",
@@ -1702,7 +1688,6 @@ main (int argc, char *argv[])
     case GRUB_INSTALL_PLATFORM_ARM64_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV32_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV64_EFI:
-    case GRUB_INSTALL_PLATFORM_IA64_EFI:
     case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
     case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
     case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
@@ -1957,7 +1942,6 @@ main (int argc, char *argv[])
     case GRUB_INSTALL_PLATFORM_ARM64_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV32_EFI:
     case GRUB_INSTALL_PLATFORM_RISCV64_EFI:
-    case GRUB_INSTALL_PLATFORM_IA64_EFI:
       {
        char *dst = grub_util_path_concat (2, efidir, efi_file);
        grub_install_copy_file (imgfile, dst, 1);
diff --git a/util/grub-mkimage.c b/util/grub-mkimage.c
index c0d559937020b2d2..080e7c0d69576dc5 100644
--- a/util/grub-mkimage.c
+++ b/util/grub-mkimage.c
@@ -42,7 +42,6 @@
 #include <grub/efi/pe32.h>
 #include <grub/uboot/image.h>
 #include <grub/arm/reloc.h>
-#include <grub/ia64/reloc.h>
 #include <grub/osdep/hostfile.h>
 #include <grub/util/install.h>
 #include <grub/emu/config.h>
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
index c5fb336e97584817..675ee6f771a695a5 100644
--- a/util/grub-mkimagexx.c
+++ b/util/grub-mkimagexx.c
@@ -43,7 +43,6 @@
 #include <grub/uboot/image.h>
 #include <grub/arm/reloc.h>
 #include <grub/arm64/reloc.h>
-#include <grub/ia64/reloc.h>
 #include <grub/osdep/hostfile.h>
 #include <grub/util/install.h>
 #include <grub/util/mkimage.h>
@@ -657,32 +656,6 @@ SUFFIX (get_target_address) (Elf_Ehdr *e, Elf_Shdr *s, 
Elf_Addr offset,
   return (Elf_Addr *) ((char *) e + grub_target_to_host (s->sh_offset) + 
offset);
 }
 
-#ifdef MKIMAGE_ELF64
-static Elf_Addr
-SUFFIX (count_funcs) (Elf_Ehdr *e, Elf_Shdr *symtab_section,
-                     const struct grub_install_image_target_desc *image_target)
-{
-  Elf_Word symtab_size, sym_size, num_syms;
-  Elf_Off symtab_offset;
-  Elf_Sym *sym;
-  Elf_Word i;
-  int ret = 0;
-
-  symtab_size = grub_target_to_host (symtab_section->sh_size);
-  sym_size = grub_target_to_host (symtab_section->sh_entsize);
-  symtab_offset = grub_target_to_host (symtab_section->sh_offset);
-  num_syms = symtab_size / sym_size;
-
-  for (i = 0, sym = (Elf_Sym *) ((char *) e + symtab_offset);
-       i < num_syms;
-       i++, sym = (Elf_Sym *) ((char *) sym + sym_size))
-    if (ELF_ST_TYPE (sym->st_info) == STT_FUNC)
-      ret++;
-
-  return ret;
-}
-#endif
-
 #ifdef MKIMAGE_ELF32
 /* Deal with relocation information. This function relocates addresses
    within the virtual address space starting from 0. So only relative
@@ -781,7 +754,6 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct 
section_metadata *smd,
   Elf_Half i;
   Elf_Shdr *s;
 #ifdef MKIMAGE_ELF64
-  struct grub_ia64_trampoline *tr = (void *) (pe_target + tramp_off);
   grub_uint64_t *gpptr = (void *) (pe_target + got_off);
   unsigned unmatched_adr_got_page = 0;
 #define MASK19 ((1 << 19) - 1)
@@ -947,87 +919,6 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct 
section_metadata *smd,
                  break;
                }
              break;
-            case EM_IA_64:
-             switch (ELF_R_TYPE (info))
-               {
-               case R_IA64_PCREL21B:
-                 {
-                   grub_uint64_t noff;
-                   grub_ia64_make_trampoline (tr, addend + sym_addr);
-                   noff = ((char *) tr - (char *) pe_target
-                           - target_section_addr - (offset & ~3)) >> 4;
-                   tr++;
-                   if (noff & ~MASK19)
-                     grub_util_error ("trampoline offset too big (%"
-                                      GRUB_HOST_PRIxLONG_LONG ")",
-                                      (unsigned long long) noff);
-                   grub_ia64_add_value_to_slot_20b ((grub_addr_t) target, 
noff);
-                 }
-                 break;
-
-               case R_IA64_LTOFF22X:
-               case R_IA64_LTOFF22:
-                 {
-                   Elf_Sym *sym;
-
-                   sym = (Elf_Sym *) ((char *) e
-                                      + grub_target_to_host 
(smd->symtab->sh_offset)
-                                      + ELF_R_SYM (info) * grub_target_to_host 
(smd->symtab->sh_entsize));
-                   if (ELF_ST_TYPE (sym->st_info) == STT_FUNC)
-                     sym_addr = grub_target_to_host64 (*(grub_uint64_t *) 
(pe_target
-                                                                           + 
sym->st_value
-                                                                           - 
image_target->vaddr_offset));
-                 }
-               /* FALLTHROUGH */
-               case R_IA64_LTOFF_FPTR22:
-                 *gpptr = grub_host_to_target64 (addend + sym_addr);
-                 grub_ia64_add_value_to_slot_21 ((grub_addr_t) target,
-                                                 (char *) gpptr - (char *) 
pe_target
-                                                 + image_target->vaddr_offset);
-                 gpptr++;
-                 break;
-
-               case R_IA64_GPREL22:
-                 grub_ia64_add_value_to_slot_21 ((grub_addr_t) target,
-                                                 addend + sym_addr);
-                 break;
-               case R_IA64_GPREL64I:
-                 grub_ia64_set_immu64 ((grub_addr_t) target,
-                                       addend + sym_addr);
-                 break;
-               case R_IA64_PCREL64LSB:
-                 *target = grub_host_to_target64 (grub_target_to_host64 
(*target)
-                                                  + addend + sym_addr
-                                                  - target_section_addr - 
offset
-                                                  - 
image_target->vaddr_offset);
-                 break;
-
-               case R_IA64_SEGREL64LSB:
-                 *target = grub_host_to_target64 (grub_target_to_host64 
(*target)
-                                                  + addend + sym_addr - 
target_section_addr);
-                 break;
-               case R_IA64_DIR64LSB:
-               case R_IA64_FPTR64LSB:
-                 *target = grub_host_to_target64 (grub_target_to_host64 
(*target)
-                                                  + addend + sym_addr);
-                 grub_util_info ("relocating a direct entry to 0x%"
-                                 GRUB_HOST_PRIxLONG_LONG " at the offset 0x%"
-                                 GRUB_HOST_PRIxLONG_LONG,
-                                 (unsigned long long)
-                                 grub_target_to_host64 (*target),
-                                 (unsigned long long) offset);
-                 break;
-
-                 /* We treat LTOFF22X as LTOFF22, so we can ignore LDXMOV.  */
-               case R_IA64_LDXMOV:
-                 break;
-
-               default:
-                 grub_util_error (_("relocation 0x%x is not implemented yet"),
-                                  (unsigned int) ELF_R_TYPE (info));
-                 break;
-               }
-              break;
             case EM_AARCH64:
               {
                 sym_addr += addend;
@@ -1595,42 +1486,6 @@ translate_relocation_pe (struct translate_context *ctx,
                               image_target);
        }
       break;
-    case EM_IA_64:
-      switch (ELF_R_TYPE (info))
-       {
-       case R_IA64_PCREL64LSB:
-       case R_IA64_LDXMOV:
-       case R_IA64_PCREL21B:
-       case R_IA64_LTOFF_FPTR22:
-       case R_IA64_LTOFF22X:
-       case R_IA64_LTOFF22:
-       case R_IA64_GPREL22:
-       case R_IA64_GPREL64I:
-       case R_IA64_SEGREL64LSB:
-         break;
-
-       case R_IA64_FPTR64LSB:
-       case R_IA64_DIR64LSB:
-#if 1
-         {
-           grub_util_info ("adding a relocation entry for 0x%"
-                           GRUB_HOST_PRIxLONG_LONG,
-                           (unsigned long long) addr);
-           ctx->current_address
-             = add_fixup_entry (&ctx->lst,
-                                GRUB_PE32_REL_BASED_DIR64,
-                                addr,
-                                0, ctx->current_address,
-                                image_target);
-         }
-#endif
-         break;
-       default:
-         grub_util_error (_("relocation 0x%x is not implemented yet"),
-                          (unsigned int) ELF_R_TYPE (info));
-         break;
-       }
-      break;
     case EM_AARCH64:
 #if defined(MKIMAGE_ELF64)
       switch (ELF_R_TYPE (info))
@@ -2012,13 +1867,7 @@ make_reloc_section (Elf_Ehdr *e, struct 
grub_mkimage_layout *layout,
          }
       }
 
-  if (image_target->elf_target == EM_IA_64)
-    create_u64_fixups (&ctx,
-                      layout->ia64jmp_off
-                      + image_target->vaddr_offset,
-                      2 * layout->ia64jmpnum,
-                      image_target);
-  if (image_target->elf_target == EM_IA_64 || image_target->elf_target == 
EM_AARCH64)
+  if (image_target->elf_target == EM_AARCH64)
     create_u64_fixups (&ctx,
                       layout->got_off
                       + image_target->vaddr_offset,
@@ -2360,25 +2209,6 @@ SUFFIX (grub_mkimage_load_image) (const char 
*kernel_path,
       if (! smd.symtab)
        grub_util_error ("%s", _("no symbol table"));
 #ifdef MKIMAGE_ELF64
-      if (image_target->elf_target == EM_IA_64)
-       {
-         grub_size_t tramp;
-
-         layout->kernel_size = ALIGN_UP (layout->kernel_size, 16);
-
-         grub_ia64_dl_get_tramp_got_size (e, &tramp, &layout->got_size);
-
-         layout->tramp_off = layout->kernel_size;
-         layout->kernel_size += ALIGN_UP (tramp, 16);
-
-         layout->ia64jmp_off = layout->kernel_size;
-         layout->ia64jmpnum = SUFFIX (count_funcs) (e, smd.symtab,
-                                                    image_target);
-         layout->kernel_size += 16 * layout->ia64jmpnum;
-
-         layout->got_off = layout->kernel_size;
-         layout->kernel_size += ALIGN_UP (layout->got_size, 16);
-       }
       if (image_target->elf_target == EM_AARCH64)
        {
          grub_size_t tramp;
@@ -2408,8 +2238,7 @@ SUFFIX (grub_mkimage_load_image) (const char *kernel_path,
   if (is_relocatable (image_target))
     {
       layout->start_address = SUFFIX (relocate_symbols) (e, &smd,
-                                 (char *) out_img + layout->ia64jmp_off,
-                                 layout->ia64jmp_off + 
image_target->vaddr_offset,
+                                 (char *) out_img, image_target->vaddr_offset,
                                  layout->bss_start, layout->end, image_target);
 
       if (layout->start_address == (Elf_Addr) -1)
diff --git a/util/grub-mknetdir.c b/util/grub-mknetdir.c
index d609ff94cca29de7..cb1c3f03c4058fb8 100644
--- a/util/grub-mknetdir.c
+++ b/util/grub-mknetdir.c
@@ -105,7 +105,6 @@ static const struct
     [GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275] = { "powerpc-ieee1275", "ofnet", 
".elf" },
     [GRUB_INSTALL_PLATFORM_I386_EFI] = { "i386-efi", "efinet", ".efi" },
     [GRUB_INSTALL_PLATFORM_X86_64_EFI] = { "x86_64-efi", "efinet", ".efi" },
-    [GRUB_INSTALL_PLATFORM_IA64_EFI] = { "ia64-efi", "efinet", ".efi" },
     [GRUB_INSTALL_PLATFORM_ARM_EFI] = { "arm-efi", "efinet", ".efi" },
     [GRUB_INSTALL_PLATFORM_ARM64_EFI] = { "arm64-efi", "efinet", ".efi" },
     [GRUB_INSTALL_PLATFORM_RISCV32_EFI] = { "riscv32-efi", "efinet", ".efi" },
diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
index 1e0e40ca6ab6e0eb..a0e17cdb9651acbc 100644
--- a/util/grub-mkrescue.c
+++ b/util/grub-mkrescue.c
@@ -270,7 +270,6 @@ make_image_abs (enum grub_install_plat plat,
     {
       case GRUB_INSTALL_PLATFORM_I386_EFI:
       case GRUB_INSTALL_PLATFORM_X86_64_EFI:
-      case GRUB_INSTALL_PLATFORM_IA64_EFI:
       case GRUB_INSTALL_PLATFORM_ARM_EFI:
       case GRUB_INSTALL_PLATFORM_ARM64_EFI:
       case GRUB_INSTALL_PLATFORM_RISCV32_EFI:
@@ -558,7 +557,6 @@ main (int argc, char *argv[])
       if (source_dirs[GRUB_INSTALL_PLATFORM_I386_PC]
          || source_dirs[GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275]
          || source_dirs[GRUB_INSTALL_PLATFORM_I386_EFI]
-         || source_dirs[GRUB_INSTALL_PLATFORM_IA64_EFI]
          || source_dirs[GRUB_INSTALL_PLATFORM_ARM_EFI]
          || source_dirs[GRUB_INSTALL_PLATFORM_ARM64_EFI]
          || source_dirs[GRUB_INSTALL_PLATFORM_RISCV32_EFI]
@@ -758,7 +756,6 @@ main (int argc, char *argv[])
 
   if (source_dirs[GRUB_INSTALL_PLATFORM_I386_EFI]
       || source_dirs[GRUB_INSTALL_PLATFORM_X86_64_EFI]
-      || source_dirs[GRUB_INSTALL_PLATFORM_IA64_EFI]
       || source_dirs[GRUB_INSTALL_PLATFORM_ARM_EFI]
       || source_dirs[GRUB_INSTALL_PLATFORM_ARM64_EFI]
       || source_dirs[GRUB_INSTALL_PLATFORM_RISCV32_EFI]
@@ -788,10 +785,6 @@ main (int argc, char *argv[])
       free (diskdir_uuid);
       free (diskdir);
 
-      imgname = grub_util_path_concat (2, efidir_efi_boot, "bootia64.efi");
-      make_image_fwdisk_abs (GRUB_INSTALL_PLATFORM_IA64_EFI, "ia64-efi", 
imgname);
-      free (imgname);
-
       grub_install_push_module ("part_apple");
       img64 = grub_util_path_concat (2, efidir_efi_boot, "bootx64.efi");
       make_image_abs (GRUB_INSTALL_PLATFORM_X86_64_EFI, "x86_64-efi", img64);
diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
index 163529ca9c25422e..e64239b2ffcbf49b 100644
--- a/util/grub-module-verifier.c
+++ b/util/grub-module-verifier.c
@@ -48,28 +48,6 @@ struct grub_module_verifier_arch archs[] = {
       R_SPARC_32,
       -1
     } },
-  { "ia64", 8, 0, EM_IA_64, GRUB_MODULE_VERIFY_SUPPORTS_RELA, (int[]){
-      R_IA64_PCREL21B, /* We should verify that it's pointing either
-                         to a function or to a section in the same module.
-                         Checking that external symbol is a function is
-                         non-trivial and I have never seen this relocation used
-                         for anything else, so assume that it always points to 
a
-                         function.
-                      */
-      R_IA64_SEGREL64LSB,
-      R_IA64_FPTR64LSB,
-      R_IA64_DIR64LSB,
-      R_IA64_PCREL64LSB,
-      R_IA64_LTOFF22X,
-      R_IA64_LTOFF22,
-      R_IA64_GPREL64I,
-      R_IA64_LTOFF_FPTR22,
-      R_IA64_LDXMOV,
-      -1
-    }, (int[]){
-      R_IA64_GPREL22,
-      -1
-    } },
   { "mipsel", 4, 0, EM_MIPS, GRUB_MODULE_VERIFY_SUPPORTS_REL | 
GRUB_MODULE_VERIFY_SUPPORTS_RELA, (int[]){
       R_MIPS_HI16,
       R_MIPS_LO16,
diff --git a/util/mkimage.c b/util/mkimage.c
index 43078c71cd995889..a21a19e37fa9d599 100644
--- a/util/mkimage.c
+++ b/util/mkimage.c
@@ -43,7 +43,6 @@
 #include <grub/uboot/image.h>
 #include <grub/arm/reloc.h>
 #include <grub/arm64/reloc.h>
-#include <grub/ia64/reloc.h>
 #include <grub/osdep/hostfile.h>
 #include <grub/util/install.h>
 #include <grub/util/mkimage.h>
@@ -409,22 +408,6 @@ static const struct grub_install_image_target_desc 
image_targets[] =
       .link_addr = GRUB_KERNEL_SPARC64_IEEE1275_LINK_ADDR,
       .mod_align = GRUB_KERNEL_SPARC64_IEEE1275_MOD_ALIGN,
     },
-    {
-      .dirname = "ia64-efi",
-      .names = {"ia64-efi", NULL},
-      .voidp_sizeof = 8,
-      .bigendian = 0,
-      .id = IMAGE_EFI,
-      .flags = PLATFORM_FLAGS_NONE,
-      .total_module_size = TARGET_NO_FIELD,
-      .decompressor_compressed_size = TARGET_NO_FIELD,
-      .decompressor_uncompressed_size = TARGET_NO_FIELD,
-      .decompressor_uncompressed_addr = TARGET_NO_FIELD,
-      .section_align = GRUB_PE32_SECTION_ALIGNMENT,
-      .vaddr_offset = EFI64_HEADER_SIZE,
-      .pe_target = GRUB_PE32_MACHINE_IA64,
-      .elf_target = EM_IA_64,
-    },
     {
       .dirname = "mips-arc",
       .names = {"mips-arc", NULL},
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]