[PATCH 5/6] ath10k: add memory dump support for QCA6174/QCA9377
Kalle Valo
kvalo at qca.qualcomm.com
Wed Nov 1 03:49:46 PDT 2017
Kalle Valo <kvalo at qca.qualcomm.com> writes:
> From: Alan Liu <alanliu at qca.qualcomm.com>
>
> Add memory dump to the firmware crash data file which is provided to user space
> via devcoredump interface. This makes it easier for firmware engineers to debug
> firmware crashes.
>
> Due to increased memory consumption the memory dump is disabled by default. To
> enable it make sure that bit 3 is set in coredump_mask module parameter:
>
> modprobe ath10k_core coredump_mask=0xffffffff
>
> When RAMDUMP is enabled a buffer for the dump is allocated with vmalloc during
> device probe. The actual memory layout is different in hardware versions and
> the layouts are defined in coredump.c. The memory is split to regions and, to
> get even finegrained control of what to copy, the region can split to smaller
> sections as not all registers are readable (which could cause the whole system
> to stall).
>
> Signed-off-by: Alan Liu <alanliu at qca.qualcomm.com>
> [kvalo at qca.qualcomm.com: refactoring and cleanup]
> Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
[...]
> + /* To get IRAM dump, the host driver needs to switch target
> + * ram config from DRAM to IRAM.
> + */
> + if (current_region->type == ATH10K_MEM_REGION_TYPE_IRAM1 ||
> + current_region->type == ATH10K_MEM_REGION_TYPE_IRAM2) {
> + shift = current_region->start >> 20;
> +
> + ret = ath10k_pci_set_ram_config(ar, shift);
> + if (!ret) {
> + ath10k_warn(ar, "failed to switch ram config to IRAM for section %s: %d\n",
> + current_region->name, ret);
A colleague noticed that there's a bug here, it should be "if (ret)".
I'll fix that in the next version.
--
Kalle Valo
More information about the ath10k
mailing list