]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Second version of the patch (sent to grub-devel in 2008-01-29)
authorRobert Millan <rmh@aybabtu.com>
Mon, 18 Jan 2010 14:24:17 +0000 (14:24 +0000)
committerRobert Millan <rmh@aybabtu.com>
Mon, 18 Jan 2010 14:24:17 +0000 (14:24 +0000)
14 files changed:
ChangeLog.ia64
Makefile.in
commands/efi/acpi.c
conf/ia64-efi.rmk
config.h.in
include/grub/ia64/efi/kernel.h
include/grub/ia64/setjmp.h
include/grub/ia64/time.h
kern/ia64/trampoline.S
loader/ia64/efi/linux.c
loader/ia64/efi/linux_normal.c
normal/ia64/longjmp.S
normal/ia64/setjmp.S
util/ia64/efi/elf2pe.c

index 35417bec02fbdfc3d23f01104bd3008ea2fea94c..64562fb233cafe50e6e8d3f2ece8197a3455de07 100644 (file)
@@ -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.
index 134505d3c611ff3db2ee997f6d75d5cb2f15a323..5e8e07dbb8513a3fb98aafb8a36aa6737cc41943 100644 (file)
@@ -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 \
index ea9783f005986cb2cb844c1bc95733a75ecb2d45..e65fa07023e23e066fbda3955508b78d85c483a6 100644 (file)
@@ -1,4 +1,4 @@
-/* acpi.c  - Display acpi.  */
+/* acpi.c  - Display acpi tables.  */
 /*
  *  GRUB  --  GRand Unified Bootloader
  *  Copyright (C) 2008  Free Software Foundation, Inc.
 
 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
index ce72d14c043a1dc9b8ce1fb6000742e929e230e9..d65fda6d5a8b666ea687feb3597bb36968954340 100644 (file)
@@ -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           \
index 1aef2123bb7d6849f3d69fae957ce39ff553ce24..c22d5b12b11796f7b4ef684e84bb2e6552c82ba8 100644 (file)
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* The size of `long', as computed by sizeof. */
+/* The size of `long', as computed by sizeof. */
 #undef SIZEOF_LONG
 
-/* The size of `void *', as computed by sizeof. */
+/* The size of `void *', as computed by sizeof. */
 #undef SIZEOF_VOID_P
 
 /* Define it to either start or _start */
index c0549f41a6fde47ecf9cc639d7420e7f5727342c..af1a35b51e43fb3de0eb23e169261354915249a6 100644 (file)
@@ -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
index c3b2d3be746d211fc80ffb52de30ae6288e8803a..7689a73dded4d0e19e37a05eb8ce820798fe6cb1 100644 (file)
@@ -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 <davidm@hpl.hp.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
index 5db7ff4f16da94880846c08b3229610878c85900..03ee79fa4e454dd2493e345b0b8e4f0b5414152f 100644 (file)
@@ -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
index 376b7bae0d2faad5365d506b867fe6b8c5190f8a..e91991041fdeb2ac930356e75522eb65014c3eab 100644 (file)
        .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
index 04c4638f818f3959b2c6d38e47ccdd8e408c9aa5..47f51c5da54e3c828fab392ed4f92172785447e6 100644 (file)
 
 #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;
index 3a567b09f8887bba8f296accbb4851988a7bad77..ec18c4b9bb96016b85e031b51e5b825cd73b0f61 100644 (file)
@@ -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");
 }
index 23dec8687bf97d5cf577d1290fc706650537e3b2..729bdc76e5032a2b3c781c792dca3bc7ae4bdea4 100644 (file)
@@ -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 <davidm@hpl.hp.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
index 4bc2103b79b8bc21e6f8e398b140b156335f5af8..0851885c53a4ba1f0db136a2d2eb113ac7886f63 100644 (file)
@@ -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 <davidm@hpl.hp.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
index 23687fe68ec90d84620672c5c88377ccb54ceab4..2840e33372c8f84f479d1052afbe459ff019db57 100644 (file)
 #include <time.h>
 #include <elf.h>
 
-#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