Basic System Problem Analysis - August 2003
35
System Globals
System globals is centralized table of information used by all parts of the OS. As was
mentioned earlier, the KSO table is located at the top of System Globals.
At the end of the system globals structure is an array of 32 entries, one for each active
processor (type “SPSD_ENTRY_TYPE”) that tracks information about the process
active on each CPU.
The macro “SYSGLOB” is an easy way to get information out of the system globals
structure but you need to know the name of the field you want to see. The macro also
only handles individual fields within a structure and not structures themselves. So you
could use SYSGLOB to display the highest PIN number used so far, whose field is
PM_HIGHEST_PIN
$22c ($70) nmdat > wl SYSGLOB ("PM_HIGHEST_PIN")
$223
But you could not use it to display the “SG_SPSD_ENTRY” structure for CPU 3 by
doing
$22d ($70) nmdat > wl SYSGLOB ("SG_SPSD_ARRAY[3]")
Error while retrieving the requested data from SYMVAL
Your best bet is to use FT to find the field or structure within system globals that you
want to format and just use the FV command, for example:
$22e ($70) nmdat > fv c0000000 'system_globals_type.sg_spsd_array[3]'
Finally, it is worth noting that the short pointer to system globals “C0000000” can be
constructed with a single instruction. The ZDEPI or zero and deposit, immediate
instruction
ZDEPI 3,1,2,rx
Where “rx” is R1 to R31. This says zero the target register and deposit the value 3
beginning in bit 1 for 2 bits to the left. Bits are numbered left to right, 0 to 31. So bit 1
would be the 2
nd
bit from the left and the quantity 3 in binary is “11”. The resulting value
in binary is “11” followed by 30 zeros and when represented in hexadecimal you have
“C0000000”.
When you see this sequence followed by the target register “rx” being used in a load or
store with an offset you can match that to the offsets found by doing an FT
“system_globals_type, m” remembering that the offsets are in hex from FT and decimal
in the instruction. You can then see which field of system globals is being referenced.