Skip to contentSkip to conversation

x86_64 EFI runtime service support: remove duplicated code from efi_32.c

PATCH In review Huang, Ying 1 participant 1 message Nov 26, 2007 x86

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 x86_64 EFI runtime service support: remove duplicated code from efi_32.c

This patch removes the duplicated code between efi_32.c and efi.c.

---
 arch/x86/kernel/Makefile_32 |    2 
 arch/x86/kernel/e820_32.c   |    5 
 arch/x86/kernel/efi_32.c    |  430 --------------------------------------------
 arch/x86/kernel/setup_32.c  |   11 -
 include/asm-x86/efi.h       |   42 ++++
 5 files changed, 47 insertions(+), 443 deletions(-)
arch/x86/kernel/Makefile_32 +1 -1
@@ -35,7 +35,7 @@ obj-$(CONFIG_KPROBES)		+= kprobes_32.o
 obj-$(CONFIG_MODULES)		+= module_32.o
 obj-y				+= sysenter_32.o vsyscall_32.o
 obj-$(CONFIG_ACPI_SRAT) 	+= srat_32.o
-obj-$(CONFIG_EFI) 		+= efi_32.o efi_stub_32.o
+obj-$(CONFIG_EFI) 		+= efi.o efi_32.o efi_stub_32.o
 obj-$(CONFIG_DOUBLEFAULT) 	+= doublefault_32.o
 obj-$(CONFIG_VM86)		+= vm86_32.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
arch/x86/kernel/efi_32.c +2 -428

471 lines not on this page · raw message

arch/x86/kernel/e820_32.c +0 -5
@@ -17,11 +17,6 @@
 #include <asm/e820.h>
 #include <asm/setup.h>
 
-#ifdef CONFIG_EFI
-int efi_enabled = 0;
-EXPORT_SYMBOL(efi_enabled);
-#endif
-
 struct e820map e820;
 struct change_member {
 	struct e820entry *pbios; /* pointer to original bios entry */
include/asm-x86/efi.h +42 -0

48 lines not on this page · raw message

arch/x86/kernel/setup_32.c +2 -9
@@ -621,16 +621,9 @@ void __init setup_arch(char **cmdline_p)
 	pre_setup_arch_hook();
 	early_cpu_init();
 
-	/*
-	 * FIXME: This isn't an official loader_type right
-	 * now but does currently work with elilo.
-	 * If we were configured as an EFI kernel, check to make
-	 * sure that we were loaded correctly from elilo and that
-	 * the system table is valid.  If not, then initialize normally.
-	 */
 #ifdef CONFIG_EFI
-	if ((boot_params.hdr.type_of_loader == 0x50) &&
-	    boot_params.efi_info.efi_systab)
+	if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature,
+		     "EL32", 4))
 		efi_enabled = 1;
 #endif