i386 EFI booting is broken (ExitBootServices called in two places)

From: Rebecca Cran <rebecca_at_bluestop.org>
Date: Mon, 25 Feb 2019 19:04:56 -0700
I've been working on some EFI changes, and in the process found that 
i386 booting is broken. On real hardware - my MinnowBoard Turbot - the 
loader hangs when calling ExitBootServices, while in a VM I get a panic 
saying "exec returned".

The problem appears to be that ExitBootServices is called twice: 
elf32_exec in arch/i386/efimd.c calls bi_load which calls 
bi_load_efi_data in bootinfo.c - which calls ExitBootServices the first 
time. Then elf32_exec keeps going, and after printing "Start _at_ 0x....." 
calls ldr_enter which tries to call ExitBootServices again - this time 
with a mapkey whose value is zero since it never attempts to fetch the 
memory map. I'm guessing that subsequently causes the exec to fail.


-- 
Rebecca Cran
Received on Tue Feb 26 2019 - 01:05:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:20 UTC