[systemd-devel] Contrary to documentation, LoaderFeatures efi variable is 96bit, not 64bit
Lennart Poettering
lennart at poettering.net
Sat Feb 25 12:49:39 UTC 2023
On Sa, 25.02.23 11:48, u34 at net9.ga (u34 at net9.ga) wrote:
> This looks to me a straight forward github issue. I am not sure where, at
> github, it should be filed.
>
> Quoting https://systemd.io/BOOT_LOADER_INTERFACE/ , with lines break for
> readability
>
> The EFI variable LoaderFeatures contains a 64bit unsigned integer with
> a number of flags bits that are set by the boot loader and passed to
> the OS and indicate the features the boot loader supports. Specifically,
> the following bits are defined:
>
> * 1 >> 0 -> The bbot loadere honours LoaderConfigTimeout when set
> * 1 >> 1 -> ...
> * ...
>
> Here,
>
> $ od -t x1 /sys/firmware/efi/efivars/LoaderFeatures-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
> 0000000 06 00 00 00 ff 07 00 00 00 00 00 00
> 0000014
>
> Which is 14(octal)*8 = 96bit. As a result, it could be the shifting from
> the quote above, 1 >> 0, 1 >> 1, and so on, are also wrong. And perhaps
> it worth adding to the documentation that
See the docs for efivarfs:
https://www.kernel.org/doc/html/next/filesystems/efivarfs.html
The pink box explains where extra 4 bytes come from.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list