aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-12-29 05:42:34 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2003-12-29 05:42:34 -0800
commitc596442acc26c3195a69ff63a3f8e6bb12ac4a7d (patch)
treeb5a7a1d42fbcd0959251e2a8b2571d761b519dad /init
parentf036d4ea5fa7757f833ccc098e6e7cfa4d6c446f (diff)
downloadhistory-c596442acc26c3195a69ff63a3f8e6bb12ac4a7d.tar.gz
[PATCH] EFI support for ia32
From: Matt Tolentino <metolent@snoqualmie.dp.intel.com> Attached is a patch that enables EFI boot-up support in ia32 kernels. In order to continue to determine whether the kernel should initialize using EFI tables, I've temporarily added a check on the LOADER_TYPE boot parameter. Although I haven't requested that elilo be assigned an id for this yet, I've used this to determine whether the kernel should use the EFI initialization path as well as a check to see if the EFI_SYSTAB boot parameter contains anything. If someone has a better suggestion for determining this, I'm open... This patch also uses the existing ioremapping functions to map the efi tables into kernel virtual address space. I've added an option such that I could use Dave Hansen's boot_ioremap() before paging_init(). After paging_init, I then remap the efi memmap using bt_ioremap for use later. This has eliminated the need for several functions...thanks for the suggestions and thanks for your help Dave. Still this could use a look-see.
Diffstat (limited to 'init')
-rw-r--r--init/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 610c7767e01340..8fee009060dc2a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -38,6 +38,7 @@
#include <linux/moduleparam.h>
#include <linux/writeback.h>
#include <linux/cpu.h>
+#include <linux/efi.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -443,6 +444,10 @@ asmlinkage void __init start_kernel(void)
pidmap_init();
pgtable_cache_init();
pte_chain_init();
+#ifdef CONFIG_X86
+ if (efi_enabled)
+ efi_enter_virtual_mode();
+#endif
fork_init(num_physpages);
proc_caches_init();
buffer_init();