From nobody Sat Jun 17 23:36:28 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QkC931HJcz4fkSj for ; Sat, 17 Jun 2023 23:36:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-21.consmr.mail.gq1.yahoo.com (sonic305-21.consmr.mail.gq1.yahoo.com [98.137.64.84]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QkC926mssz4XQq for ; Sat, 17 Jun 2023 23:36:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687044996; bh=3v54Q2Zoni3A7csMb6Arg7AhyAMLK93A6wP5o+tetVk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=HsuoVYQ4Rk89OEmjSIhEOAztSkl+R8FI9h2Q6EY8qqrt8bYi0aAQqFJfl3+788FatBtNkBYeR4DMmueRQe+DBNHZ2cuCnNPinsvBZzqh/qIRC2sPAw03XREB1KAJKXG0bdG0n+EqMx+AhwRn8CRV/1hPF04wEUfZinWUMrgc4O8hBJJZaf5mAEd7dpf+Zztlf09nHDoAviPH0qkoF4po0ILC9S0l1wSrHGiLBw85Vqcr8v6Kwl7nrx2sGlCpvekdIxl/BKcDyV44s+SgsSjXwmlouMfvHvNGdeadW+1VCHRysteGpzG51mnAnUAwiHeiRPDF/d8m664VFivvYDyeAg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687044996; bh=TAyrQ7/+jkDKUdZr+++miYx8EaYyA5hJMVjc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TRH57VWE2eCYiUiWul2w5Ppjn2xIvC_2CWoRnYhSf6jUhrqoOR2 HWDUTOhgf8rEjP9EZmyoLtjilCA5pCYkuHXPcw_i7gFkT.l4I0MTo4Q7A8G9d8w1J9euXQkjyfdc 5XOustKrAQK6GNZsxHmThg5ex1m00nkR.oAjbm1iEdHyIZra6NYgBLGLLGNBeCy.iBfM2qmEmE5l Dbr80lES8kop_VO7etI.cP9oc2rTr3dDbjS9PPPqL_zUSHD2sCR24IV.KWznM3TsqAk8cdmWsogl uIIaEzvzNaAo3oo0Owvy76f8LvSNnWAFG5iySKNL9HDEuXgc2ltnbhUD_6ZzMcF2ny8ukVcyqzDG FmnQvmNQ4o81liTq35qx17Z_HK1XM3dY3ZywkoWRfgZWNpFhKtUZQR9Otni85HSsv3VAB31hygNT e1tTjSr8V.FIU9edDSZlINzyyovjeSS2v0LJE3PnJNjA_kkQJlg1qml3VZR09qI38wpsIg8JU9Yo mJPtkp81RChCfamONwy046IfA5YyKM3uCAKvJpUBCg408EAWdWdDlJSLotyOgtQ00KJdlx2f59N6 IzK._Hg-- X-Sonic-MF: X-Sonic-ID: b8e4cc1c-f675-495c-a0c7-9235355705c5 Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Sat, 17 Jun 2023 23:36:36 +0000 Received: by hermes--production-ne1-574d4b7954-wtfnl (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 47df85e67263fb884c304a32c5d0525f; Sat, 17 Jun 2023 23:36:32 +0000 (UTC) Content-Type: text/plain; charset=utf-8 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: keyboard doesn't work at Boot Menu From: Mark Millard In-Reply-To: Date: Sat, 17 Jun 2023 16:36:28 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <99542360-6350-4636-A9EA-CA9BBCC93C60@yahoo.com> <5D8D94E2-781D-4945-B721-EDD0BF56A8F2@yahoo.com> <70CC43FC-2055-409E-A94E-76F934C14AE2@yahoo.com> <5875BDD2-B792-4FE1-8F42-99D996CAE71D@yahoo.com> <7D1BE218-B8B5-40EB-8CF3-C09CDEABA9C3@yahoo.com> To: Nuno Teixeira X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4QkC926mssz4XQq X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Jun 17, 2023, at 16:01, Nuno Teixeira wrote: > - tested it on both USB2 and USB3 ports and same error. > - added a gamer keyboard on all ports and same error. > - tested with both keyboads connected, but only one get error from the = normal keyboard, both failed with same error :) >=20 > at boot time, none keyboards work. > at login time, both works. >=20 > I'm very curious about raspberry original keyboard! I will buy it next = week. Most of the keyboards that I have access to are much older, many of then from Apple. There is only one PC USB gaming keyboard and mouse, not that they were ever used for such. There is just the one RPi keyboard and mouse. I used the more modern, fairly common keyboard because trying to figure out if old equipment related failures are actually the same type of failure did not seem reasonable. Trying to match old equipment for comparison/contrast activities did not seem reasonable either. That the modern keyboard happens to be an RPi one is an accident. > Thanks very much for this awesome time that I learned more. > Thanks for your patience! >=20 > And I will stay tuned for updates on firmware and continue testing = stable/current snapshots to check if boot is fixed. >=20 > Cheers, >=20 > Mark Millard escreveu no dia s=C3=A1bado, = 17/06/2023 =C3=A0(s) 23:41: > On Jun 17, 2023, at 15:28, Nuno Teixeira wrote: >=20 > > I think I found the cause! > >=20 > > Please take a look at photo. > >=20 > > "Scanning xhci_pci devices... Failed to get keyboard state..." >=20 > That message was displayed by U-Boot before the > FreeBSD UEFI loader was even loaded to memory. >=20 > The FreeBSD UEFI loader operates by using U-Boot > services. If U-Boot fails to set up the keyboard > input, the same would be true in the FreeBSD UEFI > loader (beastie or otherwise) until FreeBSD's > kernel does its own bindings and things get another > chance at working. >=20 > (A similar point goes for storage media that U-Boot > fails to set up.) >=20 > Is the keyboard plugged into a USB2 port? USB3? Have > you tried both ways? >=20 > It does seem that the system and keyboard are not > well matched. >=20 > > After a while it gets detected during boot. I've pressed enter key = and I saw it creating empty line at boot. > > Maybe it's a keyboard problem? I'm using a very cheap one (not = raspberry original) > >=20 > > Thanks=20 > >=20 > > Mark Millard escreveu no dia s=C3=A1bado, = 17/06/2023 =C3=A0(s) 23:08: > > [Commenting out beastie_disable=3D"YES" and loader_color=3D"NO" > > in stable/13.] > >=20 > > On Jun 17, 2023, at 14:42, Mark Millard wrote: > >=20 > > > [This time I add continuing the sequence to test the stable/13 = snapshot.] > > >=20 > > > On Jun 17, 2023, at 13:56, Mark Millard wrote: > > >=20 > > >> On Jun 17, 2023, at 13:53, Mark Millard = wrote: > > >>=20 > > >>> I'm just making a status report for my experiments. > > >>>=20 > > >>> I did a: > > >>>=20 > > >>> dd if=3DFreeBSD-13.2-RELEASE-arm64-aarch64-RPI.img of=3D/dev/da1 = bs=3D1m conv=3Dfsync,sync status=3Dprogress > > >>>=20 > > >>> I made no adjustments. > > >>>=20 > > >>> I then tried using the USB3 media to start a boot of > > >>> a 8 GiByte RPi4B. It took my typing to the RPi > > >>> keyboard just fine: I did not have to wait for > > >>> the timeout when I hit . The (official) RPi > > >>> keyboard was plugged into a USB2 port. > > >>>=20 > > >>> Unfortunately there is a known issue for my context where it > > >>> gets: > > >>>=20 > > >>> uhub_reattach_port: port 3 reset failed, error=3DUSB_ERR_TIMEOUT > > >>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 3 > > >>> mountroot: waiting for device /dev/ufs/rootfs... > > >>> Mounting from ufs:/dev/ufs/rootfs failed with error 19. > > >>>=20 > > >>> So booting all the way requires me to make an adjustment > > >>> in the config.txt by adding at the end something like: > > >>>=20 > > >>>=20 > > >>> [all] > > >>> # > > >>> # Local addition that avoids USB3 SSD boot failures that look = like: > > >>> # uhub_reattach_port: port ? reset failed, = error=3DUSB_ERR_TIMEOUT > > >>> # uhub_reattach_port: device problem (USB_ERR_TIMEOUT), = disabling port ? > > >>> initial_turbo=3D60 > > >>>=20 > > >>> [It appears that with modern EEPROM context, the RPi* is > > >>> dynamically adjusting the frequency/voltage combinations > > >>> even during early booting. The initial_turbo use delays > > >>> that for the indicated number of seconds (up to 60 sec). > > >>> FreeBSD seems to not handle the variability and the above > > >>> gives FreeBSD a stable context for such properties for > > >>> early booting.] > > >>>=20 > > >>> I conclude that there is nothing about use of the RPi > > >>> keyboard that stops it from working during early booting > > >>> of 13.2-RELEASE. The RPi* firmware, U-Boot, and FreeBSD > > >>> UEFI loader all work, other than possibly needing a > > >>> initial_turbo addition (or analogous that would span > > >>> at least that early boot time frame). > > >>>=20 > > >>> If you had/have problems for the 13.2-RELEASE context, > > >>> they are likely somehow specific to your context in some > > >>> respect that deviates from the above. > > >>>=20 > > >>> In some respects, investigating in the older context may > > >>> be better than dealing with stable/13 . It may be keyboard > > >>> specific in some way if the keyboard is not an RPi > > >>> keyboard. I did not have a mouse plugged in. An Ethernet > > >>> cable was plugged in for the booting. > > >>=20 > > >> I forgot to mention having the HDMI connection plugged > > >> into the HDMI port nearest the USB3 power connector. > > >>=20 > > >> As I remember, the other port stops updating its display > > >> at some point during the boot. > > >>=20 > > >>> I just retried with the RPi keyboard plugged into a USB3 > > >>> port instead. It worked the same. (The boot media is also > > >>> plugged into a USB3 port and is USB3 capable SSD media.) > > >>>=20 > > >>> FYI: > > >>>=20 > > >>> # more /boot/msdos/config.txt=20 > > >>> [all] > > >>> arm_64bit=3D1 > > >>> dtparam=3Daudio=3Don,i2c_arm=3Don,spi=3Don > > >>> dtoverlay=3Dmmc > > >>> dtoverlay=3Ddisable-bt > > >>> device_tree_address=3D0x4000 > > >>> kernel=3Du-boot.bin > > >>>=20 > > >>> [pi4] > > >>> hdmi_safe=3D1 > > >>> armstub=3Darmstub8-gic.bin > > >>>=20 > > >>> [all] > > >>> # > > >>> # Local addition that avoids USB3 SSD boot failures that look = like: > > >>> # uhub_reattach_port: port ? reset failed, = error=3DUSB_ERR_TIMEOUT > > >>> # uhub_reattach_port: device problem (USB_ERR_TIMEOUT), = disabling port ? > > >>> initial_turbo=3D60 > > >>>=20 > > >>> # more /boot/loader.conf > > >>> # Configure USB OTG; see usb_template(4). > > >>> hw.usb.template=3D3 > > >>> umodem_load=3D"YES" > > >>> # Multiple console (serial+efi gop) enabled. > > >>> boot_multicons=3D"YES" > > >>> boot_serial=3D"YES" > > >>> # Disable the beastie menu and color > > >>> beastie_disable=3D"YES" > > >>> loader_color=3D"NO" > > >>>=20 > > >>> (That is unchanged from the image's /boot/loader.conf content.) > > >>>=20 > > >>>=20 > > >>> I'll see about stable/13's snapshot with the u-boot.bin > > >>> substitution. > > >>>=20 > > >>>=20 > > >>> Side note: I've other USB3 boot media for which having > > >>> usb_pgood_delay=3D2000 in U-Boot is sufficient but default > > >>> U-Boot contexts do not find the media suring the USB scan. > > >>> (There could be a better setting to use for all I know: > > >>> sufficient but possibly not necessary.) > > >=20 > > > This is based on: > > >=20 > > > dd = if=3DFreeBSD-13.2-STABLE-arm64-aarch64-RPI-20230615-894492f5bf4e-255597.im= g of=3D/dev/da0 bs=3D1m conv=3Dfsync,sync status=3Dprogress > > >=20 > > > First dealing with the U-Boot vintage-avoidance issue: > > >=20 > > > # mount -onoatime -tmsdosfs /dev/da1s1 /media > > > # mount -onoatime -tmsdosfs /dev/da0s1 /mnt > > >=20 > > > # ls -Tld /media/u-boot.bin /mnt/u-boot.bin > > > -rwxr-xr-x 1 root wheel 601096 Apr 6 19:47:52 2023 = /media/u-boot.bin > > > -rwxr-xr-x 1 root wheel 602552 Jun 14 19:43:46 2023 = /mnt/u-boot.bin > > >=20 > > > # cp -aRx /media/u-boot.bin /mnt/ > > >=20 > > > Then dealing with the initial_turbo issue: > > >=20 > > > # diff /media/config.txt /mnt/config.txt=20 > > > 12,18d11 > > > < < [all] > > > < # > > > < # Local addition that avoids USB3 SSD boot failures that look = like: > > > < # uhub_reattach_port: port ? reset failed, = error=3DUSB_ERR_TIMEOUT > > > < # uhub_reattach_port: device problem (USB_ERR_TIMEOUT), = disabling port ? > > > < initial_turbo=3D60 > > > # cp -aRx /media/config.txt /mnt/ > > >=20 > > > Finally, checking things overall in the msdosfs: > > >=20 > > > # diff -rq /media/ /mnt/ > > > Files /media/EFI/BOOT/bootaa64.efi and /mnt/EFI/BOOT/bootaa64.efi = differ > > >=20 > > > # ls -Tld /media/EFI/*/* /mnt/EFI/*/* > > > -rwxr-xr-x 1 root wheel 1180860 Apr 6 20:48:14 2023 = /media/EFI/BOOT/bootaa64.efi > > > -rwxr-xr-x 1 root wheel 1182604 Jun 14 20:47:12 2023 = /mnt/EFI/BOOT/bootaa64.efi > > >=20 > > > So: No other differences than the vintage of the FreeBSD UEFI > > > loader. > > >=20 > > > This also booted just fine, taking my input to avoid having > > > to wait for the timeout. The only difference is which USB3 > > > SSD was plugged in (the boot drive), in this case the one > > > with a stable/13 snapshot instead of a releng/13.2 snapshot. > > > The rest of the ports were as they had been. > > >=20 > > > FYI: > > >=20 > > > # uname -apKU > > > FreeBSD generic 13.2-STABLE FreeBSD 13.2-STABLE = stable/13-n255597-894492f5bf4e GENERIC arm64 aarch64 1302505 1302505 > > >=20 > > > Having confirmed this much for both releng/13.2 and stable.13 , > > > I'll go back and look at your notes about file content and the > > > like and see if I notice any distinctions vs. the above that > > > might be important. > > >=20 > > >=20 > > > Notes: > > >=20 > > > I doubt that the RPi4B EEPROM image vintage would contribute, but > > > it is something we have not been explicit about. > > >=20 > > > I do have various debug outputs enabled, including for > > > the EEPROM stage. The following is what it reports=20 > > > about the EEPROM content ("BOOTLOADER release") at > > > power down after FreeBSD is done: > > >=20 > > > RPi: BOOTLOADER release VERSION:8ba17717 DATE: 2023/01/11 TIME: = 17:40:52 > > > BOOTMODE: 0x06 partition 63 build-ts BUILD_TIMESTAMP=3D1673458852 = serial c740af3c boardrev d03115 stc 421180 > > > Halt: wake: 1 power_off: 0 > > >=20 > > > The "boardrev d03115" indicates a "C0T" Rev1.5 vintage part > > > that does not require the bounce buffer work around since > > > the wrapper logic is fixed. (FreeBSD keeps working as if > > > the bounce buffer was required: it is the only style of > > > operation the kernel code has for the category of part.) > > >=20 > > > I have access to a 8 GiByte Rev 1.4 RPi4B and a Rev 1.1 > > > 4 GiByte RPi4B and could test those with the same media > > > and such. All would have the same "BOOTLOADER release" > > > as above, as I remember. > > >=20 > > >=20 > > > A you sure you have the HDMI plugged into the correct HDMI > > > port on the RPi4B, the one closest to the USB3 power > > > connection? > >=20 > > [I have also changed the /bin/csh defaults to /bin/sh > > (which is my normal context).] > >=20 > > # more /boot/loader.conf > > # Configure USB OTG; see usb_template(4). > > hw.usb.template=3D3 > > umodem_load=3D"YES" > > # Multiple console (serial+efi gop) enabled. > > boot_multicons=3D"YES" > > boot_serial=3D"YES" > > # Disable the beastie menu and color > > # beastie_disable=3D"YES" > > # loader_color=3D"NO" > >=20 > > # shutdown -r now > >=20 > > And the beastie shows up and works just fine, > > operated from the USB RPi keyboard. > >=20 > >=20 > > My bias here is to have minimal differences from > > the RELEASE and snapshot builds relative to the > > reported problem. I still see no evidence of any > > problem with use of the RPi keyboard to control > > booting. > >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com