nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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