1
0
Fork 0
Commit Graph

6 Commits (c839682c719f0e3dc851951c9e2eeb8a41cd9609)

Author SHA1 Message Date
Yu Wang 0a7fe71823 ath10k: correct the length of DRAM dump for QCA6174 hw3.x/QCA9377 hw1.1
The length of DRAM dump for QCA6174 hw3.0/hw3.2 and QCA9377 hw1.1
are less than the actual value, some coredump contents are missed.
To fix it, change the length from 0x90000 to 0xa8000.

Fixes: 703f261dd7 ("ath10k: add memory dump support for QCA6174/QCA9377")
Signed-off-by: Yu Wang <yyuwang@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-02-07 16:07:35 +02:00
Kalle Valo 1a8e5c618b ath10k: add memory dump support QCA988X
Copy two regions of registers and bigger DRAM region to the dump file.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-12-27 12:20:49 +02:00
Alan Liu 703f261dd7 ath10k: add memory dump support for QCA6174/QCA9377
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@qca.qualcomm.com>
[kvalo@qca.qualcomm.com: refactoring and cleanup]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-12-27 12:20:41 +02:00
Kalle Valo 5c9d0a2020 ath10k: add coredump_mask module parameter
For memory dump support (it consumes quite a lot of memory) we need to control
what is exactly stored to the crash dump. Add a module parameter call
coredump_mask to do that. It's a bit mask of these values:

enum ath10k_fw_crash_dump_type {
	ATH10K_FW_CRASH_DUMP_REGISTERS = 0,
	ATH10K_FW_CRASH_DUMP_CE_DATA = 1,

	ATH10K_FW_CRASH_DUMP_MAX,
};

For example, if we only want to store CE_DATA we would enable bit 2:

modprobe ath10k_core coredump_mask=0x2

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-12-27 12:20:32 +02:00
Kalle Valo e2fcf60c6f ath10k: detach coredump.c from debug.c
Now coredump is totally separate from debug.c and doesn't depend on
CONFIG_ATH10K_DEBUGFS anymore, only on CONFIG_DEV_COREDUMP. Also remove
leftovers from the removed debugfs file support.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-12-27 12:20:23 +02:00
Kalle Valo f25b9f285a ath10k: refactor firmware crashdump code to coredump.c
In preparation to add RAM dump support. No functional changes, only moving code
and renaming function names.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-12-27 12:20:15 +02:00