From 0c73ab25d3f31ae4c3766f93bfdbf41b94fe49cc Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Thu, 25 Oct 2012 10:09:16 -0400
Subject: [PATCH] efi: Add patch to fix 32bit EFI service mapping (rhbz 726701)

1/1 [
Author: Tom Zanussi
Email: tom.zanussi@intel.com
Subject: efi: Add patch to fix 32bit EFI service mapping (rhbz 726701)
Date: Thu, 25 Oct 2012 01:26:54 -0700

From fedora kernel:

 commit 6f3e186bc7721c5b24ad90d4a751cccfccd445e6
 Author: Josh Boyer <jwboyer@redhat.com>
 Date:   Fri Aug 5 08:47:23 2011 -0400

    Add patch to fix 32bit EFI service mapping (rhbz 726701)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
]

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 patches/boot/boot.scc                         |  1 +
 ...-fix-32bit-EFI-service-mapping-rhbz-.patch | 45 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 patches/boot/efi-Add-patch-to-fix-32bit-EFI-service-mapping-rhbz-.patch

diff --git a/patches/boot/boot.scc b/patches/boot/boot.scc
index c7ec6d59d..7f73fc112 100644
--- a/patches/boot/boot.scc
+++ b/patches/boot/boot.scc
@@ -3,3 +3,4 @@ patch mount_root-clarify-error-messages-for-when-no-rootfs.patch
 patch check-console-device-file-on-fs-when-booting.patch
 patch nfs-Allow-default-io-size-to-be-configured.patch
 patch powerpc-boot-remove-Os-from-BOOTFLAGS.patch
+patch efi-Add-patch-to-fix-32bit-EFI-service-mapping-rhbz-.patch
diff --git a/patches/boot/efi-Add-patch-to-fix-32bit-EFI-service-mapping-rhbz-.patch b/patches/boot/efi-Add-patch-to-fix-32bit-EFI-service-mapping-rhbz-.patch
new file mode 100644
index 000000000..973ad2da4
--- /dev/null
+++ b/patches/boot/efi-Add-patch-to-fix-32bit-EFI-service-mapping-rhbz-.patch
@@ -0,0 +1,45 @@
+From 218bd8d2022b9852c60d32f0d770931e3cf343e2 Mon Sep 17 00:00:00 2001
+From: Tom Zanussi <tom.zanussi@intel.com>
+Date: Thu, 25 Oct 2012 01:26:54 -0700
+Subject: [PATCH] efi: Add patch to fix 32bit EFI service mapping (rhbz
+ 726701)
+
+From fedora kernel:
+
+ commit 6f3e186bc7721c5b24ad90d4a751cccfccd445e6
+ Author: Josh Boyer <jwboyer@redhat.com>
+ Date:   Fri Aug 5 08:47:23 2011 -0400
+
+    Add patch to fix 32bit EFI service mapping (rhbz 726701)
+
+Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+---
+ arch/x86/platform/efi/efi.c |   11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
+index 92660eda..08d0e82 100644
+--- a/arch/x86/platform/efi/efi.c
++++ b/arch/x86/platform/efi/efi.c
+@@ -819,10 +819,13 @@ void __init efi_enter_virtual_mode(void)
+ 
+ 	for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
+ 		md = p;
+-		if (!(md->attribute & EFI_MEMORY_RUNTIME) &&
+-		    md->type != EFI_BOOT_SERVICES_CODE &&
+-		    md->type != EFI_BOOT_SERVICES_DATA)
+-			continue;
++		if (!(md->attribute & EFI_MEMORY_RUNTIME)) {
++#ifdef CONFIG_X86_64
++			if (md->type != EFI_BOOT_SERVICES_CODE &&
++			    md->type != EFI_BOOT_SERVICES_DATA)
++#endif
++				continue;
++		}
+ 
+ 		size = md->num_pages << EFI_PAGE_SHIFT;
+ 		end = md->phys_addr + size;
+-- 
+1.7.5.4
+
-- 
GitLab