|
|
a5bd9f6 |
From ec6a8c449294b215a2c4019f42110a0c1f770ac2 Mon Sep 17 00:00:00 2001
|
|
|
a5bd9f6 |
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
|
|
a5bd9f6 |
Date: Mon, 2 Jul 2012 11:14:37 +0200
|
|
|
a5bd9f6 |
Subject: [PATCH 003/364] * grub-core/loader/i386/linux.c
|
|
|
a5bd9f6 |
(find_efi_mmap_size): Don't decrease efi_mmap_size. Reported by: Stuart
|
|
|
a5bd9f6 |
Hayes.
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
---
|
|
|
a5bd9f6 |
ChangeLog | 6 ++++++
|
|
|
a5bd9f6 |
grub-core/loader/i386/linux.c | 7 +++++--
|
|
|
a5bd9f6 |
2 files changed, 11 insertions(+), 2 deletions(-)
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
diff --git a/ChangeLog b/ChangeLog
|
|
|
a5bd9f6 |
index f6e864a..53ad372 100644
|
|
|
a5bd9f6 |
--- a/ChangeLog
|
|
|
a5bd9f6 |
+++ b/ChangeLog
|
|
|
a5bd9f6 |
@@ -1,3 +1,9 @@
|
|
|
a5bd9f6 |
+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
a5bd9f6 |
+
|
|
|
a5bd9f6 |
+ * grub-core/loader/i386/linux.c (find_efi_mmap_size): Don't decrease
|
|
|
a5bd9f6 |
+ efi_mmap_size.
|
|
|
a5bd9f6 |
+ Reported by: Stuart Hayes.
|
|
|
a5bd9f6 |
+
|
|
|
a5bd9f6 |
2012-06-28 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
Add monochrome text support (mda_text, aka `hercules' in grub-legacy).
|
|
|
a5bd9f6 |
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
|
|
|
a5bd9f6 |
index 62087cf..d34b2f8 100644
|
|
|
a5bd9f6 |
--- a/grub-core/loader/i386/linux.c
|
|
|
a5bd9f6 |
+++ b/grub-core/loader/i386/linux.c
|
|
|
a5bd9f6 |
@@ -118,12 +118,13 @@ find_efi_mmap_size (void)
|
|
|
a5bd9f6 |
int ret;
|
|
|
a5bd9f6 |
grub_efi_memory_descriptor_t *mmap;
|
|
|
a5bd9f6 |
grub_efi_uintn_t desc_size;
|
|
|
a5bd9f6 |
+ grub_efi_uintn_t cur_mmap_size = mmap_size;
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
- mmap = grub_malloc (mmap_size);
|
|
|
a5bd9f6 |
+ mmap = grub_malloc (cur_mmap_size);
|
|
|
a5bd9f6 |
if (! mmap)
|
|
|
a5bd9f6 |
return 0;
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
- ret = grub_efi_get_memory_map (&mmap_size, mmap, 0, &desc_size, 0);
|
|
|
a5bd9f6 |
+ ret = grub_efi_get_memory_map (&cur_mmap_size, mmap, 0, &desc_size, 0);
|
|
|
a5bd9f6 |
grub_free (mmap);
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
if (ret < 0)
|
|
|
a5bd9f6 |
@@ -134,6 +135,8 @@ find_efi_mmap_size (void)
|
|
|
a5bd9f6 |
else if (ret > 0)
|
|
|
a5bd9f6 |
break;
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
+ if (mmap_size < cur_mmap_size)
|
|
|
a5bd9f6 |
+ mmap_size = cur_mmap_size;
|
|
|
a5bd9f6 |
mmap_size += (1 << 12);
|
|
|
a5bd9f6 |
}
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
--
|
|
|
a5bd9f6 |
1.8.1.4
|
|
|
a5bd9f6 |
|