linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 08/12] iwlwifi: mvm: print out extended secboot status before dump
Date: Mon,  6 Jan 2020 10:54:58 +0200	[thread overview]
Message-ID: <20200106085502.363205-9-luca@coelho.fi> (raw)
In-Reply-To: <20200106085502.363205-1-luca@coelho.fi>

From: Johannes Berg <johannes.berg@intel.com>

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 |  3 +++
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c   | 27 ++++++++++++++-----
 2 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
index 14c8ba23f3b9..c21d99418af9 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
@@ -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 {
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index dd685f7eb410..67d414e5db19 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -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;
 	}
-- 
2.24.1


  parent reply	other threads:[~2020-01-06  8:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06  8:54 [PATCH 00/12] iwlwifi: updates intended for v5.6 2020-01-06 Luca Coelho
2020-01-06  8:54 ` [PATCH 01/12] iwlwifi: mvm: Update BEACON_TEMPLATE_CMD firmware API Luca Coelho
2020-01-06  8:54 ` [PATCH 02/12] iwlwifi: yoyo: don't allow changing the domain via debugfs Luca Coelho
2020-01-06  8:54 ` [PATCH 03/12] iwlwifi: yoyo: remove unnecessary active triggers status flag Luca Coelho
2020-01-06  8:54 ` [PATCH 04/12] iwlwifi: yoyo: remove the iwl_dbg_tlv_gen_active_trigs() function Luca Coelho
2020-01-06  8:54 ` [PATCH 05/12] iwlwifi: add new iwlax411 struct for type SoSnj Luca Coelho
2020-01-06  8:54 ` [PATCH 06/12] iwlwifi: yoyo: check for the domain on all TLV types during init Luca Coelho
2020-01-06  8:54 ` [PATCH 07/12] iwlwifi: incorporate firmware filename into version Luca Coelho
2020-01-06  8:54 ` Luca Coelho [this message]
2020-01-06  8:54 ` [PATCH 09/12] iwlwifi: prph: remove some unused register definitions Luca Coelho
2020-01-06  8:55 ` [PATCH 10/12] iwlwifi: assume the driver_data is a trans_cfg, but allow full cfg Luca Coelho
2020-01-06  8:55 ` [PATCH 11/12] iwlwifi: implement a new device configuration table Luca Coelho
2020-01-06  8:55 ` [PATCH 12/12] iwlwifi: add device name to device_info Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200106085502.363205-9-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).