]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: mvm: print out extended secboot status before dump
authorJohannes Berg <johannes.berg@intel.com>
Tue, 29 Oct 2019 14:45:40 +0000 (15:45 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Sat, 4 Jan 2020 10:46:14 +0000 (12:46 +0200)
Print out the secure boot status, extended by the PCs of LMACs
and the UMAC. This needs to be before dumping, as dumping will
corrupt the PC (if the NMI is handled), so move that down.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-prph.h
drivers/net/wireless/intel/iwlwifi/mvm/fw.c

index 14c8ba23f3b98899e0ffa511b86d85058691e1d0..c21d99418af9b745b50fc51263df001266a53f21 100644 (file)
@@ -430,6 +430,9 @@ enum aux_misc_master1_en {
 #define UMAG_SB_CPU_1_STATUS           0xA038C0
 #define UMAG_SB_CPU_2_STATUS           0xA038C4
 #define UMAG_GEN_HW_STATUS             0xA038C8
+#define UREG_UMAC_CURRENT_PC           0xa05c18
+#define UREG_LMAC1_CURRENT_PC          0xa05c1c
+#define UREG_LMAC2_CURRENT_PC          0xa05c20
 
 /* For UMAG_GEN_HW_STATUS reg check */
 enum {
index dd685f7eb41044b05817386fa0f0b568d830352f..67d414e5db1937cc5df3fce6745f59c14c804726 100644 (file)
@@ -353,22 +353,35 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
        if (ret) {
                struct iwl_trans *trans = mvm->trans;
 
-               if (ret == -ETIMEDOUT)
-                       iwl_fw_dbg_error_collect(&mvm->fwrt,
-                                                FW_DBG_TRIGGER_ALIVE_TIMEOUT);
-
-               if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000)
+               if (trans->trans_cfg->device_family >=
+                                       IWL_DEVICE_FAMILY_22000) {
                        IWL_ERR(mvm,
                                "SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n",
                                iwl_read_umac_prph(trans, UMAG_SB_CPU_1_STATUS),
                                iwl_read_umac_prph(trans,
                                                   UMAG_SB_CPU_2_STATUS));
-               else if (trans->trans_cfg->device_family >=
-                        IWL_DEVICE_FAMILY_8000)
+                       IWL_ERR(mvm, "UMAC PC: 0x%x\n",
+                               iwl_read_umac_prph(trans,
+                                                  UREG_UMAC_CURRENT_PC));
+                       IWL_ERR(mvm, "LMAC PC: 0x%x\n",
+                               iwl_read_umac_prph(trans,
+                                                  UREG_LMAC1_CURRENT_PC));
+                       if (iwl_mvm_is_cdb_supported(mvm))
+                               IWL_ERR(mvm, "LMAC2 PC: 0x%x\n",
+                                       iwl_read_umac_prph(trans,
+                                               UREG_LMAC2_CURRENT_PC));
+               } else if (trans->trans_cfg->device_family >=
+                          IWL_DEVICE_FAMILY_8000) {
                        IWL_ERR(mvm,
                                "SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n",
                                iwl_read_prph(trans, SB_CPU_1_STATUS),
                                iwl_read_prph(trans, SB_CPU_2_STATUS));
+               }
+
+               if (ret == -ETIMEDOUT)
+                       iwl_fw_dbg_error_collect(&mvm->fwrt,
+                                                FW_DBG_TRIGGER_ALIVE_TIMEOUT);
+
                iwl_fw_set_current_image(&mvm->fwrt, old_type);
                return ret;
        }