Re: Details on OpenBSD bug on system reboot with XHCI and UEFI

2021-08-05 Thread Peter Nicolai Mathias Hansteen


> 5. aug. 2021 kl. 04:34 skrev Stéphane Paquin :
> 
> 
> The issue is super probably between the hardware, the BIOS & the EUFI drivers.
> Or just plain hard disk corruption; I've seen that on the r730xd in fact. 
> With so many hardware freezes, the firmware drivers ended up as garbage on 
> the disk. Same could/should happen with the EUFI drivers on disk.

Whether or not the firmware files have been corrupted is relatively easy to 
check, at least - doas fw_update -v will report any errors. Then fw_update -d 
the damaged drivers and reinstall them with fw_update driver.

(I had to do exactly that while fiddling with my new ASUS laptop a little while 
back, the article is fairly close to the first url in my .signature)

- Peter



—
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.






signature.asc
Description: Message signed with OpenPGP


Re: Details on OpenBSD bug on system reboot with XHCI and UEFI

2021-08-04 Thread Stéphane Paquin
In my personal experience with relatively recent Dell servers with OpenBSD, 
I've found that the Dell BIOS faults a lot with OpenBSD. I own a pair of 
r730xd, and its hell. Faulty buffers, faulty electric management, it just 
freezes after 6GB of consecutive data transfer from disk to disk or disk to 
network. I wouldn't be surprised if it had something to do with the Dell BIOS 
looking to talk to the Dell Linux Drivers (but you ain't got them on OpenBSD, 
right ?).

I think they're dead-man-switch devices that Dell implemented at a software 
level between the BIOS and kernel drivers.
But I haven't had anybody at Dell confirm this. Ya know? Their only 
recommendation is "install the penguin".

It used to be that Dell was more supportive of OpenBSD, I fear that time has 
passed.

Also; the symptoms you mention can't be related to the "reboot" application. By 
the time the hardware is rebooted, the reboot app is long gone from memory.  
The system is fresh and reloaded from disk/network/memory. That reboot could 
cause a glitch in the USB keyboard & mouse is quite ... hardware ? The glitch 
would need to be introduced in the BIOS/Boot stack to mess around with you 
before the BIOS loads, and I don't think there are such facilities under 
OpenBSD, not out of the box at least.

The issue is super probably between the hardware, the BIOS & the EUFI drivers.
Or just plain hard disk corruption; I've seen that on the r730xd in fact. With 
so many hardware freezes, the firmware drivers ended up as garbage on the disk. 
Same could/should happen with the EUFI drivers on disk.

But Dell won't help much... try them at least, but don't get your hopes up.
We need to pressure them in considering OpenBSD is a customer want. ☹


-Original Message-
From: owner-b...@openbsd.org  On Behalf Of 
ir...@unix-world.org
Sent: Sunday, August 1, 2021 7:06 PM
To: bugs@openbsd.org
Subject: Ref: Details on OpenBSD bug on system reboot with XHCI and UEFI

Hi,

For details look at my previous message on this issue.

After digging more this bug appear to be very old.
I tried with older OpenBSD 6.6 and the same:

USB keyboard and mouse work ok on cold-start boot.
USB keyboard and mouse get frozen if I type the "reboot" command in OpenBSD, 
then OpenBSD boots and crashes before assigning the xhci keyboard and mouse.

I think the problem is with the reboot command which is not compatible with new 
UEFI like bioses.
This is because after reboot command from OpenBSD the keyboard and mouse are 
frozen even at the bios level when trying to enter the bios setup
(F2) or boot selection (F12).
I am not sure what executes the reboot command in OpenBSD and why the USB 
keyboard and mouse freeze after reboot. The reboot command in Debian Linux 10 
works perfectly. Also on Ubuntu, Alpine Linux or Windows 10.

I installed several operating system to test:
1. Windows 10
2. Debian Linux 10
3. OpenBSD 6.9

First two work perfectly on reboot.
If I type reboot from OpenBSD console will reboot the system and will freeze 
the USB keyboard and mouse. After Debian EFI GRUB 2 (or Windows
10 EFI) boot start any of them will unfreeze the USB Keyboard and Mouse.

I also tested like this:
Boot the install image of OpenBSD 6.9 (or 6.6) in UEFI mode on a new Dell Bios 
that have no option to enable the legacy modeat all !!
When the message appear on OpenBSD:
"Select (i) to install, ... (S) for shell", just type "s" to enter the shell.
Then type "reboot" + ENTER.

The system will reboot normally, but the USB Keyboard and mouse is no more 
working (I tried on different machines with different BIOS versions
v.2.0 or later of the Dell Bios).
Ex: Optiplex 3080 (desktop) or Optiplex 3080 SFF (small factor desktop).

After reboot if I press F12 will enter the prompt to choose the boot device or 
even F2 to show the Bios Setup, but actually neither keyboard or mouse are 
working. Mouse will be frozen if you choose Dell Bios Setup. Or you can't 
choose any option if press F12.

Actually after reboot cannot even type "boot -c" when OpenBSD boot prompt 
appears.
Then after reboot OpenBSD will start and will crash before setting the XHCI 
devices which I suppose are somehow locked from the previous boot, I am not 
sure exactly what is going on.

PS:
Another issue, maybe it is related.
Even on normal boot (cold-start boot), I am able to type "boot -c" will boot 
and to UKC console.
But UKC console is not usable because the USB keyboard and mouse are not yet 
initialized.

Also if crashing after reboot. It gives the DDB console but I am not able to 
use it because like in the case above the keyboard and mouse xhci are not 
initialized yet.

Conclusion:
The OpenBSD 6.6 ... 6.9 "reboot" command on new Dell Bios 2.x (which have no 
more option for legacy boot or legacy keyboard/mouse) is freezing the USB 
keyboard and mouse.
This is not happening with Linux "reboot" or Windows "restart".
OpenBSD 6.9 I can only install with UEFI boot since new Dell BIOS have no 
option to MBR