efi: Add firmware version information to sysfs
This adds the EFI Spec version from the system table to sysfs as
/sys/firmware/efi/spec_version .
Userland tools need this information in order to work around
specification deficiencies in 2.4 and earlier firmwares. Specifically,
UEFI 2.4 and 2.5+ treat management of BootOrder very differently (See
UEFI 2.4 section 3.1.1 vs UEFI 2.5 section 3.1), which means on older
firmware we'll want to work around BDS's boot order management by adding
fwupdate entries to BootOrder. We'd prefer not to do this on newer
firmware, as it is both non-sensical in terms of what it expresses, and
it results in more relatively failure prone flash writes.
Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
2 files changed