lkml.org 
[lkml]   [2003]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject[RFC][PATCH] EFI support for ia32 kernel
Date
From
Hi,

Attached is a patch against 2.6.0-test1 that enables Extensible Firmware Interface (EFI) awareness in ia32 Linux kernels. Below is some background and pointers to further information regarding EFI. I would appreciate any and all suggestions and/or comments on the changes. Further, for those attending OLS next week, I would be more than happy to discuss any of the details of this patch and/or EFI.

-- What is EFI?
EFI is a consistent interface that standardizes the services of platform firmware. EFI has been included in ia64 platforms for several years, and will soon be included on ia32 platforms. More information, including the EFI specification and various papers and presentations relating to EFI can be found at http://developer.intel.com/technology/efi.

-- What does this patch do?
This patch enables kernel initialization using platform configuration information gleaned from EFI - details that have been traditionally obtained from legacy BIOS. Instead of BIOS (INT) calls performed during initial kernel setup, platform hardware details are obtained from EFI by the loader and passed to the kernel. For example, the EFI memory map provides a snapshot of system memory (including ranges, types, attributes, etc.) obtained by the loader in pre-boot space. Use of the EFI memory map alleviates the need for the INT 15h BIOS call to get the e820h memory map.

Most of the changes to the kernel center around inclusion of EFI data structure parsing in the early kernel initialization. Several files have been added to support EFI, several of which have been leveraged from ia64. The change set includes:

arch/i386/Kconfig | 10
arch/i386/kernel/Makefile | 3
arch/i386/kernel/acpi/boot.c | 28 +
arch/i386/kernel/efi.c | 613 +++++++++++++++++++++++++++++++++++++++++++
arch/i386/kernel/efi_stub.S | 125 ++++++++
arch/i386/kernel/efivars.c | 442 +++++++++++++++++++++++++++++++
arch/i386/kernel/reboot.c | 29 +-
arch/i386/kernel/setup.c | 338 +++++++++++++++--------
arch/i386/kernel/time.c | 60 ++++
drivers/acpi/Kconfig | 10
drivers/acpi/osl.c | 1
fs/proc/proc_misc.c | 22 +
include/asm-i386/setup.h | 28 +
include/linux/efi.h | 94 ++++--
init/main.c | 3
15 files changed, 1635 insertions(+), 171 deletions(-)
Note, this patch enables one to use the same kernel on systems with either legacy BIOS or EFI. This capability is provided via a mechanism that determines whether the kernel was booted from EFI, based on the presence of efi boot parameters passed by ELILO. If the efi boot parameters are present, then the global flag "efi_enabled" is initialized, which determines the code path during early initialization. Therefore, the addition of the EFI enabling code path does not affect the current initialization code path, but extends it. This mechanism also accounts for the size of this patch, as many of the changes involve indentation differences based on checks of the efi_enabled global.

--What's next?
+ code cleanups - I still need to adjust printks and I'm sure there are coding style issues in this patch.
+ incorporation of suggestions/comments
+ testing on EFI system w/ >4GB system memory
+ move EFI variable support to a platform independent driver directory?
+ 2.4 port - I will also send out a 2.4 patch that enables equivalent support.

Comments? Suggestions?

thanks,
matt

[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 13:46    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site