# When adding new entries keep the list in alphabetical order

comment "Samsung Debugging Feature"
menuconfig SEC_DEBUG
	bool "Samsung TN Ramdump Feature"
	default y
	help
	  Samsung TN Ramdump Feature.
	  Enables collection of ram dump.
	  Enables task history, debug level etc.
	  This feature is enabled in defconfig.

if SEC_DEBUG

config SEC_DEBUG_PRINTK_NOCACHE
	bool "Samsung non-cached kernel printk"
	default y
	help
	  Samsung non-cached kernel printk
	  This ensures that printk is never stale
	  which is a good feature when debugging without
	  hardware debuggers. If unsure, keep it turned on.

config SEC_DEBUG_SCHED_LOG
	bool "Samsung Scheduler Logging Feature"
	default n
	help
	  Samsung Scheduler Logging Feature for Debug use.
	  Enables task scheduling history.
	  Enables IRQ scheduling history.
	  This feature is enabled in defconfig.

config SEC_DEBUG_SEMAPHORE_LOG
	bool "Samsung Semaphore Logging Feature"
	default n
	help
	  Samsung Semaphore Logging Feature for Debug use.
	  Enables semaphore debugging statistics.
	  Enables logging.
	  This feature is enabled in defconfig.

config SEC_FILE_LEAK_DEBUG
	bool "Samsung File Leak Debugging Feature"
	default n
	help
	  Samsung File Leak Debugging Feature for Debug use.
	  Enables the forced panic mode when EMFILE Eror occurs.
	  This feature is enabled in defconfig.

config SEC_LOGGER_BUFFER_EXPANSION
	bool "Samsung Logger Buffer Expansion Feature"
	default n
	help
	  This is used to expand buffers of logger.
	  This feature is enabled in defconfig.

config SEC_LOGGER_BUFFER_EXPANSION_SIZE
	int "Samsung Logger Buffer Expansion Size(MB)"
	depends on SEC_LOGGER_BUFFER_EXPANSION
	default 2
	help
	  This is used to expand main buffer of logger(MB).

config SEC_DEBUG_USER
	bool "Panic on Userspace fault"
	default y
	help
	  Panic on Userspace fault
	  This feature enables collection of ram dump,
	  on user fault.
	  Enabled native code debugging.

config SEC_DEBUG_IRQ_EXIT_LOG
	bool "Temporary Logging for IRQ delay"
	default n
	help
	  Verbose Logging for IRQ delay.
	  Helps indetification of irq enter and exit.
	  This is to track the current state of IRQ execution.
	  This is enabled in defconfig file.

config SEC_DEBUG_MSG_LOG
	bool "Message Log for ram dump debug"
	default n
	help
	  Verbose Logging for ram dump analysis.
	  Collects kernel debug log.
	  Log is collected in the no-cache area.
	  This feature is enabled in defconfig.

config SEC_DEBUG_SUMMARY
	bool "Debug summary"
        depends on SEC_DEBUG_SCHED_LOG
	default n
	help
	  Subsystems debug summary feature.
	  When enabled provides kernel logs, modem logs, RPM registers,
	  Schedule and IRQ logs at the time of crash along with the
	  reason for crash, which can be extracted as a html in RAM dump mode.

config SEC_DEBUG_DCVS_LOG
	bool "Temporary Logging for DCVS"
	default n
	help
	  DCVS Logging Feature for Debug use.
	  The ACPU clock rate changes will be logged as a part
	  of secdbg_log structure along with the CPU time stamp.
	  The previous frequency and the new frequency for both the CPU along
	  with the CPU time stamp will be logged.

config SEC_DEBUG_POWER_LOG
	bool "Temporary Logging for MSM POWER"
	default n
	help
	  POWER Logging Feature for Debug use.
	  The power and clock gating will be logged as a part
	  of secdbg_log structure along with the CPU time stamp.

config SEC_DEBUG_FUELGAUGE_LOG
	bool "Temporary Logging for FuelGauge"
	default n
	help
	 FuelGauge Logging Feature for Debug use.
	 The FuelGauge values are logged as a part
	 of secdbg_log structure along with the CPU time stamp.
	 The voltage and soc values along with the CPU time will be logged.

config SEC_DEBUG_LOW_LOG
	bool "Kernel Message Logging for Debug Level Low"
	default n
	help
	 Kernel Message Logging Feature for Debug use.
	 The Kernel Messages are logged using file I/O
	 when an exception occurs, when the debug level is low.
	 The file I/O is added in kernel driver level
	 so that kernel messages are logged on next reboot.

config SEC_DEBUG_MDM_FILE_INFO
	bool "MDM filename and line number in UPLOAD mode"
	default n
	help
	 This feature enables display of MDM info in upload mode.
	 This feature enabled SSR in debug level low.
	 Collects MDM ram dump and then calls panic.
	 UPLOAD mode has MDM dump info to show it on LCD.

config SEC_DEBUG_DOUBLE_FREE
	bool "Enable double free detection"
	default n
	help
	 Detect erraneous codes that frees a kmalloced node
	 twice. When kfree(p) is called, p is not freed right away.
	 Instead, it is pushed into a circular buffer. What it frees
	 is the oldest pointer that was pushed into the buffer.
	 If someone tries to free the same pointer p, *p
	 is read and checked for a magic code that is written
	 when it was first freed. If it matches, the whole
	 circular buffer is searched. Panic is be called when
	 the match is found.

config SEC_DEBUG_FORCE_ERROR
	bool "enable force error"
	default n
	help
	  This option enable to force error by sysfs

config SEC_DEBUG_SEC_WDOG_BITE
	bool "Samsung fore secure bite simulation"
	default n
	depends on QCOM_SCM && SEC_DEBUG_FORCE_ERROR
	help
	  simulation for secure bite.
	  This feature is enabled in defconfig.

config SEC_LOG_LAST_KMSG
	bool "Enable /proc/last_kmsg support: if EMBEDDED"
	default n
	help
	  This option enables /proc/last_kmsg support.

config SEC_DEBUG_NOCACHE_LOG_IN_LEVEL_LOW
	bool "Enable nocache logging in debug level LOW"
	default n
	help
	  Enable nocache logging in debug level LOW.

config SEC_SSR_DEBUG_LEVEL_CHK
	bool "PERIPHERAL SECURE check"
	default n
	help
	  To check the authentication of peripheral image.

config USER_RESET_DEBUG
	bool "reset reason debug feature in user version"
	default n
	help
	  This option provides reset history log in user version.
	  This option enable proc/reset_reason support

config USER_RESET_DEBUG_TEST
	bool "reset reason debug test feature in eng version"
	depends on USER_RESET_DEBUG
	default n
	help
	  This option enable for test in eng version(KP, DP, TP, WP)

config SEC_PERIPHERAL_SECURE_CHK
	bool "PERIPHERAL SECURE check"
	default n
	depends on MSM_PIL
	help
	  This option enables checking the authentication of peripheral image.

config SEC_DEBUG_PWDT
	bool "Platform Watchdog check"
	default n
	help
	  To check Platform Watchdog thread status

endif

config SEC_BOOTSTAT
        bool "Samsung Bootstat Logging Feature"
        default n
        select MSM_BOOT_STATS
        help
          This feature creates a '/proc/bootstat' node and it provides
          timestamp info for debugging booting time.

config SEC_QUEST
	bool "Samsung QUEST Feature"
	default n
	help
	  Samsung QUEST Feature, to test chipset quality

config SEC_QUEST_UEFI
	bool "Samsung QUEST UEFI Feature"
	default n
	help
	  Samsung QUEST UEFI Feature, to test chipset quality	  

config SEC_SKP
	bool "Samsung SKP Feature"
	default n
	help
	  Samsung SKP Feature, to test chipset quality	  	  

choice
	prompt "Version of GAF structure"
	depends on SEC_DEBUG
	default SEC_DEBUG_GAF_V5 if PROCA
	default SEC_DEBUG_GAF_V4

	config SEC_DEBUG_GAF_V4
		bool "Use GAF structure version 4"
		help
		  Default option for kernel without PROCA LSM module.

	config SEC_DEBUG_GAF_V5
		bool "Use GAF structure version 5"
		help
		  Default option for kernel with PROCA LSM module.
endchoice

