From: Michal Kazior <michal.kazior@tieto.com> To: Kalle Valo <kvalo@qca.qualcomm.com> Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>, linux-wireless <linux-wireless@vger.kernel.org> Subject: Re: [PATCH v7 6/8] ath10k: save firmware RAM and ROM BSS sections on crash Date: Tue, 19 Aug 2014 11:39:20 +0200 [thread overview] Message-ID: <CA+BoTQ=H6Pnm39xxzT+u_kRBDkGujaR3r6gMyTU3V+8cZi0qLw@mail.gmail.com> (raw) In-Reply-To: <20140819082325.16842.18721.stgit@potku.adurom.net> On 19 August 2014 10:23, Kalle Valo <kvalo@qca.qualcomm.com> wrote: > From: Ben Greear <greearb@candelatech.com> > > This can be used to get a useful back trace out of a firmware > crash that involves an interrupt handler. For instance, a > null-pointer-exception would be this kind of trace. A user-space > tool can read the debugfs file and decode things as wished. > > This requires a packaged firmware with a new IE to describe the > BSS section starts and length. > > Signed-off-by: Ben Greear <greearb@candelatech.com> > Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> > --- [...] > +static void ath10k_pci_dump_bss_ram(struct ath10k *ar, > + struct ath10k_fw_crash_data *crash_data) { > + int ret; > + > + lockdep_assert_held(&ar->data_lock); > + > + if (!ar->fw.ram_bss_addr) > + return; > + > + if (!ar->fw.ram_bss_len) > + return; > + > + ret = ath10k_pci_diag_read_mem(ar, ar->fw.ram_bss_addr, > + crash_data->ram_bss_buf, > + ar->fw.ram_bss_len); > + if (ret) > + ath10k_warn("failed to read firmware RAM BSS memory from %d (%d B): %d\n", > + ar->fw.ram_bss_addr, ar->fw.ram_bss_len, ret); > +} > + > +static void ath10k_pci_dump_bss_rom(struct ath10k *ar, > + struct ath10k_fw_crash_data *crash_data) > +{ > + int ret; > + > + lockdep_assert_held(&ar->data_lock); > + > + if (!ar->fw.rom_bss_addr) > + return; > + > + if (!ar->fw.rom_bss_len) > + return; > + > + ret = ath10k_pci_diag_read_mem(ar, ar->fw.rom_bss_addr, > + crash_data->rom_bss_buf, > + ar->fw.rom_bss_len); > + if (ret) > + ath10k_warn("failed to read firmware ROM BSS memory from %d (%d B): %d\n", > + ar->fw.rom_bss_addr, ar->fw.rom_bss_len, ret); > +} Ditto as with other patches - endianess mess. Michał
WARNING: multiple messages have this Message-ID (diff)
From: Michal Kazior <michal.kazior@tieto.com> To: Kalle Valo <kvalo@qca.qualcomm.com> Cc: linux-wireless <linux-wireless@vger.kernel.org>, "ath10k@lists.infradead.org" <ath10k@lists.infradead.org> Subject: Re: [PATCH v7 6/8] ath10k: save firmware RAM and ROM BSS sections on crash Date: Tue, 19 Aug 2014 11:39:20 +0200 [thread overview] Message-ID: <CA+BoTQ=H6Pnm39xxzT+u_kRBDkGujaR3r6gMyTU3V+8cZi0qLw@mail.gmail.com> (raw) In-Reply-To: <20140819082325.16842.18721.stgit@potku.adurom.net> On 19 August 2014 10:23, Kalle Valo <kvalo@qca.qualcomm.com> wrote: > From: Ben Greear <greearb@candelatech.com> > > This can be used to get a useful back trace out of a firmware > crash that involves an interrupt handler. For instance, a > null-pointer-exception would be this kind of trace. A user-space > tool can read the debugfs file and decode things as wished. > > This requires a packaged firmware with a new IE to describe the > BSS section starts and length. > > Signed-off-by: Ben Greear <greearb@candelatech.com> > Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> > --- [...] > +static void ath10k_pci_dump_bss_ram(struct ath10k *ar, > + struct ath10k_fw_crash_data *crash_data) { > + int ret; > + > + lockdep_assert_held(&ar->data_lock); > + > + if (!ar->fw.ram_bss_addr) > + return; > + > + if (!ar->fw.ram_bss_len) > + return; > + > + ret = ath10k_pci_diag_read_mem(ar, ar->fw.ram_bss_addr, > + crash_data->ram_bss_buf, > + ar->fw.ram_bss_len); > + if (ret) > + ath10k_warn("failed to read firmware RAM BSS memory from %d (%d B): %d\n", > + ar->fw.ram_bss_addr, ar->fw.ram_bss_len, ret); > +} > + > +static void ath10k_pci_dump_bss_rom(struct ath10k *ar, > + struct ath10k_fw_crash_data *crash_data) > +{ > + int ret; > + > + lockdep_assert_held(&ar->data_lock); > + > + if (!ar->fw.rom_bss_addr) > + return; > + > + if (!ar->fw.rom_bss_len) > + return; > + > + ret = ath10k_pci_diag_read_mem(ar, ar->fw.rom_bss_addr, > + crash_data->rom_bss_buf, > + ar->fw.rom_bss_len); > + if (ret) > + ath10k_warn("failed to read firmware ROM BSS memory from %d (%d B): %d\n", > + ar->fw.rom_bss_addr, ar->fw.rom_bss_len, ret); > +} Ditto as with other patches - endianess mess. Michał _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2014-08-19 9:39 UTC|newest] Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-19 8:22 [PATCH v7 0/8] ath10k: firmware crash dump Kalle Valo 2014-08-19 8:22 ` Kalle Valo 2014-08-19 8:22 ` [PATCH v7 1/8] ath10k: add ath10k_pci_diag_* helpers Kalle Valo 2014-08-19 8:22 ` Kalle Valo 2014-08-19 8:22 ` [PATCH v7 2/8] ath10k: provide firmware crash info via debugfs Kalle Valo 2014-08-19 8:22 ` Kalle Valo 2014-08-19 9:33 ` Michal Kazior 2014-08-19 9:33 ` Michal Kazior 2014-08-19 15:25 ` Ben Greear 2014-08-19 15:25 ` Ben Greear 2014-08-19 16:05 ` Ben Greear 2014-08-19 16:05 ` Ben Greear 2014-08-20 7:36 ` Kalle Valo 2014-08-20 7:36 ` Kalle Valo 2014-08-20 6:28 ` Michal Kazior 2014-08-20 6:28 ` Michal Kazior 2014-08-20 6:48 ` Kalle Valo 2014-08-20 6:48 ` Kalle Valo 2014-08-20 6:56 ` Kalle Valo 2014-08-20 6:56 ` Kalle Valo 2014-08-20 13:13 ` Ben Greear 2014-08-20 13:13 ` Ben Greear 2014-08-20 7:29 ` Kalle Valo 2014-08-20 7:29 ` Kalle Valo 2014-08-20 13:08 ` Ben Greear 2014-08-20 13:08 ` Ben Greear 2014-08-20 14:19 ` Kalle Valo 2014-08-20 14:19 ` Kalle Valo 2014-08-20 14:52 ` Ben Greear 2014-08-20 14:52 ` Ben Greear 2014-08-19 8:23 ` [PATCH v7 3/8] ath10k: save firmware debug log messages Kalle Valo 2014-08-19 8:23 ` Kalle Valo 2014-08-19 9:39 ` Michal Kazior 2014-08-19 9:39 ` Michal Kazior 2014-08-19 9:44 ` Michal Kazior 2014-08-19 9:44 ` Michal Kazior 2014-08-19 15:16 ` Ben Greear 2014-08-19 15:16 ` Ben Greear 2014-08-19 8:23 ` [PATCH v7 4/8] ath10k: save firmware stack upon firmware crash Kalle Valo 2014-08-19 8:23 ` Kalle Valo 2014-08-19 9:37 ` Michal Kazior 2014-08-19 9:37 ` Michal Kazior 2014-08-19 8:23 ` [PATCH v7 5/8] ath10k: dump exception stack contents on " Kalle Valo 2014-08-19 8:23 ` Kalle Valo 2014-08-19 9:38 ` Michal Kazior 2014-08-19 9:38 ` Michal Kazior 2014-08-19 8:23 ` [PATCH v7 6/8] ath10k: save firmware RAM and ROM BSS sections on crash Kalle Valo 2014-08-19 8:23 ` Kalle Valo 2014-08-19 9:39 ` Michal Kazior [this message] 2014-08-19 9:39 ` Michal Kazior 2014-08-19 8:23 ` [PATCH v7 7/8] ath10k: rename ath10k_pci_hif_dump_area() to ath10k_pci_fw_crashed_dump() Kalle Valo 2014-08-19 8:23 ` Kalle Valo 2014-08-19 8:23 ` [PATCH v7 8/8] ath10k: print more driver info when firmware crashes Kalle Valo 2014-08-19 8:23 ` Kalle Valo
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='CA+BoTQ=H6Pnm39xxzT+u_kRBDkGujaR3r6gMyTU3V+8cZi0qLw@mail.gmail.com' \ --to=michal.kazior@tieto.com \ --cc=ath10k@lists.infradead.org \ --cc=kvalo@qca.qualcomm.com \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.