Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/27226
Change subject: smm: Push a null stack base pointer ......................................................................
smm: Push a null stack base pointer
When generating a backtrace we need an indicator when we have hit the beginning of the stack. The i386 ABI states that %ebp points to the next stack frame. NULL can be used to indicate the end of the stack.
We could add a NULL return pointer at %ebp+4, but I decided to omit it since a NULL stack pointer can be used as an indicator that there is no return pointer.
BUG=b:80539294 TEST=built and tested on grunt
Change-Id: I8a48114d31a5c716335d264fa4fe4da41dc5bf11 Signed-off-by: Raul E Rangel rrangel@chromium.org --- M src/cpu/x86/smm/smm_stub.S 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/27226/1
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S index 5162c95..3fea32c 100644 --- a/src/cpu/x86/smm/smm_stub.S +++ b/src/cpu/x86/smm/smm_stub.S @@ -135,6 +135,8 @@ movl stack_top, %edx subl %eax, %edx # %edx(stack_top) - %eax(offset) = %edx(stack_top) mov %edx, %esp + + pushl $0x0 # push a NULL stack base pointer mov %esp, %ebp
subl $0x4, %esp # Allocate locals (fxsave)