User`s manual

SBCSCSI/D15-1
5
SPECIAL TOPICS
Introduction
This chapter covers topics which most users will not use in the normal course
of SCSI operation. It is provided as a guide for those who wish to exercise the
full functionality of the Firmware.
Firmware Debug Logging
This section describes the operation of the Firmware debug trace mechanism.
Debug tracing is useful when problems are encountered while accessing the
SCSI bus through the Firmware. The debug trace can reveal the source of
many functional discrepancies.
Debug Logging Interface
sdt_tinit()
This routine is for debug logging initialization. The user calls
this entry point to enable the debug logger and provide it with
memory resources.
sdt_alloc()
This routine is for debug logging. If debug logging has been
enabled, this entry point is called to get the next block of
memory to be used for debug logging.
Functional Overview
Implementing a debug trace is composed of three levels of operation. These
levels are the user level setup, code level setup, and trace display.
The user level setup is the first step and involves allocating a block of memory
for the debug log and initializing an sdt_tvalue structure (refer to Appendix
B). The begin and end fields of the structure are initialized to the beginning
and ending address of the allocated memory block. A value of 0x44 (ASCII 'D')
is installed in the flag field to enable debug logging.
The code level setup is the next step. Debug logging becomes enabled when a
call to sdt_tinit() passes in the sdt_tvalue and siopdata structures. sdt_tinit()
checks the flag field in sdt_tvalue for a value of 0x44 (ASCII 'D'). If the flag is
set to this enable value then the routine will set an enable flag in the siopdata
structure. If the flag is not set to this enable value then the routine will clear
the enable flag in the siopdata structure.