User`s manual

Firmware Debug Logging
SBCSCSI/D1 5-5
5
4. Clear the debug trace memory area using the BF command.
167-Bug>bf 400000 800000 0
Effective address: 00400000
Effective address: 007FFFFF
167-Bug>
5. sdt_tvalue is initialized to enable debug logging but debug logging is not
yet enabled. To enable debug logging and to log some debug trace entries,
execute an IOP command to a local SCSI device.
Code Level Setup
Embedded in the debugger code is a decision to call sdt_tinit() before the first
access to the local SCSI bus after a board reset. Therefore, the debug logging
functionality will have been enabled during the first part of the
IOP command
because of the call to sdt_tinit(). Later in the command, a call to siop_cmd()
will have been made to request the Firmware to access a local SCSI device.
Trace entries will have been logged to the debug log during execution of the
Firmware. The following excerpt from the Firmware is where the MPU code
is invoked in response to a command complete interrupt generated by the
SCRIPTS.
UINT sdt_flag = siopdatap->sdt_flag; /* debug logging flag */
/*
* debug log, if enabled
*/
if (sdt_flag == DEBUG_ENABLE)
{
register struct trace_entry *log; /* pointer to debug log entry */
/*
* raise interrupt mask
* get trace memory block
* log block as Firmware entry
* log eyecatcher (source of interrupt)
* log some SIOP register values
* log current command structure
* log command structure (siop_struc)
* restore interrupt mask
*/
s = splhi();
log = (struct trace_entry *)sdt_alloc(siopdatap);
log->eyepicker = SDT_NCR;
log->eyecatcher = SDT_COMP;
save_siop(log, siopdatap);
NCR_LOG(log->data)->cns = *cnsptr;
NCR_LOG(log->data)->cmd = *(cnsptr->curcmd);
splx(s);
}