opnsense-src/sys/boot/efi
Ed Maste 54f97d1eef UEFI: combine GetMemoryMap and ExitBootServices and retry on error
The EFI memory map may change before or during the first
ExitBootServices call. In that case ExitBootServices returns an error,
and GetMemoryMap and ExitBootServices must be retried.

Glue together calls to GetMemoryMap(), ExitBootServices() and storage of
(now up-to-date) MODINFOMD_EFI_MAP metadata within a single function.

That new function - bi_add_efi_data_and_exit() - uses space previously
allocated in bi_load_efi_data() to store the memory map (it will fail if
that space is too short). It handles re-calling GetMemoryMap() once to
update the map key if necessary. Finally, if ExitBootServices() is
successful, it stores the memory map and its header as MODINFOMD_EFI_MAP
metadata.

ExitBootServices() calls are now done earlier, from within arch-
independent bi_load() code.

PR:		202455
Submitted by:	Ganael LAPLANCHE
Reviewed by:	kib
MFC after:	2 weeks
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/D4296
2015-12-16 16:19:18 +00:00
..
boot1 META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
fdt META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
include Add support for the UGA draw protocol. This includes adding a 2015-08-30 23:58:53 +00:00
libefi META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
loader UEFI: combine GetMemoryMap and ExitBootServices and retry on error 2015-12-16 16:19:18 +00:00
Makefile Add support for arm64 to loader.efi and boot1.efi 2015-04-14 13:55:01 +00:00
Makefile.inc Use CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags. 2015-08-27 23:46:42 +00:00