Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42505 )
Change subject: libpayload: gdb: Condition video console init on LP_VIDEO_CONSOLE ......................................................................
Patch Set 2: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/42505/1/payloads/libpayload/gdb/stu... File payloads/libpayload/gdb/stub.c:
https://review.coreboot.org/c/coreboot/+/42505/1/payloads/libpayload/gdb/stu... PS1, Line 76: puts("GDB died, redirecting its last words to the screen:\n");
Unless I'm mistaken, puts/console_write will write to all available output drivers, including video […]
Yes, but I don't think it matters. I don't recall exactly how all of this works but I think in practice, even though gdb_exit() tries to reenable the serial you're usually not gonna see it (I think because the UART output still goes to the gdb process on the host machine at this point, who thinks that's just some garbage data that doesn't match its usual remote protocol it is expecting and isn't going to display it to the user). At least the whole point of turning on the screen here is that you wouldn't see it on the UART if just printing it there, I think. So this should be fine.
I mean, then again, it should also be fine to just do
if (CONFIG(LP_VIDEO_CONSOLE)) video_console_init(); puts(...) console_write(...)
if you prefer to keep the old behavior as close as possible.