[updated patch] for efi support in ia32 kernels

From: Tolentino, Matthew E
Date: Fri Oct 03 2003 - 16:48:01 EST


Attached is another patch that enables EFI boot-up support in ia32 kernels. This one has numerous changes based on the various comments and suggestions made on the last one several weeks ago. The patch is against 2.6.0-test6-mm2.

This patch departs from the last in that I am no longer adding separate boot parameters at the end of the the empty_zero_page; rather, based on Eric's suggestion, I've added EFI parameters via offset grouped with the rest of the existing boot parameters. This allows the reuse of several parameters which were redundant (command-line, initrd, etc.). This also simplifies some of the code in setup_arch().

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.

Something else that I'd like to solicit suggestions on is how to deal with CONFIG_ACPI_EFI. One of the goals of this patch is to enable the kernel to "just know" at boot time when to use EFI information to initialize. That way, the same kernel image would theoretically still boot on existing systems with a different BIOS. I think this patch accomplishes that goal to some degree, but how best to deal with when/when not to look at the EFI config table for the RSDP is still dealt with at compile time. I'd like to dynamically determine this as well, but am not sure of the best way...suggestions? Len? Andrew?

Note, I'm still working on verifying this works properly on a system with >4GB system memory, as well as with the 4G/4G split (hence the reason this is against the -mm kernel)...hopefully, I'll be able to steal some time on one of those monsters next week.

Comments and suggestions are welcome...

thanks,
matt










Attachment: linux-2.6.0-test6-mm2-efi.patch
Description: linux-2.6.0-test6-mm2-efi.patch