[boot] Add enhanced debug display to setup.S for early startup debugging #1981
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
@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.