dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0014-arm64-set-correct-length-of-device-path-end-entry.patch

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
39700a
From: Leif Lindholm <leif.lindholm@linaro.org>
39700a
Date: Tue, 7 Jan 2014 17:52:50 +0000
28f7f8
Subject: [PATCH] arm64: set correct length of device path end entry
39700a
39700a
The length of the Device Path End entry in the grub_linux_boot()
39700a
function was incorrectly set to 0. This triggers an assert failure
39700a
in debug builds of Tianocore.
39700a
39700a
Set it to sizeof (grub_efi_device_path_t).
39700a
---
39700a
 grub-core/loader/arm64/linux.c | 2 +-
28f7f8
 ChangeLog                      | 4 ++++
39700a
 2 files changed, 5 insertions(+), 1 deletion(-)
39700a
39700a
diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
28f7f8
index 9d15aad625e..75ad871a81c 100644
39700a
--- a/grub-core/loader/arm64/linux.c
39700a
+++ b/grub-core/loader/arm64/linux.c
39700a
@@ -268,7 +268,7 @@ grub_linux_boot (void)
39700a
 
39700a
   mempath[1].header.type = GRUB_EFI_END_DEVICE_PATH_TYPE;
39700a
   mempath[1].header.subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
39700a
-  mempath[1].header.length = 0;
39700a
+  mempath[1].header.length = sizeof (grub_efi_device_path_t);
39700a
 
39700a
   b = grub_efi_system_table->boot_services;
39700a
   status = b->load_image (0, grub_efi_image_handle,
28f7f8
diff --git a/ChangeLog b/ChangeLog
28f7f8
index 0b9fa05b2a0..4ec5517bded 100644
28f7f8
--- a/ChangeLog
28f7f8
+++ b/ChangeLog
28f7f8
@@ -1,3 +1,7 @@
28f7f8
+2014-01-07  Leif Lindholm <leif.lindholm@linaro.org>
28f7f8
+
28f7f8
+	* grub-core/loader/arm64/linux.c: correctly set device path end length.
28f7f8
+
28f7f8
 2014-01-07  Andrey Borzenkov <arvidjaar@gmail.com>
28f7f8
 
28f7f8
 	* util/grub-install.c: Use bootaa64.efi instead of bootaarch64.efi on