[boot] Add enhanced debug display to setup.S for early startup debugging by ghaerr · Pull Request #1981 · ghaerr/elks (original) (raw)

Adds significant optional debug display output to early setup operation, allowing one to both see, debug and learn about early ELKS kernel startup directly after being handed control by the boot sector.

Adds the ability to display output to serial COM1 instead of the console. If debugging on and going to console, allows waiting for a keypress so that contents are not quickly scrolled past.

The debugging output logs all block memory copies and stack switches during startup, for much greater visibility into the selection of DEF_INITSYS, REL_INITSYS, and other pretty arcane stuff in config.h. Update boot.txt documentation coming.

Here's an example of the setup debug display on the console, awaiting a keypress before starting the kernel:
ELKS setup debug

@Mellvik, this is the first in a series of PRs for issues discussed in Mellvik/TLVC#76 for enhancing our kernels by being able to more easily see what is going on. Feel free to port them over to TLVC. I've tried to make it such that files might be able to be ported directly over, with the exception of possible ELKS/TLVC naming or magic numbers.