Linux Kernel
3.7.1
|
#include <commands.h>
N_ALIVE = 0x1 (response only, not a command)
uCode issues this "alive" notification once the runtime image is ready to receive commands from the driver. This is the second "alive" notification that the driver will receive after rebooting uCode; this "alive" is indicated by subtype field != 9.
See comments documenting "BSM" (bootstrap state machine).
This response includes two pointers to structures within the device's data SRAM (access via HBUS_TARG_MEM_* regs) that are useful for debugging:
1) log_event_table_ptr indicates base of the event log. This traces a 256-entry history of uCode execution within a circular buffer. Its header format is:
__le32 log_size; log capacity (in number of entries) __le32 type; (1) timestamp with each entry, (0) no timestamp __le32 wraps; # times uCode has wrapped to top of circular buffer __le32 write_idx; next circular buffer entry that uCode would fill
The header is followed by the circular buffer of log entries. Entries with timestamps have the following format:
__le32 event_id; range 0 - 1500 __le32 timestamp; low 32 bits of TSF (of network, if associated) __le32 data; event_id-specific data value
Entries without timestamps contain only event_id and data.
2) error_event_table_ptr indicates base of the error log. This contains information about any uCode error that occurs. For 4965, the format of the error log is:
__le32 valid; (nonzero) valid, (0) log is empty __le32 error_id; type of error __le32 pc; program counter __le32 blink1; branch link __le32 blink2; branch link __le32 ilink1; interrupt link __le32 ilink2; interrupt link __le32 data1; error-specific data __le32 data2; error-specific data __le32 line; source code line of error __le32 bcon_time; beacon timer __le32 tsf_low; network timestamp function timer __le32 tsf_hi; network timestamp function timer __le32 gp1; GP1 timer register __le32 gp2; GP2 timer register __le32 gp3; GP3 timer register __le32 ucode_ver; uCode version __le32 hw_ver; HW Silicon version __le32 brd_ver; HW board version __le32 log_pc; log program counter __le32 frame_ptr; frame pointer __le32 stack_ptr; stack pointer __le32 hcmd; last host command __le32 isr0; isr status register LMPM_NIC_ISR0: rxtx_flag __le32 isr1; isr status register LMPM_NIC_ISR1: host_flag __le32 isr2; isr status register LMPM_NIC_ISR2: enc_flag __le32 isr3; isr status register LMPM_NIC_ISR3: time_flag __le32 isr4; isr status register LMPM_NIC_ISR4: wico interrupt __le32 isr_pref; isr status register LMPM_NIC_PREF_STAT __le32 wait_event; wait event() caller address __le32 l2p_control; L2pControlField __le32 l2p_duration; L2pDurationField __le32 l2p_mhvalid; L2pMhValidBits __le32 l2p_addr_match; L2pAddrMatchStat __le32 lmpm_pmg_sel; indicate which clocks are turned on (LMPM_PMG_SEL) __le32 u_timestamp; indicate when the date and time of the compilation __le32 reserved;
The Linux driver can print both logs to the system log when a uCode error occurs.
Definition at line 508 of file commands.h.
__le32 error_event_table_ptr |
Definition at line 517 of file commands.h.
__le32 is_valid |
Definition at line 519 of file commands.h.
__le32 log_event_table_ptr |
Definition at line 516 of file commands.h.
__le16 reserved1 |
Definition at line 511 of file commands.h.
__le16 reserved2 |
Definition at line 515 of file commands.h.
u8 sw_rev[8] |
Definition at line 512 of file commands.h.
Definition at line 518 of file commands.h.
u8 ucode_major |
Definition at line 510 of file commands.h.
u8 ucode_minor |
Definition at line 509 of file commands.h.
u8 ver_subtype |
Definition at line 514 of file commands.h.
u8 ver_type |
Definition at line 513 of file commands.h.