Search Linux Wireless

Re: [PATCH v7 6/8] ath10k: save firmware RAM and ROM BSS sections on crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19 August 2014 10:23, Kalle Valo <kvalo@xxxxxxxxxxxxxxxx> wrote:
> From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxx>
> Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxxxx>
> ---
[...]
> +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ł
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux