summaryrefslogtreecommitdiffstats
path: root/master/debian/efi_disk_cache.patch
diff options
context:
space:
mode:
Diffstat (limited to 'master/debian/efi_disk_cache.patch')
-rw-r--r--master/debian/efi_disk_cache.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/master/debian/efi_disk_cache.patch b/master/debian/efi_disk_cache.patch
new file mode 100644
index 0000000..478e144
--- /dev/null
+++ b/master/debian/efi_disk_cache.patch
@@ -0,0 +1,26 @@
+Description: Bump the values of GRUB_DISK_CACHE_SIZE and GRUB_DISK_CACHE_BITS
+ on EFI systems (and only on EFI sytems) to dramatically reduce the load times
+ for vmlinux and initrd. Forwarding this isn't required as upstream trunk
+ has completely rewritten how this all works.
+Author: Adam Conrad <adconrad@debian.org>
+Origin: other, http://blog.fpmurphy.com/2010/03/grub2-efi-support.html
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/944347
+Forwarded: not-needed
+Last-Update: 2012-03-05
+
+Index: b/include/grub/disk.h
+===================================================================
+--- a/include/grub/disk.h
++++ b/include/grub/disk.h
+@@ -137,7 +137,11 @@
+
+ /* The size of a disk cache in 512B units. Must be at least as big as the
+ largest supported sector size, currently 16K. */
++#ifdef GRUB_MACHINE_EFI
++#define GRUB_DISK_CACHE_BITS 10
++#else
+ #define GRUB_DISK_CACHE_BITS 6
++#endif
+ #define GRUB_DISK_CACHE_SIZE (1 << GRUB_DISK_CACHE_BITS)
+
+ /* Return value of grub_disk_get_size() in case disk size is unknown. */