Only use WaitForKeys event if it exists, this is not the case in u-boot efi implementation.
Tested on beaglebone black with u-boot efi implementation.
This looks correct, but add some UEFI people to check. On U-Boot WaitForKey is NULL.
This check should be against zero since this isn't a bool or even a pointer.
From sys/boot/efi/include/efidef.h :
typedef VOID *EFI_EVENT;
So I should check against NULL.
Check against NULL
LGTM. Perhaps worth a comment in the source referencing u-boot UEFI as an example of an impl. lacking WaitForEvent?