From a706ad54446afc418c60776c06e699943ce4bdd5 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Wed, 23 May 2018 01:13:27 +0300 Subject: arch/x86/lapic: Remove second stack poisoning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was already done once in c_start.S. Change-Id: I1cb0ea25251644dbd1127d177247a02ba52bb550 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/30796 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/cpu/x86/lapic/lapic_cpu_init.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c index 0a51a08477..4498b97b1c 100644 --- a/src/cpu/x86/lapic/lapic_cpu_init.c +++ b/src/cpu/x86/lapic/lapic_cpu_init.c @@ -265,11 +265,9 @@ int start_cpu(struct device *cpu) struct cpu_info *info; unsigned long stack_end; unsigned long stack_base; - unsigned long *stack; unsigned long apicid; unsigned int index; unsigned long count; - int i; int result; spin_lock(&start_cpu_lock); @@ -287,10 +285,8 @@ int start_cpu(struct device *cpu) stack_base = ((unsigned long)_estack) - (CONFIG_STACK_SIZE*(index+1)); printk(BIOS_SPEW, "CPU%d: stack_base %p, stack_end %p\n", index, (void *)stack_base, (void *)stack_end); - /* poison the stack */ - for (stack = (void *)stack_base, i = 0; i < CONFIG_STACK_SIZE; i++) - stack[i/sizeof(*stack)] = 0xDEADBEEF; - stacks[index] = stack; + stacks[index] = (void *)stack_base; + /* Record the index and which CPU structure we are using */ info = (struct cpu_info *)stack_end; info->index = index; -- cgit v1.2.3