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