Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arch/arm64/configs/qcom_debug.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_QCOM_DCC=m
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add these debug configs into kernel/configs/debug.config?

Copy link
Author

@jiegan0107 jiegan0107 Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as these are overlay drivers, Shiraz has suggested to have separate debug config file for containing the configs.

Message from thread:
Further what Amit was suggesting that these configs shouldn’t be enabled in the default build.
So this branch can carry a arch/arm64/configs/qcom_debug.config fragment that optionally enables these debug features.

CONFIG_QCOM_DCC_DEV=m
CONFIG_QCOM_MEMORY_DUMP_V2=y
CONFIG_QCOM_MEMORY_DUMP_DEV=m
4 changes: 4 additions & 0 deletions arch/arm64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <asm/tlb.h>
#include <asm/alternative.h>
#include <asm/xen/swiotlb-xen.h>
#include <linux/firmware/qcom/memory_dump.h>

/*
* We need to be able to catch inadvertent references to memstart_addr
Expand Down Expand Up @@ -331,6 +332,9 @@ void __init bootmem_init(void)
* reserved, so do it here.
*/
arch_reserve_crashkernel();
#if defined(CONFIG_QCOM_MEMORY_DUMP_V2)
reserve_memdump_cma();
#endif

memblock_dump_all();
}
Expand Down
16 changes: 16 additions & 0 deletions drivers/firmware/qcom/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,20 @@ config QCOM_QSEECOM_UEFISECAPP
Select Y here to provide access to EFI variables on the aforementioned
platforms.

config QCOM_MEMORY_DUMP_V2
tristate "QCOM Memory Dump V2 Support"
depends on QCOM_TZMEM
depends on CMA
help
This enables memory dump feature. It allows various client
subsystems to register respective dump regions. At the time
of deadlocks or cpu hangs these dump regions are captured to
give a snapshot of the system at the time of the crash.

config QCOM_MEMORY_DUMP_DEV
tristate "QCOM Memory Dump V2 device stub"
depends on QCOM_MEMORY_DUMP_V2
help
Device stub for memory dump V2 driver.

endmenu
2 changes: 2 additions & 0 deletions drivers/firmware/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ qcom-scm-objs += qcom_scm.o qcom_scm-smc.o qcom_scm-legacy.o
obj-$(CONFIG_QCOM_TZMEM) += qcom_tzmem.o
obj-$(CONFIG_QCOM_QSEECOM) += qcom_qseecom.o
obj-$(CONFIG_QCOM_QSEECOM_UEFISECAPP) += qcom_qseecom_uefisecapp.o
obj-$(CONFIG_QCOM_MEMORY_DUMP_V2) += memory_dump_v2.o
obj-$(CONFIG_QCOM_MEMORY_DUMP_DEV) += memory_dump_dev.o
Loading