]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.asm
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / DebugSupportDxe / X64 / AsmFuncs.asm
index 5cc3e52bfe7a29535106f0b109f74ed4842c40e2..b9c32dd2778da36b9476e2b4c08965f95bc172e7 100644 (file)
@@ -1,8 +1,8 @@
 ;/** @file\r
 ;  Low level x64 routines used by the debug support driver.\r
 ;\r
-;  Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
-;  All rights reserved. This program and the accompanying materials\r
+;  Copyright (c) 2007 - 2010, 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
 ;  http://opensource.org/licenses/bsd-license.php\r
@@ -108,19 +108,6 @@ text SEGMENT
 \r
 externdef InterruptDistrubutionHub:near\r
 \r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiWbinvd (\r
-;    VOID\r
-;    )\r
-;\r
-; Abstract: Writeback and invalidate cache\r
-;\r
-EfiWbinvd PROC    PUBLIC\r
-    wbinvd\r
-    ret\r
-EfiWbinvd ENDP\r
-\r
 ;------------------------------------------------------------------------------\r
 ; BOOLEAN\r
 ; FxStorSupport (\r
@@ -144,59 +131,10 @@ FxStorSupport   PROC    PUBLIC
                 ret\r
 FxStorSupport   ENDP\r
 \r
-\r
-;------------------------------------------------------------------------------\r
-; DESCRIPTOR *\r
-; GetIdtr (\r
-;   void\r
-;   )\r
-;\r
-; Abstract: Returns physical address of IDTR\r
-;\r
-GetIdtr         PROC    PUBLIC\r
-                push    rbp\r
-                mov     rbp, rsp\r
-\r
-                sidt    QWORD PTR [rbp - 0ah]\r
-                mov     rax, QWORD PTR [rbp - 8h]\r
-\r
-                mov     rsp, rbp\r
-                pop     rbp\r
-                ret\r
-GetIdtr         ENDP\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-; BOOLEAN\r
-; WriteInterruptFlag (\r
-;   BOOLEAN NewState // rcx\r
-;   )\r
-;\r
-; Abstract: Programs interrupt flag to the requested state and returns previous\r
-;           state.\r
-;\r
-WriteInterruptFlag  PROC PUBLIC\r
-\r
-                pushfq\r
-                pop     rax\r
-                and     rax, 200h\r
-                shr     rax, 9\r
-                cmp     rcx, 0\r
-                jnz     EnableIF\r
-                cli\r
-                ret\r
-EnableIF:\r
-                sti\r
-                ret\r
-\r
-WriteInterruptFlag  ENDP\r
-\r
-\r
-\r
 ;------------------------------------------------------------------------------\r
 ; void\r
 ; Vect2Desc (\r
-;   DESCRIPTOR * DestDesc,  // rcx\r
+;   IA32_IDT_GATE_DESCRIPTOR * DestDesc,  // rcx\r
 ;   void (*Vector) (void)   // rdx\r
 ;   )\r
 ;\r
@@ -358,10 +296,10 @@ ExtraPushDone:
                 mov     rax, [rsp + 24]\r
                 mov     DebugRsp, rax\r
                 mov     rax, AppRsp\r
-                add     rax, 40\r
+                mov     rax, QWORD PTR [rax + 24]\r
                 ; application stack has ss, rsp, rflags, cs, & rip, so\r
-                ; last actual application stack entry is\r
-                ; 40 bytes into the application stack.\r
+                ; last actual application stack entry is saved at offset\r
+                ; 24 bytes from stack top.\r
                 mov     [rsp + 24], rax\r
 \r
 ;; continue building context record\r
@@ -544,7 +482,7 @@ ExtraPushDone:
 \r
                 mov     rbx, [rsp + 24]  ; move the potentially modified AppRsp into rbx\r
                 mov     rax, AppRsp\r
-                add     rax, 40\r
+                mov     rax, QWORD PTR [rax + 24]\r
                 cmp     rbx, rax\r
                 je      NoAppStackMove\r
 \r