Marshall Dawson has uploaded this change for review.

View Change

cpu/x86: Align stack in SIPI handler

Ensure the stack is properly aligned in the SIPI handler.

BUG=b:66003093
TEST=boot kahlee built with gcc 6.3

Change-Id: Ibdd8242494c6a2bc0c6ead7ac98be55149219d7c
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
---
M src/cpu/x86/sipi_vector.S
1 file changed, 4 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/21768/1
diff --git a/src/cpu/x86/sipi_vector.S b/src/cpu/x86/sipi_vector.S
index b40ea76..bd60c65 100644
--- a/src/cpu/x86/sipi_vector.S
+++ b/src/cpu/x86/sipi_vector.S
@@ -114,6 +114,8 @@
movl stack_top, %edx
subl %eax, %edx
mov %edx, %esp
+ andl $0xfffffff0, %esp /* ensure stack alignment */
+
/* Save CPU number. */
mov %ecx, %esi

@@ -192,7 +194,8 @@
mov %eax, %cr4
#endif

- /* c_handler(cpu_num) */
+ /* c_handler(cpu_num), preserve proper stack alignment */
+ sub $12, %esp
push %esi /* cpu_num */
mov c_handler, %eax
call *%eax

To view, visit change 21768. To unsubscribe, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdd8242494c6a2bc0c6ead7ac98be55149219d7c
Gerrit-Change-Number: 21768
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com>