frno7 / linux

Linux 2.2, 2.6, 3.x, 4.x and 5.x kernels for the PlayStation 2.
Other
86 stars 5 forks source link

Improve early printk using the Graphics Synthesizer #9

Open frno7 opened 5 years ago

frno7 commented 5 years ago

The conventional putc prints to a serial port, that requires soldering on the PlayStation 2. The provisional putc in commit 31aa46563fdfbb6554c0f5e3d5c1f493efe40ef0 instead prints to a video frame buffer using the Graphics Synthesizer, which at the moment is fixed at the video resolution 1920x1080p for component video or HDMI.

The following three lines are the first ones visible on the screen:

zimage at:     00803BE0 00BDDE8C
Uncompressing Linux at load address 80010000
Now, booting the kernel...

An early printk is very helpful, especially with unmodified PlayStation 2 hardware.

frno7 commented 2 years ago

@akuhak, perhaps we could have a new CONFIG_EARLY_PRINTK_GS config knob, default off, to disable this and thereby improve compatibility with video hardware not supporting 1920×1080p video resolutions? It’s only used for examining very early boot crashes, but these days we’re supplying precompiled kernels, so it shouldn’t be needed for most people. That said I think the ideas in https://github.com/frno7/linux/issues/28#issuecomment-1103568374 are interesting.