Page MenuHomeFreeBSD

bhyve: improve console error reporting on arm64
ClosedPublic

Authored by novel on Jan 4 2026, 2:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 24, 6:21 PM
Unknown Object (File)
Jan 29 2026, 7:57 AM
Unknown Object (File)
Jan 29 2026, 7:46 AM
Unknown Object (File)
Jan 20 2026, 5:05 AM
Unknown Object (File)
Jan 19 2026, 7:00 PM
Unknown Object (File)
Jan 18 2026, 1:04 PM
Unknown Object (File)
Jan 13 2026, 9:46 PM
Unknown Object (File)
Jan 12 2026, 11:35 AM

Details

Summary

Currently, on arm64, if bhyve fails to initialize the console,
it falls into assert(), which does not look particularly pretty
for users.

Replace the assert with proper error handling so bhyve prints
a meaningful error message and exits with status code 4 (error).
That matches the behavior on amd64.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

novel requested review of this revision.Jan 4 2026, 2:14 PM

Relatively simple way to trigger this error is to run kldunload nmdm and then run bhyve -c 1 -o bootrom=/usr/local/share/u-boot/u-boot-bhyve-arm64/u-boot.bin -o console=/dev/nmdmFoobarA test.

This revision is now accepted and ready to land.Jan 4 2026, 2:29 PM