Proposal: EFI boot stub configuration file

From: Shea Levy
Date: Fri Mar 16 2012 - 17:25:52 EST


Hello,

In some EFI boot environments (e.g. booting from an external medium or non-standard systems where tools like efibootmgr don't work), it is currently impossible to pass the right arguments to the kernel unless an EFI shell is launched. To ameliorate this, I propose that if image->load_options_size is 0 (indicating no arguments were passed) AND image->parent_handle is NULL (indicating that the image was loaded automatically by the firmware), then the kernel looks for a file in some fixed, possibly configurable place (e.g. \efi\linux\params), sets image->load_options_size to its size, and sets image->load_options to its contents. On any error whatsoever (finding the file, reading it, getting its size, whatever), any allocated memory would be freed and load_options_size would be set back to 0. Since the arguments are already converted to ASCII and parsed during the boot process, the file would be expected to be in UCS-2 format and no validation would be done in the configuration loading code. I'll write something up over the next week or so and submit it as an RFC patch series, but I thought I'd post this here first in case anyone has immediate feedback based on this description.

Cheers,
Shea Levy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/