]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
EFI: don't call printf after ExitBootServices, since it uses Boot Services
authorbcran <bcran@FreeBSD.org>
Sat, 2 Mar 2019 04:02:11 +0000 (04:02 +0000)
committerbcran <bcran@FreeBSD.org>
Sat, 2 Mar 2019 04:02:11 +0000 (04:02 +0000)
commita8d6d134df7c7f687575f1cc6f41a8d0ece7ba9a
tree619c9c81fc81bf3aca877f1e756c7b7305889769
parentda2ba2ea8295faf5f80a615e50743d5ef435caae
EFI: don't call printf after ExitBootServices, since it uses Boot Services

ExitBootServices terminates all boot services including console access.
Attempting to call printf afterwards can result in a crash, depending on the
implementation.

Move any printf statements to before we call bi_load, and remove any that
depend on calling bi_load first.

Reviewed by: imp, tsoome
Differential Revision: https://reviews.freebsd.org/D19374
stand/efi/loader/arch/arm/exec.c
stand/efi/loader/arch/i386/elf32_freebsd.c