;------------------------------------------------------------------------------\r
;\r
-; Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
; This program and the accompanying materials\r
; are licensed and made available under the terms and conditions of the BSD License\r
; which accompanies this distribution. The full text of the license may be found at\r
push rax\r
\r
sub rsp, 512\r
- mov rdi, rsp\r
+ mov rdi, rsp\r
db 0fh, 0aeh, 00000111y ;fxsave [rdi]\r
\r
+ ;; save the exception data\r
+ push qword ptr [rbp + 16]\r
+\r
;; Clear Direction Flag\r
cld\r
\r
mov rdx, rsp ; Structure\r
mov r15, rcx ; save vector in r15\r
\r
- sub rsp, 32\r
+ ;\r
+ ; Per X64 calling convention, allocate maximum parameter stack space\r
+ ; and make sure RSP is 16-byte aligned\r
+ ;\r
+ sub rsp, 32 + 8\r
call InterruptProcess\r
- add rsp, 32\r
+ add rsp, 32 + 8\r
+\r
+ ;; skip the exception data\r
+ add rsp, 8\r
\r
mov rsi, rsp\r
db 0fh, 0aeh, 00001110y ; fxrstor [rsi]\r