Debug startup tasks

Updated: April 19, 2023

In addition to the debug kernel callouts, the startup code must provide some functions that enable it to output the debug information.

Note: For information about the kernel callouts the startup code provides, and instructions on how to modify existing kernel callouts or write your own, see the Kernel Callouts chapter.
The functions required to output debug information include:

These functions don't need to be position-independent, so they can be written in C. Both the startup debug functions and the kernel debug callouts are specified in a structure that is often set up in the startup code’s main() function. For example:

const struct debug_device debug_devices[] = {
    {   "console",
        {    "",
        {   &display_char_vga,
    {   "8250",
        {   "0x3f8^0.57600.1843200.16",
        {   &display_char_8250,