Page MenuHomeFreeBSD

bhyve: improve console error reporting on arm64
ClosedPublic

Authored by novel on Sun, Jan 4, 2:14 PM.
Tags
None
Referenced Files
F141915760: D54504.diff
Mon, Jan 12, 11:35 AM
F141887929: D54504.diff
Mon, Jan 12, 1:00 AM
Unknown Object (File)
Sun, Jan 11, 1:44 PM
Unknown Object (File)
Fri, Jan 9, 5:13 PM
Unknown Object (File)
Wed, Jan 7, 12:52 PM
Unknown Object (File)
Wed, Jan 7, 7:13 AM
Unknown Object (File)
Mon, Jan 5, 10:08 AM
Unknown Object (File)
Mon, Jan 5, 3:55 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 69604
Build 66487: arc lint + arc unit

Event Timeline

novel requested review of this revision.Sun, Jan 4, 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.Sun, Jan 4, 2:29 PM