]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Fix compilation on x86_64-efi
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 27 Nov 2009 09:57:52 +0000 (10:57 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 27 Nov 2009 09:57:52 +0000 (10:57 +0100)
conf/x86_64-efi.rmk
include/grub/x86_64/relocator.h [new file with mode: 0644]
lib/relocator.c

index 726bf23fad03a44acfc55072ee9bb1af5ca1e609..25c379c98a028c2e134ea640fded5782766ea89f 100644 (file)
@@ -166,4 +166,10 @@ xnu_mod_CFLAGS = $(COMMON_CFLAGS)
 xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
 xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
 
+pkglib_MODULES += relocator.mod
+relocator_mod_SOURCES = lib/i386/relocator.c lib/i386/relocator_asm.S lib/i386/relocator_backward.S
+relocator_mod_CFLAGS = $(COMMON_CFLAGS)
+relocator_mod_ASFLAGS = $(COMMON_ASFLAGS)
+relocator_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
 include $(srcdir)/conf/common.mk
diff --git a/include/grub/x86_64/relocator.h b/include/grub/x86_64/relocator.h
new file mode 100644 (file)
index 0000000..247e7a1
--- /dev/null
@@ -0,0 +1 @@
+#include <grub/i386/relocator.h>
index d4bfebc8ead9b44da89d28a74c8ec6f9b8395e33..557fd4f632c4283f7857b13ef216a62c7585f16b 100644 (file)
@@ -73,8 +73,8 @@ PREFIX (boot) (void *relocator, grub_uint32_t dest,
   size = *(grub_size_t *) playground;
 
   grub_dprintf ("relocator",
-               "Relocator: source: %p, destination: 0x%x, size: 0x%x\n",
-               relocator, dest, size);
+               "Relocator: source: %p, destination: 0x%x, size: 0x%lx\n",
+               relocator, (unsigned) dest, (unsigned long) size);
 
   /* Very unlikely condition: Relocator may risk overwrite itself.
      Just move it a bit up.  */
@@ -103,10 +103,11 @@ PREFIX (boot) (void *relocator, grub_uint32_t dest,
                  RELOCATOR_ALIGN);
       grub_dprintf ("relocator",
                    "Backward relocator: code %p, source: %p, "
-                   "destination: 0x%x, size: 0x%x\n",
+                   "destination: 0x%x, size: 0x%lx\n",
                    (char *) relocator - overhead,
                    (char *) relocator - overhead, 
-                   dest - overhead, size + overhead);
+                   (unsigned) dest - overhead,
+                   (unsigned long) size + overhead);
 
       write_call_relocator_bw ((char *) relocator - overhead,
                               (char *) relocator - overhead,
@@ -120,10 +121,11 @@ PREFIX (boot) (void *relocator, grub_uint32_t dest,
        + RELOCATOR_SIZEOF (forward) - (dest + size);
       grub_dprintf ("relocator",
                    "Forward relocator: code %p, source: %p, "
-                   "destination: 0x%x, size: 0x%x\n",
+                   "destination: 0x%x, size: 0x%lx\n",
                    (char *) relocator + size + overhead
                    - RELOCATOR_SIZEOF (forward),
-                   relocator, dest, size + overhead);
+                   relocator, (unsigned) dest,
+                   (unsigned long) size + overhead);
 
       write_call_relocator_fw ((char *) relocator + size + overhead
                               - RELOCATOR_SIZEOF (forward),