Other startup tasks

The startup code must look after a number of specific tasks in addition to those handled by the kernel callouts it provides.

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

Debug

In addition to the debug kernel callouts, the startup code must provide some functions that enable it to output the debug information. These 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",
		{	"",
			NULL
		},
		init_vga,
		put_vga,
		{	&display_char_vga,
			&poll_key_pckbd,
		}
	},
	{ 	"8250",
		{	"0x3f8^0.57600.1843200.16",
			"0x2f8^0.57600.1843200.16"
		},
		init_8250,
		put_8250,
		{	&display_char_8250,
			&poll_key_8250,
			&break_detect_8250,
		}
	},
};