loader.efi: ResetSystem does not use data with EFI_SUCCESS

The current reboot command in efi/loader/main.c is passing extra data with
ResetSystem, however, UEFI spec 2.6, page 265 does state:

"ResetData is only valid if ResetStatus is something other than EFI_SUCCESS
unless the ResetType is EfiResetPlatformSpecific where a minimum amount of
ResetData is always required."

Therefore we should use DataSize 0 and ResetData NULL - those are two last
arguments for the call.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D10562
This commit is contained in:
Toomas Soome 2017-05-01 16:56:34 +00:00
parent c12488bbe0
commit 8428b4c343

View File

@ -507,8 +507,7 @@ command_reboot(int argc, char *argv[])
if (devsw[i]->dv_cleanup != NULL)
(devsw[i]->dv_cleanup)();
RS->ResetSystem(EfiResetCold, EFI_SUCCESS, 23,
(CHAR16 *)"Reboot from the loader");
RS->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
/* NOTREACHED */
return (CMD_ERROR);