diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-09-21 19:33:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-09-23 17:24:10 +0200 |
commit | 94b81afb08e35b44cb15479a0122e4f3c2c88235 (patch) | |
tree | 50a8b195a4ed340c8d1a2e8551d3bf2b746c62ad /src/boot/efi/stub.c | |
parent | 5a186322a17ab3b9730d89cf00b08a1820e7679a (diff) | |
download | systemd-94b81afb08e35b44cb15479a0122e4f3c2c88235.tar.gz |
stub: show splash screen earlier
let's move showing of the splash screen to the earliest place we know
the splash bmp address. After all a splash screen is all about showing
as early as we can. This matters as doing TPM stuff or packing up a
large cpio might take time.
While we are at it, move the conditionalization of the splash screen
into the function instead of doing it ahead of calling it. This should
encapsulate things more nicely.
Diffstat (limited to 'src/boot/efi/stub.c')
-rw-r--r-- | src/boot/efi/stub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c index f8f3e3662f..23f558c885 100644 --- a/src/boot/efi/stub.c +++ b/src/boot/efi/stub.c @@ -172,6 +172,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { if (EFI_ERROR(err)) return log_error_status_stall(err, L"Unable to locate embedded .linux section: %r", err); + /* Show splash screen as early as possible */ + graphics_splash((UINT8*) loaded_image->ImageBase + addrs[SECTION_SPLASH], szs[SECTION_SPLASH], NULL); + if (szs[SECTION_CMDLINE] > 0) { cmdline = (CHAR8*) loaded_image->ImageBase + addrs[SECTION_CMDLINE]; cmdline_len = szs[SECTION_CMDLINE]; @@ -201,9 +204,6 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { export_variables(loaded_image); - if (szs[SECTION_SPLASH] > 0) - graphics_splash((UINT8*) (UINTN) loaded_image->ImageBase + addrs[SECTION_SPLASH], szs[SECTION_SPLASH], NULL); - (VOID) pack_cpio(loaded_image, L".cred", (const CHAR8*) ".extra/credentials", |