diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 35417bec0..64562fb23 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -3,7 +3,6 @@ * geninit.sh: Call _init with a null argument. * configure.ac: Add ia64-efi target. * Makefile.in (STRIP_FLAGS): Declare (overriden on ia64). - (RMKFILES): Add ia64-efi.rmk * genmk.rb: Use STRIP_FLAGS for strip. * util/ia64/efi/grub-install.in: New file. * util/ia64/efi/pe32.h: New file. diff --git a/Makefile.in b/Makefile.in index 134505d3c..5e8e07dbb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -83,8 +83,7 @@ enable_grub_emu = @enable_grub_emu@ ### General variables. -RMKFILES = $(addprefix conf/,common.rmk i386-pc.rmk powerpc-ieee1275.rmk \ - sparc64-ieee1275.rmk i386-efi.rmk ia64-efi.rmk) +RMKFILES = $(wildcard $(srcdir)/conf/*.rmk) MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES)) PKGLIB = $(pkglib_IMAGES) $(pkglib_MODULES) $(pkglib_PROGRAMS) \ @@ -98,13 +97,13 @@ MOSTLYCLEANFILES = DISTCLEANFILES = config.status config.cache config.log config.h \ Makefile stamp-h include/grub/cpu include/grub/machine \ gensymlist.sh genkernsyms.sh -MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES)) +MAINTAINER_CLEANFILES = $(srcdir)/configure $(MKFILES) # The default target. all: all-local ### Include an arch-specific Makefile. -$(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb +$(MKFILES): %.mk: %.rmk genmk.rb if test "x$(RUBY)" = x; then \ touch $@; \ else \ diff --git a/commands/efi/acpi.c b/commands/efi/acpi.c index ea9783f00..e65fa0702 100644 --- a/commands/efi/acpi.c +++ b/commands/efi/acpi.c @@ -1,4 +1,4 @@ -/* acpi.c - Display acpi. */ +/* acpi.c - Display acpi tables. */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2008 Free Software Foundation, Inc. @@ -23,20 +23,17 @@ static grub_uint32_t read16 (grub_uint8_t *p) { - return p[0] | (p[1] << 8); + return grub_le_to_cpu16 (*(grub_uint16_t *)p); } static grub_uint32_t read32 (grub_uint8_t *p) { - return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24); + return grub_le_to_cpu32 (*(grub_uint32_t *)p); } static grub_uint64_t read64 (grub_uint8_t *p) { - grub_uint32_t l, h; - l = read32(p); - h = read32(p + 4); - return l | (((grub_uint64_t)h) << 32); + return grub_le_to_cpu64 (*(grub_uint64_t *)p); } static void diff --git a/conf/ia64-efi.rmk b/conf/ia64-efi.rmk index ce72d14c0..d65fda6d5 100644 --- a/conf/ia64-efi.rmk +++ b/conf/ia64-efi.rmk @@ -20,6 +20,7 @@ pkgdata_DATA += kern/ia64/efi/elf_ia64_efi.lds # For grub-elf2pe grub_elf2pe_SOURCES = util/ia64/efi/elf2pe.c +grub_elf2pe_CFLAGS = -DELF2PE_IA64 # For grub-emu. grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ @@ -27,8 +28,12 @@ grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ commands/terminal.c commands/ls.c commands/test.c \ commands/search.c commands/blocklist.c \ disk/loopback.c \ - fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c \ - fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/hfsplus.c \ + \ + fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \ + fs/hfsplus.c fs/iso9660.c fs/jfs.c fs/minix.c \ + fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ + fs/ufs.c fs/xfs.c \ + \ io/gzio.c \ kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c \ normal/execute.c kern/file.c kern/fs.c normal/lexer.c \ diff --git a/config.h.in b/config.h.in index 1aef2123b..c22d5b12b 100644 --- a/config.h.in +++ b/config.h.in @@ -88,10 +88,10 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* The size of `long', as computed by sizeof. */ +/* The size of a `long', as computed by sizeof. */ #undef SIZEOF_LONG -/* The size of `void *', as computed by sizeof. */ +/* The size of a `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P /* Define it to either start or _start */ diff --git a/include/grub/ia64/efi/kernel.h b/include/grub/ia64/efi/kernel.h index c0549f41a..af1a35b51 100644 --- a/include/grub/ia64/efi/kernel.h +++ b/include/grub/ia64/efi/kernel.h @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2002,2003,2007 Free Software Foundation, Inc. + * Copyright (C) 2002,2003,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 diff --git a/include/grub/ia64/setjmp.h b/include/grub/ia64/setjmp.h index c3b2d3be7..7689a73dd 100644 --- a/include/grub/ia64/setjmp.h +++ b/include/grub/ia64/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2008 Free Software Foundation, Inc. Contributed by David Mosberger-Tang . The GNU C Library is free software; you can redistribute it and/or diff --git a/include/grub/ia64/time.h b/include/grub/ia64/time.h index 5db7ff4f1..03ee79fa4 100644 --- a/include/grub/ia64/time.h +++ b/include/grub/ia64/time.h @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2007 Free Software Foundation, Inc. + * 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 diff --git a/kern/ia64/trampoline.S b/kern/ia64/trampoline.S index 376b7bae0..e91991041 100644 --- a/kern/ia64/trampoline.S +++ b/kern/ia64/trampoline.S @@ -23,15 +23,15 @@ .proc __ia64_trampoline .global __ia64_trampoline __ia64_trampoline: - // Read address of the real descriptor + /* Read address of the real descriptor. */ ld8 r2=[r1],8 ;; - // Read chain + /* Read chain. */ ld8 r15=[r1] - // Read pc + /* Read pc. */ ld8 r3=[r2],8 ;; - // Read gp + /* Read gp. */ ld8 r1=[r2] mov b6=r3 br.many b6 diff --git a/loader/ia64/efi/linux.c b/loader/ia64/efi/linux.c index 04c4638f8..47f51c5da 100644 --- a/loader/ia64/efi/linux.c +++ b/loader/ia64/efi/linux.c @@ -39,14 +39,16 @@ #define BOOT_PARAM_SIZE 16384 -struct ia64_boot_param { +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 { + 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 */ @@ -61,7 +63,8 @@ struct ia64_boot_param { grub_uint64_t modules_nbr; }; -struct ia64_boot_module { +struct ia64_boot_module +{ grub_uint64_t mod_start; grub_uint64_t mod_end; @@ -71,7 +74,8 @@ struct ia64_boot_module { grub_uint64_t next; }; -typedef struct { +typedef struct +{ grub_uint32_t revision; grub_uint32_t reserved; void *fpswa; diff --git a/loader/ia64/efi/linux_normal.c b/loader/ia64/efi/linux_normal.c index 3a567b09f..ec18c4b9b 100644 --- a/loader/ia64/efi/linux_normal.c +++ b/loader/ia64/efi/linux_normal.c @@ -101,7 +101,7 @@ GRUB_MOD_FINI(linux_normal) { grub_unregister_command ("linux"); grub_unregister_command ("initrd"); - grub_unregister_command ("normal"); + grub_unregister_command ("module"); grub_unregister_command ("relocate"); grub_unregister_command ("fpswa"); } diff --git a/normal/ia64/longjmp.S b/normal/ia64/longjmp.S index 23dec8687..729bdc76e 100644 --- a/normal/ia64/longjmp.S +++ b/normal/ia64/longjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002, 2008 Free Software Foundation, Inc. Contributed by David Mosberger-Tang . The GNU C Library is free software; you can redistribute it and/or diff --git a/normal/ia64/setjmp.S b/normal/ia64/setjmp.S index 4bc2103b7..0851885c5 100644 --- a/normal/ia64/setjmp.S +++ b/normal/ia64/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002, 2008 Free Software Foundation, Inc. Contributed by David Mosberger-Tang . The GNU C Library is free software; you can redistribute it and/or diff --git a/util/ia64/efi/elf2pe.c b/util/ia64/efi/elf2pe.c index 23687fe68..2840e3337 100644 --- a/util/ia64/efi/elf2pe.c +++ b/util/ia64/efi/elf2pe.c @@ -23,12 +23,12 @@ #include #include -#if defined(i386) +#if defined(ELF2PE_I386) #define USE_ELF32 #define USE_PE32 #define ELF_MACHINE EM_386 #define EFI_MACHINE PE32_MACHINE_I386 -#elif defined(__ia64__) +#elif defined(ELF2PE_IA64) #define USE_ELF64 #define USE_PE32PLUS #define ELF_MACHINE EM_IA_64