Skip to content

Commit

Permalink
arch/x86: honor CONFIG_INIT_STACKS in 64-bit mode
Browse files Browse the repository at this point in the history
Initialize the IRQ stacks with 0xAA bytes when the option is enabled.

Signed-off-by: Charles E. Youse <[email protected]>
  • Loading branch information
Charles E. Youse authored and andrewboie committed Sep 15, 2019
1 parent a926fa0 commit dc0314a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/x86/core/intel64/locore.S
Original file line number Diff line number Diff line change
Expand Up @@ -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. */

Expand Down

0 comments on commit dc0314a

Please sign in to comment.