]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Don't use post-4G memory on EFI even if 64-bit since some non-compliant
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 10 Jan 2011 22:51:10 +0000 (23:51 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 10 Jan 2011 22:51:10 +0000 (23:51 +0100)
implementations bug on them.

* grub-core/kern/efi/mm.c (grub_efi_allocate_pages): Skip post-4G
memory.
(filter_memory_map): Likewise.

ChangeLog
grub-core/kern/efi/mm.c

index 5ef4b1c954b7d274e0c45511e969181ffd8579f7..0b9b9b6aa220219cfcf716c7fc380989181195c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-01-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Don't use post-4G memory on EFI even if 64-bit since some non-compliant
+       implementations bug on them.
+
+       * grub-core/kern/efi/mm.c (grub_efi_allocate_pages): Skip post-4G
+       memory.
+       (filter_memory_map): Likewise.
+
 2011-01-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * util/grub-kbdcomp.in: Add missing prefix and exec_prefix variables.
index a715da07637056349b036a0cdf6c90fd5ae06b6a..8b9e6ec25043016793209bfb08d46589d094a002 100644 (file)
@@ -52,13 +52,13 @@ grub_efi_allocate_pages (grub_efi_physical_address_t address,
   grub_efi_status_t status;
   grub_efi_boot_services_t *b;
 
-#if GRUB_TARGET_SIZEOF_VOID_P < 8
+#if 1
   /* Limit the memory access to less than 4GB for 32-bit platforms.  */
   if (address > 0xffffffff)
     return 0;
 #endif
 
-#if GRUB_TARGET_SIZEOF_VOID_P < 8 || defined (MCMODEL_SMALL)
+#if 1
   if (address == 0)
     {
       type = GRUB_EFI_ALLOCATE_MAX_ADDRESS;
@@ -251,7 +251,7 @@ filter_memory_map (grub_efi_memory_descriptor_t *memory_map,
        desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size))
     {
       if (desc->type == GRUB_EFI_CONVENTIONAL_MEMORY
-#if GRUB_TARGET_SIZEOF_VOID_P < 8 || defined (MCMODEL_SMALL)
+#if 1
          && desc->physical_start <= 0xffffffff
 #endif
          && desc->physical_start + PAGES_TO_BYTES (desc->num_pages) > 0x100000
@@ -267,7 +267,7 @@ filter_memory_map (grub_efi_memory_descriptor_t *memory_map,
              desc->physical_start = 0x100000;
            }
 
-#if GRUB_TARGET_SIZEOF_VOID_P < 8 || defined (MCMODEL_SMALL)
+#if 1
          if (BYTES_TO_PAGES (filtered_desc->physical_start)
              + filtered_desc->num_pages
              > BYTES_TO_PAGES (0x100000000LL))