162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciconfig DEBUG_TLB_SANITY
462306a36Sopenharmony_ci	bool "Debug TLB sanity"
562306a36Sopenharmony_ci	depends on DEBUG_KERNEL && MMU
662306a36Sopenharmony_ci	help
762306a36Sopenharmony_ci	  Enable this to turn on TLB sanity check on each entry to userspace.
862306a36Sopenharmony_ci	  This check can spot missing TLB invalidation/wrong PTE permissions/
962306a36Sopenharmony_ci	  premature page freeing.
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci	  If unsure, say N.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciconfig LD_NO_RELAX
1462306a36Sopenharmony_ci	bool "Disable linker relaxation"
1562306a36Sopenharmony_ci	default y
1662306a36Sopenharmony_ci	help
1762306a36Sopenharmony_ci	  Enable this function to disable link-time optimizations.
1862306a36Sopenharmony_ci	  The default linker behavior is to combine identical literal
1962306a36Sopenharmony_ci	  values to reduce code size and remove unnecessary overhead from
2062306a36Sopenharmony_ci	  assembler-generated 'longcall' sequences.
2162306a36Sopenharmony_ci	  Enabling this option improves the link time but increases the
2262306a36Sopenharmony_ci	  code size, and possibly execution time.
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ciconfig S32C1I_SELFTEST
2562306a36Sopenharmony_ci	bool "Perform S32C1I instruction self-test at boot"
2662306a36Sopenharmony_ci	default y
2762306a36Sopenharmony_ci	help
2862306a36Sopenharmony_ci	  Enable this option to test S32C1I instruction behavior at boot.
2962306a36Sopenharmony_ci	  Correct operation of this instruction requires some cooperation from hardware
3062306a36Sopenharmony_ci	  external to the processor (such as bus bridge, bus fabric, or memory controller).
3162306a36Sopenharmony_ci	  It is easy to make wrong hardware configuration, this test should catch it early.
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci	  Say 'N' on stable hardware.
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ciconfig PRINT_STACK_DEPTH
3662306a36Sopenharmony_ci	int "Stack depth to print" if DEBUG_KERNEL
3762306a36Sopenharmony_ci	default 64
3862306a36Sopenharmony_ci	help
3962306a36Sopenharmony_ci	  This option allows you to set the stack depth that the kernel
4062306a36Sopenharmony_ci	  prints in stack traces.
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciconfig PRINT_USER_CODE_ON_UNHANDLED_EXCEPTION
4362306a36Sopenharmony_ci	bool "Dump user code around unhandled exception address"
4462306a36Sopenharmony_ci	help
4562306a36Sopenharmony_ci	  Enable this option to display user code around PC of the unhandled
4662306a36Sopenharmony_ci	  exception (starting at address aligned on 16 byte boundary).
4762306a36Sopenharmony_ci	  This may simplify finding faulting code in the absence of other
4862306a36Sopenharmony_ci	  debug facilities.
49