]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/X64/Cpu.asm
EdkCompatibilityPkg: Remove EdkCompatibilityPkg
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Cpu / Pentium / CpuIA32Lib / X64 / Cpu.asm
diff --git a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/X64/Cpu.asm b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/X64/Cpu.asm
deleted file mode 100644 (file)
index adb0fa7..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-TITLE   Cpu.asm: Assembly code for the x64 resources\r
-\r
-;------------------------------------------------------------------------------\r
-;*\r
-;*   Copyright (c) 2005 - 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
-;*                                                                                             \r
-;*   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-;*   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-;*   \r
-;*   Module Name:\r
-;*\r
-;*    Cpu.asm\r
-;*  \r
-;*   Abstract:\r
-;*  \r
-;------------------------------------------------------------------------------\r
-\r
-text    SEGMENT\r
-\r
\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiHalt (\r
-;    VOID\r
-;    )\r
-;------------------------------------------------------------------------------\r
-EfiHalt PROC    PUBLIC\r
-    hlt\r
-    ret\r
-EfiHalt ENDP\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiWbinvd (\r
-;    VOID\r
-;    )\r
-;------------------------------------------------------------------------------\r
-EfiWbinvd PROC    PUBLIC\r
-    wbinvd\r
-    ret\r
-EfiWbinvd ENDP\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiInvd (\r
-;    VOID\r
-;    )\r
-;------------------------------------------------------------------------------\r
-EfiInvd PROC    PUBLIC\r
-    invd\r
-    ret\r
-EfiInvd ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiCpuid (\r
-;    IN   UINT32              RegisterInEax,          // rcx   \r
-;    OUT  EFI_CPUID_REGISTER  *Reg           OPTIONAL // rdx  \r
-;    )\r
-;------------------------------------------------------------------------------\r
-EfiCpuid PROC   PUBLIC\r
-    push  rbx\r
-    \r
-    mov   r8,   rdx         ; r8 = *Reg\r
-    mov   rax,  rcx         ; RegisterInEax\r
-    cpuid\r
-    cmp   r8,   0\r
-    je    _Exit\r
-    mov   [r8 +  0], eax    ; Reg->RegEax\r
-    mov   [r8 +  4], ebx    ; Reg->RegEbx\r
-    mov   [r8 +  8], ecx    ; Reg->RegEcx\r
-    mov   [r8 + 12], edx    ; Reg->RegEdx\r
-    \r
-_Exit:\r
-    pop   rbx\r
-    ret\r
-EfiCpuid  ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  UINT64\r
-;  EfiReadMsr (\r
-;    IN   UINT32  Index,  // rcx\r
-;    )\r
-;------------------------------------------------------------------------------\r
-EfiReadMsr PROC  PUBLIC \r
-    rdmsr\r
-    sal     rdx, 32   ; edx:eax -> rax\r
-    or      rax, rdx  ; rax = edx:eax\r
-    ret\r
-EfiReadMsr  ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiWriteMsr (\r
-;    IN   UINT32  Index,  // rcx\r
-;    IN   UINT64  Value   // rdx\r
-;    )\r
-;------------------------------------------------------------------------------\r
-EfiWriteMsr PROC   PUBLIC\r
-    mov     rax,  rdx   ; rdx = Value\r
-    sar     rdx,  32    ; convert rdx to edx upper 32-bits    \r
-    wrmsr               ; wrmsr[ecx] result = edx:eax\r
-    ret\r
-EfiWriteMsr  ENDP\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EfiReadTsc (\r
-;   VOID\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiReadTsc PROC    PUBLIC\r
-    rdtsc\r
-    shl     rax, 32\r
-    shrd    rax, rdx, 32\r
-    ret\r
-EfiReadTsc  ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiDisableCache (\r
-;   VOID\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiDisableCache PROC    PUBLIC\r
-; added a check to see if cache is already disabled. If it is, then skip.\r
-    mov   rax, cr0\r
-    and   rax, 060000000h     \r
-    cmp   rax, 0\r
-    jne   @f\r
-    mov   rax, cr0\r
-    or    rax, 060000000h     \r
-    mov   cr0, rax\r
-    wbinvd\r
-@@:\r
-    ret\r
-EfiDisableCache ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiEnableCache (\r
-;   VOID\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiEnableCache PROC    PUBLIC\r
-    wbinvd\r
-    mov   rax, cr0\r
-    and   rax, 09fffffffh         \r
-    mov   cr0, rax\r
-    ret\r
-EfiEnableCache ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EfiGetEflags (\r
-;   VOID\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiGetEflags PROC    PUBLIC\r
-    pushfq\r
-    pop   rax\r
-    ret\r
-EfiGetEflags  ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiDisableInterrupts (\r
-;   VOID\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiDisableInterrupts PROC    PUBLIC\r
-    cli\r
-    ret\r
-EfiDisableInterrupts  ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiEnableInterrupts (\r
-;   VOID\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiEnableInterrupts PROC    PUBLIC\r
-    sti\r
-    ret\r
-EfiEnableInterrupts  ENDP\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiCpuidExt (\r
-;    IN   UINT32              RegisterInEax,\r
-;    IN   UINT32              CacheLevel,\r
-;    OUT  EFI_CPUID_REGISTER  *Regs              \r
-;    )\r
-;------------------------------------------------------------------------------\r
-EfiCpuidExt PROC    PUBLIC\r
-     push   rbx\r
-     mov    rax, rcx          ; rax = RegisterInEax\r
-     mov    rcx, rdx          ; rcx = CacheLevel\r
-     \r
-     cpuid\r
-     mov    [r8 + 0 ],  eax   ; Reg->RegEax\r
-     mov    [r8 + 4 ],  ebx   ; Reg->RegEbx\r
-     mov    [r8 + 8 ],  ecx   ; Reg->RegEcx\r
-     mov    [r8 + 12],  edx   ; Reg->RegEdx\r
-    \r
-     pop rbx\r
-     ret\r
-EfiCpuidExt  ENDP\r
-END\r