On Fri, Aug 24, 2018 at 11:50:51AM +0900, YASUOKA Masahiko wrote: > Hi, > > I think the diff should be brought to arm64 as well. ok?
ok. But shouldn't armv7 also be kept in sync? > > On Thu, 23 Aug 2018 11:21:57 +0900 (JST) > YASUOKA Masahiko <[email protected]> wrote: > > On Mon, 20 Aug 2018 13:50:13 +0200 > > Theo Buehler <[email protected]> wrote: > >> On Thu, Aug 16, 2018 at 09:51:32PM +0200, Frank Groeneveld wrote: > >>> I haven't been able to type the passphrase of my softraid device on > >>> boot when using an external keyboard on my Thinkpad X260. Finally I > >>> had some time to debug this problem and this is what I discovered. > >>> > >>> On a different laptop with EFI, the ReadKeyStroke call will not return > >>> a packet when shift is pressed on the external keyboard. On the > >>> Thinkpad however, a packet is returned with UnicodeChar == 0, which > >>> results in a wrong passphrase being used. > >>> > >>> This seems like a bug in the firmware to me, because according to some > >>> EFI specifications I found online, this should not return a packet. > >>> I've attached a simple patch that fixes this, but I'm not sure whether > >>> this might break things on different systems. > >> > >> I can't comment on the technical side of this patch but I can confirm > >> that it allows me to enter the password from an external keyboard with > >> my x280. > > > > In the spec, > > > > | The UnicodeChar is the actual printable character or is zero if the > > | key does not represent a printable character (control key, function > > | key, etc.). > > > > It seems that UnicodeChar can be zero. So I think the diff is OK even > > on the spec. > > > > If there is no futher comment I'll commit it. Thanks. > > > Index: sys/arch/arm64/stand/efiboot/efiboot.c > =================================================================== > RCS file: /cvs/src/sys/arch/arm64/stand/efiboot/efiboot.c,v > retrieving revision 1.20 > diff -u -p -r1.20 efiboot.c > --- sys/arch/arm64/stand/efiboot/efiboot.c 23 Aug 2018 15:31:12 -0000 > 1.20 > +++ sys/arch/arm64/stand/efiboot/efiboot.c 24 Aug 2018 02:44:30 -0000 > @@ -129,7 +129,7 @@ efi_cons_getc(dev_t dev) > } > > status = conin->ReadKeyStroke(conin, &key); > - while (status == EFI_NOT_READY) { > + while (status == EFI_NOT_READY || key.UnicodeChar == 0) { > if (dev & 0x80) > return (0); > /*
