Find out who's gone before

The startup library provides a number of different callout routines that we've already written. You should check the source tree (originally installed in bsp_working_dir/src/hardware/startup/lib/) to see if a routine for your device/board is already available before embarking on the odyssey of writing your own. This directory includes generic code, as well as processor-specific directories.

In the CPU-dependent level of the tree for all the source files, look for files that match the pattern:

callout_*.[sS]

Those are all the callouts provided by the library. Whether a file ends in .s or .S depends on whether it's sent through the C preprocessor before being handed off to an assembler. For our purposes here, we'll simply refer to them as .s files.

The names break down further like this:

callout_category_device.s

where category is one of:

cache
cache control routines
debug
kernel debug input and output routines
interrupt
interrupt handling routines
timer
timer chip routine
reboot
rebooting the system

The device identifies the unique hardware that the callouts are for. Typically, all the routines in a particular source file would be used (or not) as a group by the kernel. For example, the callout_debug_8250.s file contains the display_char_8250(), poll_key_8250(), and break_detect_8250() routines for dealing with an 8250-style UART chip.