This section describes a dbgBsp for the UltraSPARC CP1500 board. The source files for this example are in the source_dir/nucleus/bsp/usparc/cpxxxx/src/dbg directory. There are three files in this directory:
dbgBsp.c
ns16550Bsp.c
epfpldBsp.c
Imakefile
dbgBsp.c:
Declares and initializes a dbgBsp structure (as defined in bki/dbgBsp.h)
Implements the board reset function
Calls the serial and watchdog driver initialization functions and initializes the dbgBsp field in the BootConf structure
Contains dbgBsp_init, which is an entry point for dbgBsp
ns16550Bsp.c:
The ns16550_inb(), ns16550_outb() functions provide access to device registers
The ns16550_divisor() function calculates the divisor corresponding to a given baud rate, which is then used to program the baud rate in the generic driver
The ns16550_ioremap() function is called each time the I/O space mapping is changed
epfpldBsp.c:
The epfpld_init() function assigns an initial physical address to the watchdog device
The epfpld_pat() function resets the watchdog counter if the system is stopped by the system debugger
The epfpld_ioremap() function assigns a new physical address to the watchdog device
Imakefile:
Builds the dbgBsp binary file from dbgBsp.o, ns16550.o and epfpld.o
Includes $(DRV_DIST_BIN)/dbg/ns16550.o, $(DRV_DIST_BIN)/dbg/dbg/epfpld.o (the generic drivers) and $(DRV_DIST_BIN)/dbg/dbgUartConf.o (the serial line configuration) in the binary file
Declares dbgBsp_init as the entry point