]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/commands/acpi.c: Use grub_addr_t rather than long when
authorVladimir Serbinenko <phcoder@gmail.com>
Sun, 15 Dec 2013 13:27:04 +0000 (14:27 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sun, 15 Dec 2013 13:27:04 +0000 (14:27 +0100)
appropriate.

ChangeLog
grub-core/commands/acpi.c

index 43076ddd4f90c6bd1e0da8037c9807268f3554f6..136a78bb59d4047c59f77c37d85125077c8e0f4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-15  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/commands/acpi.c: Use grub_addr_t rather than long when
+       appropriate.
+
 2013-12-15  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/kern/i386/coreboot/cbtable.c: Use char * arithmetic rather
index 14f639c6dd0750c3a01bd3c56cb2fd139ed5b48e..97c2cf282f94736aa3c3da4fd7c23b51db9bb678 100644 (file)
@@ -227,7 +227,7 @@ grub_acpi_create_ebda (void)
            grub_dprintf ("acpi", "Copying rsdpv2 to %p\n", target);
            v2inebda = target;
            target += v2->length;
-           target = (grub_uint8_t *) ((((long) target - 1) | 0xf) + 1);
+           target = (grub_uint8_t *) ((((grub_addr_t) target - 1) | 0xf) + 1);
            v2 = 0;
            break;
          }
@@ -246,7 +246,7 @@ grub_acpi_create_ebda (void)
            grub_dprintf ("acpi", "Copying rsdpv1 to %p\n", target);
            v1inebda = target;
            target += sizeof (struct grub_acpi_rsdp_v10);
-           target = (grub_uint8_t *) ((((long) target - 1) | 0xf) + 1);
+           target = (grub_uint8_t *) ((((grub_addr_t) target - 1) | 0xf) + 1);
            v1 = 0;
            break;
          }
@@ -265,7 +265,7 @@ grub_acpi_create_ebda (void)
            grub_memcpy (target, v2, v2->length);
            v2inebda = target;
            target += v2->length;
-           target = (grub_uint8_t *) ((((long) target - 1) | 0xf) + 1);
+           target = (grub_uint8_t *) ((((grub_addr_t) target - 1) | 0xf) + 1);
            v2 = 0;
            break;
          }
@@ -282,7 +282,7 @@ grub_acpi_create_ebda (void)
            grub_memcpy (target, v1, sizeof (struct grub_acpi_rsdp_v10));
            v1inebda = target;
            target += sizeof (struct grub_acpi_rsdp_v10);
-           target = (grub_uint8_t *) ((((long) target - 1) | 0xf) + 1);
+           target = (grub_uint8_t *) ((((grub_addr_t) target - 1) | 0xf) + 1);
            v1 = 0;
            break;
          }
@@ -306,7 +306,7 @@ grub_acpi_create_ebda (void)
       *target = 0;
 
   grub_dprintf ("acpi", "Switching EBDA\n");
-  (*((grub_uint16_t *) 0x40e)) = ((long)targetebda) >> 4;
+  (*((grub_uint16_t *) 0x40e)) = ((grub_addr_t) targetebda) >> 4;
   grub_dprintf ("acpi", "EBDA switched\n");
 
   return GRUB_ERR_NONE;