efi/libstub: Use efi_exit_boot_services() in FDT
authorJeffrey Hugo <jhugo@codeaurora.org>
Mon, 29 Aug 2016 20:38:53 +0000 (14:38 -0600)
committerMatt Fleming <matt@codeblueprint.co.uk>
Mon, 5 Sep 2016 11:32:36 +0000 (12:32 +0100)
commited9cc156c42ff0c0bf9b1d09df48a12bf0873473
treec1fb0debfe329e10e5eef595a67775bc94c86542
parentfc07716ba803483be91bc4b2344f9c84985e6f07
efi/libstub: Use efi_exit_boot_services() in FDT

The FDT code directly calls ExitBootServices.  This is inadvisable as the
UEFI spec details a complex set of errors, race conditions, and API
interactions that the caller of ExitBootServices must get correct.  The
FDT code does not handle EFI_INVALID_PARAMETER as required by the spec,
which causes intermittent boot failures on the Qualcomm Technologies
QDF2432.  Call the efi_exit_boot_services() helper intead, which handles
the EFI_INVALID_PARAMETER scenario properly.

Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
drivers/firmware/efi/libstub/fdt.c