From: "memristor2 via groups.io" <memristor2=proton.me@groups.io>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: [edk2-devel] Linux kernel Hangs after exit_boot_services using UEFIPayload
Date: Mon, 10 Mar 2025 12:10:56 +0000 [thread overview]
Message-ID: <5jPyovwff4cMAhNsSZmatExVLEEx6fvyVCk8ezjIPg9wLuUXawAUmVhUCUDfBoogk5CpLLLbq7Na5Att3kvZOkfmu392qocNwDIaofxE5mE=@proton.me> (raw)
[-- Attachment #1: Type: text/plain, Size: 2529 bytes --]
Hello everyone,
This problem is something I have had struggling with for a while now.
The issue is that I built coreboot with and UEFIPayload/UniversalPayload eveything goes fine but when I try to boot Ubuntu the kernel simply hangs after exit_boot_services even though it returns with success. Windows didn't boot either but turning off the debug macros seemed to fix the issue and windows boots now, even though it has a more complicated process in booting after ExitBootServices since it calls RunTimeServices. I checked the kernel's code (using linux-5.19.1) every thing seems to be fine but somehow after the address of startup_32 is returned and called to, the system hangs.
This is part of the efi_main code inside the kernel:
status = efi_load_initrd(image, &addr, &size, hdr->initrd_addr_max,
ULONG_MAX);
if (status != EFI_SUCCESS)
gotofail;
if (size > 0) {
efi_set_u64_split(addr, &hdr->ramdisk_image,
&boot_params->ext_ramdisk_image);
efi_set_u64_split(size, &hdr->ramdisk_size,
&boot_params->ext_ramdisk_size);
}
/*
* If the boot loader gave us a value for secure_boot then we use that,
* otherwise we ask the BIOS.
*/
if (boot_params->secure_boot == efi_secureboot_mode_unset)
boot_params->secure_boot = efi_get_secureboot();
/* Ask the firmware to clear memory on unclean shutdown */
efi_enable_reset_attack_mitigation();
efi_random_get_seed();
efi_retrieve_tpm2_eventlog();
setup_graphics(boot_params);
setup_efi_pci(boot_params);
setup_quirks(boot_params, bzimage_addr, buffer_end - buffer_start);
status = exit_boot(boot_params, handle);
if (status != EFI_SUCCESS) {
efi_err("exit_boot() failed!\n");
gotofail;
}
returnbzimage_addr;
All of the routines before returning bzimage_addr returns successfully but nothing happens after this.
Could this be MemoryMap and adress relocation related?
I don't even know if this is an EDK2 issue or should I change a configuration in coreboot (I highly doubt it being the second one. That's why I am emailing here).
I should also add that RngDxe and Tpm2Dxe are not loaded but i don't think that would be the cause.
Any help is appreciated.
Sent with [Proton Mail](https://proton.me/mail/home) secure email.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121165): https://edk2.groups.io/g/devel/message/121165
Mute This Topic: https://groups.io/mt/111617309/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 8930 bytes --]
next reply other threads:[~2025-03-10 12:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 12:10 memristor2 via groups.io [this message]
2025-03-10 12:39 ` [edk2-devel] Linux kernel Hangs after exit_boot_services using UEFIPayload Ajan
2025-03-10 12:57 ` memristor2 via groups.io
2025-03-10 13:11 ` Ajan
2025-03-10 13:29 ` memristor2 via groups.io
2025-03-10 13:30 ` memristor2 via groups.io
2025-03-10 13:38 ` Ajan
2025-03-10 13:53 ` memristor2 via groups.io
[not found] ` <182B756C71707289.31525@groups.io>
2025-03-12 10:05 ` memristor2 via groups.io
2025-03-12 13:44 ` Ajan
2025-03-12 13:46 ` memristor2 via groups.io
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='5jPyovwff4cMAhNsSZmatExVLEEx6fvyVCk8ezjIPg9wLuUXawAUmVhUCUDfBoogk5CpLLLbq7Na5Att3kvZOkfmu392qocNwDIaofxE5mE=@proton.me' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox