User`s manual
Special Topics
5-6 Single Board Computers SCSI Software UserÕs Manual
5
The following procedure was adhered to in the above code.
1. If the global value sdt_flag located in siopdata is set to an ASCII 'D' (0x44)
then continue with the trace operation.
2. Raise the interrupt mask using the function splhi() (refer to Appendix C).
Save the return value so it can be restored upon completion of the trace.
3. Call the function sdt_alloc() to get a pointer to a debug log entry.
4. Set the eyepicker to a unique four byte ASCII string. This Þeld is used to
identify who (i.e., SIOP, driver, etc.) is writing to the trace log.
5. Set the eyecatcher to a unique four byte ASCII string. This Þeld is used to
identify the log point.
6. Enter all of the items of interest into the debug log.
7. Restore the interrupt level back to the original value using the function
splx() (refer to Appendix C).
Debug Trace Display
This section demonstrates a method for displaying the trace entries logged by
the Firmware.
1. When the IOP command has completed, the debugger prompt will be
displayed. Display the special first trace entry which is always logged at
the begin address of the sdt_tvalue structure. The value used for begin in
this example is taken from the enable procedure above and has a value of
0x400000.
167-Bug>md 400000:10
00400000 0044 0000 0040 0000 007F FFF0 007F D070 .D...@.........p
00400010 3638 4B3D 0000 0098 3838 4B3D 0000 004C 68K=....88K=...L
167-Bug>
The first 32 bytes of the first trace entry are for log management. The
following definitions are referenced to the offset from the beginning
address of the allocated debug log block as specified in sdt_tvalue.
0x00 - Flag This is the enable/disable flag. This value will always be
XX44XXXX.
0x04 - Begin This is the beginning address of the debug log as provided in
sdt_tvalue.
0x08 - End This is the end of the debug log as determined by sdt_tinit().
The values provided in sdt_tvalue may not have indicated a
block which was sized to X number of entries. There could