From dc0314af7f5f10713ca5664d700deadf136e59e5 Mon Sep 17 00:00:00 2001 From: "Charles E. Youse" Date: Tue, 30 Jul 2019 16:30:53 -0700 Subject: [PATCH] arch/x86: honor CONFIG_INIT_STACKS in 64-bit mode Initialize the IRQ stacks with 0xAA bytes when the option is enabled. Signed-off-by: Charles E. Youse --- arch/x86/core/intel64/locore.S | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/core/intel64/locore.S b/arch/x86/core/intel64/locore.S index 75c00c27ebe..c685c4347bb 100644 --- a/arch/x86/core/intel64/locore.S +++ b/arch/x86/core/intel64/locore.S @@ -92,6 +92,13 @@ __start: movq $__bss_num_qwords, %rcx rep stosq +#ifdef CONFIG_INIT_STACKS + movq $0xAAAAAAAAAAAAAAAA, %rax + movq $ist, %rdi + movq $((CONFIG_ISR_DEPTH*CONFIG_ISR_STACK_SIZE)>>3), %rcx + rep stosq +#endif + #ifdef CONFIG_X86_MULTIBOOT_INFO /* If EBX isn't 0, then we have a valid multiboot info struct. */