From 028e18ff3caef6976410c2baefbef954b12d92af Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 23 Jun 2017 11:14:58 -0500 Subject: arch/x86: update assembly to ensure 16-byte alignment into C When the C compiler expects 16-byte alignment of the stack it is at the call instruction. Correct existing call points from assembly to ensure the stacks are aligned to 16 bytes at the call instruction. Change-Id: Icadd7a1f9284e92aecd99c30cb2acb307823682c Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/20314 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/soc/intel/common/block/cpu/car/cache_as_ram.S | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/soc/intel/common/block/cpu/car') diff --git a/src/soc/intel/common/block/cpu/car/cache_as_ram.S b/src/soc/intel/common/block/cpu/car/cache_as_ram.S index 79c5c77d27..94e269446b 100644 --- a/src/soc/intel/common/block/cpu/car/cache_as_ram.S +++ b/src/soc/intel/common/block/cpu/car/cache_as_ram.S @@ -184,6 +184,11 @@ car_init_done: /* Setup bootblock stack */ mov $_car_stack_end, %esp + /* Need to align stack to 16 bytes at call instruction. Account for + the two pushes below. */ + andl $0xfffffff0, %esp + sub $8, %esp + /*push TSC value to stack*/ movd %mm2, %eax pushl %eax /* tsc[63:32] */ -- cgit v1.2.3