[GSoC - x86_64] Using FreeBSD's UEFI loader for RTEMS static binaries

Amaan Cheval amaan.cheval at gmail.com
Fri Jun 15 04:44:05 UTC 2018


You can't return to loader.efi from the kernel, from what I can tell.
loader.efi executes the ELF kernel through a trampoline:
https://github.com/freebsd/freebsd/blob/433bd38e3a0349f9f89f9d54594172c75b002b74/stand/efi/loader/arch/amd64/elf64_freebsd.c#L197-L200

Defined here:
https://github.com/freebsd/freebsd/blob/433bd38e3a0349f9f89f9d54594172c75b002b74/stand/efi/loader/arch/amd64/amd64_tramp.S#L40

The only way to get back to EFI that I see is through a system reset
or some dark voodoo that switches back to efi_main directly (the
mystic arts will likely be harder than just figuring ACPI out, though
:P).

On Fri, Jun 15, 2018 at 5:33 AM, Chris Johns <chrisj at rtems.org> wrote:
> On 15/06/2018 03:25, Amaan Cheval wrote:
>>
>> For shutdown and whatnot, I imagine I'll need to get our ACPI support
>> out there too, so that may be on the backburner for a little bit.
>>
>
> What happens if you return to loader.efi?
>
> Does it return to the EFI OS?
>
> Chris


More information about the devel mailing list