--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ARShiftU64.asm\r
+;\r
+; Abstract:\r
+;\r
+; 64-bit arithmetic right shift function for IA-32\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathARShiftU64 PROC\r
+ mov cl, [esp + 12]\r
+ mov eax, [esp + 8]\r
+ cdq\r
+ test cl, 32\r
+ cmovz edx, eax\r
+ cmovz eax, [esp + 4]\r
+ shrd eax, edx, cl\r
+ sar edx, cl\r
+ ret\r
+InternalMathARShiftU64 ENDP\r
+\r
+ END
\ No newline at end of file
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ARShiftU64.asm\r
+#\r
+# Abstract:\r
+#\r
+# 64-bit arithmetic right shift function for IA-32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _ARShiftU64\r
+_ARShiftU64: \r
+ movb 12(%esp),%cl\r
+ movl 8(%esp),%eax\r
+ cltd\r
+ testb $32,%cl\r
+# MISMATCH: " cmovz edx, eax"\r
+ cmovz %eax, %edx\r
+# MISMATCH: " cmovz eax, [esp + 4]"\r
+ cmovz 4(%esp), %eax\r
+ shrdl %cl,%edx,%eax\r
+ sar %cl,%edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuBreakpoint.Asm\r
+;\r
+; Abstract:\r
+;\r
+; CpuBreakpoint function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuBreakpoint (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_CpuBreakpoint PROC\r
+ int 3\r
+ ret\r
+_CpuBreakpoint ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# CpuBreakpoint.s\r
+#\r
+# Abstract:\r
+#\r
+# CpuBreakpoint function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuBreakpoint (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _CpuBreakpoint\r
+_CpuBreakpoint: \r
+ int 3\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuFlushTlb.Asm\r
+;\r
+; Abstract:\r
+;\r
+; CpuFlushTlb function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuFlushTlb (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_CpuFlushTlb PROC\r
+ mov eax, cr3\r
+ mov cr3, eax\r
+ ret\r
+_CpuFlushTlb ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# CpuFlushTlb.Asm\r
+#\r
+# Abstract:\r
+#\r
+# CpuFlushTlb function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuFlushTlb (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _CpuFlushTlb\r
+_CpuFlushTlb: \r
+ movl %cr3, %eax\r
+ movl %eax, %cr3\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuId.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmCpuid function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat,C\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmCpuid (\r
+; IN UINT32 RegisterInEax,\r
+; OUT UINT32 *RegisterOutEax OPTIONAL,\r
+; OUT UINT32 *RegisterOutEbx OPTIONAL,\r
+; OUT UINT32 *RegisterOutEcx OPTIONAL,\r
+; OUT UINT32 *RegisterOutEdx OPTIONAL\r
+; )\r
+;------------------------------------------------------------------------------\r
+AsmCpuid PROC USES ebx\r
+ push ebp\r
+ mov ebp, esp\r
+ mov eax, [ebp + 12]\r
+ cpuid\r
+ push ecx\r
+ mov ecx, [ebp + 16]\r
+ jecxz @F\r
+ mov [ecx], eax\r
+@@:\r
+ mov ecx, [ebp + 20]\r
+ jecxz @F\r
+ mov [ecx], ebx\r
+@@:\r
+ mov ecx, [ebp + 24]\r
+ jecxz @F\r
+ pop [ecx]\r
+@@:\r
+ mov ecx, [ebp + 28]\r
+ jecxz @F\r
+ mov [ecx], edx\r
+@@:\r
+ mov eax, [ebp + 12]\r
+ leave\r
+ ret\r
+AsmCpuid ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# CpuId.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmCpuid function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmCpuid (\r
+# IN UINT32 RegisterInEax,\r
+# OUT UINT32 *RegisterOutEax OPTIONAL,\r
+# OUT UINT32 *RegisterOutEbx OPTIONAL,\r
+# OUT UINT32 *RegisterOutEcx OPTIONAL,\r
+# OUT UINT32 *RegisterOutEdx OPTIONAL\r
+# )\r
+#------------------------------------------------------------------------------\r
+.globl _AsmCpuid\r
+_AsmCpuid:\r
+ push %ebx\r
+ push %edi\r
+ movl 12(%esp),%eax\r
+ cpuid\r
+ movl %ecx,%edi\r
+ movl 16(%esp),%ecx\r
+ jecxz L1\r
+ movl %eax,(%ecx)\r
+L1:\r
+ movl 20(%esp),%ecx\r
+ jecxz L2\r
+ movl %ebx,(%ecx)\r
+L2:\r
+ movl 24(%esp),%ecx\r
+ jecxz L3\r
+ movl %edi,(%ecx)\r
+L3:\r
+ movl 28(%esp),%ecx\r
+ jecxz L4\r
+ movl %edx,(%ecx)\r
+L4:\r
+ pop %edi\r
+ pop %ebx\r
+ ret\r
--- /dev/null
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuPause.Asm\r
+;\r
+; Abstract:\r
+;\r
+; CpuPause function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuPause (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_CpuPause PROC\r
+ pause\r
+ ret\r
+_CpuPause ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# CpuPause.Asm\r
+#\r
+# Abstract:\r
+#\r
+# CpuPause function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuPause (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _CpuPause\r
+_CpuPause: \r
+ pause\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuSleep.Asm\r
+;\r
+; Abstract:\r
+;\r
+; CpuSleep function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuSleep (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_CpuSleep PROC\r
+ hlt\r
+ ret\r
+_CpuSleep ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# CpuSleep.Asm\r
+#\r
+# Abstract:\r
+#\r
+# CpuSleep function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuSleep (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _CpuSleep\r
+_CpuSleep: \r
+ hlt\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; DisableInterrupts.Asm\r
+;\r
+; Abstract:\r
+;\r
+; DisableInterrupts function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; DisableInterrupts (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_DisableInterrupts PROC\r
+ cli\r
+ ret\r
+_DisableInterrupts ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# DisableInterrupts.Asm\r
+#\r
+# Abstract:\r
+#\r
+# DisableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# DisableInterrupts (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _DisableInterrupts\r
+_DisableInterrupts: \r
+ cli\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; DisablePaging32.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmDisablePaging32 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86DisablePaging32 (\r
+; IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+; IN VOID *Context1, OPTIONAL\r
+; IN VOID *Context2, OPTIONAL\r
+; IN VOID *NewStack\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalX86DisablePaging32 PROC\r
+ mov ebx, [esp + 4]\r
+ mov ecx, [esp + 8]\r
+ mov edx, [esp + 12]\r
+ pushfd\r
+ pop edi\r
+ cli\r
+ mov eax, cr0\r
+ btr eax, 31\r
+ mov esp, [esp + 16]\r
+ mov cr0, eax\r
+ push edi\r
+ popfd\r
+ push edx\r
+ push ecx\r
+ call ebx\r
+ jmp $\r
+InternalX86DisablePaging32 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# DisablePaging32.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmDisablePaging32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmDisablePaging32 (\r
+# IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+# IN VOID *Context1, OPTIONAL\r
+# IN VOID *Context2, OPTIONAL\r
+# IN VOID *NewStack\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmDisablePaging32\r
+_AsmDisablePaging32: \r
+ movl 4(%esp),%ebx\r
+ movl 8(%esp),%ecx\r
+ movl 12(%esp),%edx\r
+ pushfl\r
+ popl %edi\r
+ cli\r
+ movl %cr0, %eax\r
+ btrl $31,%eax\r
+ movl 16(%esp),%esp\r
+ movl %eax, %cr0\r
+ pushl %edi\r
+ popfl\r
+ pushl %edx\r
+ pushl %ecx\r
+ call *%ebx\r
+ jmp .\r
+\r
+\r
+\r
--- /dev/null
+/** @file\r
+ Integer division worker functions for Ia32.\r
+\r
+ Copyright (c) 2006, Intel Corporation<BR>\r
+ All rights reserved. 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: DivS64x64Remainder.c\r
+\r
+**/\r
+\r
+#include "../BaseLibInternals.h"\r
+\r
+INT64\r
+EFIAPI\r
+InternalMathDivRemS64x64 (\r
+ IN INT64 Dividend,\r
+ IN INT64 Divisor,\r
+ OUT INT64 *Remainder\r
+ )\r
+{\r
+ INT64 Quot;\r
+\r
+ Quot = InternalMathDivRemU64x64 (\r
+ Dividend >= 0 ? Dividend : -Dividend,\r
+ Divisor >= 0 ? Divisor : -Divisor,\r
+ (UINT64 *) Remainder\r
+ );\r
+ if (Remainder != NULL && Dividend < 0) {\r
+ *Remainder = -*Remainder;\r
+ }\r
+ return (Dividend ^ Divisor) >= 0 ? Quot : -Quot;\r
+}\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; DivU64x32.asm\r
+;\r
+; Abstract:\r
+;\r
+; Calculate the quotient of a 64-bit integer by a 32-bit integer\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathDivU64x32 PROC\r
+ mov eax, [esp + 8]\r
+ mov ecx, [esp + 12]\r
+ xor edx, edx\r
+ div ecx\r
+ push eax\r
+ mov eax, [esp + 8]\r
+ div ecx\r
+ pop edx\r
+ ret\r
+InternalMathDivU64x32 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# DivU64x32.asm\r
+#\r
+# Abstract:\r
+#\r
+# Calculate the quotient of a 64-bit integer by a 32-bit integer\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _DivU64x32\r
+_DivU64x32: \r
+ movl 8(%esp),%eax\r
+ movl 12(%esp),%ecx\r
+ xorl %edx,%edx\r
+ divl %ecx\r
+ pushl %eax\r
+ movl 8(%esp),%eax\r
+ divl %ecx\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; DivError.asm\r
+;\r
+; Abstract:\r
+;\r
+; Set error flag for all division functions\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathDivRemU64x32 PROC\r
+ mov ecx, [esp + 12]\r
+ mov eax, [esp + 8]\r
+ xor edx, edx\r
+ div ecx\r
+ push eax\r
+ mov eax, [esp + 8]\r
+ div ecx\r
+ mov ecx, [esp + 20]\r
+ jecxz @F\r
+ mov [ecx], edx\r
+@@:\r
+ pop edx\r
+ ret\r
+InternalMathDivRemU64x32 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# DivError.asm\r
+#\r
+# Abstract:\r
+#\r
+# Set error flag for all division functions\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _InternalMathDivRemU64x32\r
+_InternalMathDivRemU64x32: \r
+ movl 12(%esp),%ecx\r
+ movl 8(%esp),%eax\r
+ xorl %edx,%edx\r
+ divl %ecx\r
+ pushl %eax\r
+ movl 8(%esp),%eax\r
+ divl %ecx\r
+ movl 20(%esp),%ecx\r
+ jecxz L1\r
+ movl %edx,(%ecx)\r
+L1: \r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; DivU64x64Remainder.asm\r
+;\r
+; Abstract:\r
+;\r
+; Calculate the quotient of a 64-bit integer by a 64-bit integer and returns\r
+; both the quotient and the remainder\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+EXTERN InternalMathDivRemU64x32:PROC\r
+\r
+InternalMathDivRemU64x64 PROC\r
+ mov ecx, [esp + 16]\r
+ test ecx, ecx\r
+ jnz _@DivRemU64x64\r
+ mov ecx, [esp + 20]\r
+ jecxz @F\r
+ and dword ptr [ecx + 4], 0\r
+ mov [esp + 16], ecx\r
+@@:\r
+ jmp InternalMathDivRemU64x32\r
+InternalMathDivRemU64x64 ENDP\r
+\r
+_@DivRemU64x64 PROC USES ebx esi edi\r
+ mov edx, dword ptr [esp + 20]\r
+ mov eax, dword ptr [esp + 16]\r
+ mov edi, edx\r
+ mov esi, eax\r
+ mov ebx, dword ptr [esp + 24]\r
+@@:\r
+ shr edx, 1\r
+ rcr eax, 1\r
+ shrd ebx, ecx, 1\r
+ shr ecx, 1\r
+ jnz @B\r
+ div ebx\r
+ mov ebx, eax\r
+ mov ecx, [esp + 28]\r
+ mul dword ptr [esp + 24]\r
+ imul ecx, ebx\r
+ add edx, ecx\r
+ mov ecx, dword ptr [esp + 32]\r
+ jc @TooLarge\r
+ cmp edi, edx\r
+ ja @Correct\r
+ jb @TooLarge\r
+ cmp esi, eax\r
+ jae @Correct\r
+@TooLarge:\r
+ dec ebx\r
+ jecxz @Return\r
+ sub eax, dword ptr [esp + 24]\r
+ sbb edx, dword ptr [esp + 28]\r
+@Correct:\r
+ jecxz @Return\r
+ sub esi, eax\r
+ sbb edi, edx\r
+ mov [ecx], esi\r
+ mov [ecx + 4], edi\r
+@Return:\r
+ mov eax, ebx\r
+ xor edx, edx\r
+ ret\r
+_@DivRemU64x64 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# DivU64x64Remainder.asm\r
+#\r
+# Abstract:\r
+#\r
+# Calculate the quotient of a 64-bit integer by a 64-bit integer and returns\r
+# both the quotient and the remainder\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.extern _InternalMathDivRemU64x32\r
+\r
+.global _InternalMathDivRemU64x64\r
+_InternalMathDivRemU64x64: \r
+ movl 16(%esp),%ecx\r
+ testl %ecx,%ecx\r
+ jnz _DivRemU64x64\r
+ movl 20(%esp),%ecx\r
+ jecxz L1\r
+ and $0,4(%ecx)\r
+ movl %ecx,16(%esp)\r
+L1: \r
+ jmp _InternalMathDivRemU64x32\r
+\r
+\r
+.global DivRemU64x64\r
+DivRemU64x64:\r
+# MISMATCH: "DivRemU64x64: USES ebx esi edi"\r
+ push %ebx \r
+ push %esi \r
+ push %edi \r
+ mov 20(%esp), %edx\r
+ mov 16(%esp), %eax\r
+ movl %edx,%edi\r
+ movl %eax,%esi\r
+ mov 24(%esp), %ebx\r
+L2: \r
+ shrl %edx\r
+ rcrl $1,%eax\r
+ shrdl $1,%ecx,%ebx\r
+ shrl %ecx\r
+ jnz L2\r
+ divl %ebx\r
+ movl %eax,%ebx\r
+ movl 28(%esp),%ecx\r
+ mull 24(%esp)\r
+ imull %ebx,%ecx\r
+ addl %ecx,%edx\r
+ mov 32(%esp), %ecx\r
+ jc TooLarge\r
+ cmpl %edx,%edi\r
+ ja Correct\r
+ jb TooLarge\r
+ cmpl %eax,%esi\r
+ jae Correct\r
+TooLarge: \r
+ decl %ebx\r
+ jecxz Return\r
+ sub 24(%esp), %eax\r
+ sbb 28(%esp), %edx\r
+Correct: \r
+ jecxz Return\r
+ subl %eax,%esi\r
+ sbbl %edx,%edi\r
+ movl %esi,(%ecx)\r
+ movl %edi,4(%ecx)\r
+Return: \r
+ movl %ebx,%eax\r
+ xorl %edx,%edx\r
+ push %edi \r
+ push %esi \r
+ push %ebx \r
+ ret\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; EnableDisableInterrupts.Asm\r
+;\r
+; Abstract:\r
+;\r
+; EnableDisableInterrupts function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; EnableDisableInterrupts (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_EnableDisableInterrupts PROC\r
+ sti\r
+ cli\r
+ ret\r
+_EnableDisableInterrupts ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# EnableDisableInterrupts.Asm\r
+#\r
+# Abstract:\r
+#\r
+# EnableDisableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# EnableDisableInterrupts (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _EnableDisableInterrupts\r
+_EnableDisableInterrupts: \r
+ sti\r
+ cli\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; EnableInterrupts.Asm\r
+;\r
+; Abstract:\r
+;\r
+; EnableInterrupts function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; EnableInterrupts (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_EnableInterrupts PROC\r
+ sti\r
+ ret\r
+_EnableInterrupts ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# EnableInterrupts.Asm\r
+#\r
+# Abstract:\r
+#\r
+# EnableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# EnableInterrupts (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _EnableInterrupts\r
+_EnableInterrupts: \r
+ sti\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; EnablePaging32.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmEnablePaging32 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86EnablePaging32 (\r
+; IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+; IN VOID *Context1, OPTIONAL\r
+; IN VOID *Context2, OPTIONAL\r
+; IN VOID *NewStack\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalX86EnablePaging32 PROC\r
+ mov ebx, [esp + 4]\r
+ mov ecx, [esp + 8]\r
+ mov edx, [esp + 12]\r
+ pushfd\r
+ pop edi\r
+ cli\r
+ mov eax, cr0\r
+ bts eax, 31\r
+ mov esp, [esp + 16]\r
+ mov cr0, eax\r
+ push edi\r
+ popfd\r
+ push edx\r
+ push ecx\r
+ call ebx\r
+ jmp $\r
+InternalX86EnablePaging32 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# EnablePaging32.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmEnablePaging32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmEnablePaging32 (\r
+# IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+# IN VOID *Context1, OPTIONAL\r
+# IN VOID *Context2, OPTIONAL\r
+# IN VOID *NewStack\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmEnablePaging32\r
+_AsmEnablePaging32: \r
+ movl 4(%esp),%ebx\r
+ movl 8(%esp),%ecx\r
+ movl 12(%esp),%edx\r
+ pushfl\r
+ popl %edi\r
+ cli\r
+ movl %cr0, %eax\r
+ btsl $31,%eax\r
+ movl 16(%esp),%esp\r
+ movl %eax, %cr0\r
+ pushl %edi\r
+ popfl\r
+ pushl %edx\r
+ pushl %ecx\r
+ call *%ebx\r
+ jmp .\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; EnablePaging64.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmEnablePaging64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686p\r
+ .model flat,C\r
+ .code\r
+\r
+InternalX86EnablePaging64 PROC\r
+ cli\r
+ mov [esp], @F ; offset for far retf\r
+ mov eax, cr4\r
+ or al, (1 SHL 5)\r
+ mov cr4, eax ; enable PAE\r
+ mov ecx, 0c0000080h\r
+ rdmsr\r
+ or ah, 1 ; set LME\r
+ wrmsr\r
+ mov eax, cr0\r
+ bts eax, 31\r
+ mov cr0, eax ; enable paging\r
+ retf\r
+@@: ; long mode starts here\r
+ DB 67h, 48h\r
+ mov ebx, [esp] ; mov rbx, [esp]\r
+ DB 67h, 48h\r
+ mov ecx, [esp + 8] ; mov rcx, [esp + 8]\r
+ DB 67h, 48h\r
+ mov edx, [esp + 10h] ; mov rdx, [esp + 10h]\r
+ DB 67h, 48h\r
+ mov esp, [esp + 18h] ; mov rsp, [esp + 18h]\r
+ DB 48h\r
+ add esp, -20h ; add rsp, -20h\r
+ call ebx ; call rbx\r
+ jmp $\r
+InternalX86EnablePaging64 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# EnablePaging64.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmEnablePaging64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+ \r
+ #.MODEL flat\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmEnablePaging64 (\r
+# IN UINT16 CodeSelector,\r
+# IN UINT64 EntryPoint,\r
+# IN UINT64 Context1, OPTIONAL\r
+# IN UINT64 Context2, OPTIONAL\r
+# IN UINT64 NewStack\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmEnablePaging64\r
+_AsmEnablePaging64:\r
+ cli\r
+ movl $$LongStart, (%esp)\r
+ movl %cr4, %eax\r
+ orb $0x20, %al\r
+ movl %eax, %cr4 # enable PAE\r
+ movl $0xc0000080, %ecx\r
+ rdmsr\r
+ orb $1, %ah # set LME\r
+ wrmsr\r
+ movl %cr0, %eax\r
+ btsl $31, %eax\r
+ movl %eax, %cr0 # enable paging\r
+ lret\r
+LongStart: # long mode starts here\r
+ .byte 0x67,0x48\r
+ movl (%esp), %ebx # mov rbx, [esp]\r
+ .byte 0x67,0x48\r
+ movl 8(%esp), %ecx # mov rcx, [esp + 8]\r
+ .byte 0x67,0x48\r
+ movl 0x10(%esp), %edx # mov rdx, [esp + 10h]\r
+ .byte 0x67,0x48\r
+ movl 0x18(%esp), %esp # mov rsp, [esp + 18h]\r
+ .byte 0x48\r
+ addl $0x-20, %esp # add rsp, -20h\r
+ call *%ebx # call rbx\r
+ jmp .\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; FlushCacheLine.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmFlushCacheLine function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmFlushCacheLine (\r
+; IN VOID *LinearAddress\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmFlushCacheLine PROC\r
+ mov eax, [esp + 4]\r
+ clflush [eax]\r
+ ret\r
+_AsmFlushCacheLine ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# FlushCacheLine.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmFlushCacheLine function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmFlushCacheLine (\r
+# IN VOID *LinearAddress\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmFlushCacheLine\r
+_AsmFlushCacheLine: \r
+ movl 4(%esp),%eax\r
+ clflush (%eax)\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; FxRestore.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmFxRestore function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat,C\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86FxRestore (\r
+; IN CONST IA32_FX_BUFFER *Buffer\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalX86FxRestore PROC\r
+ mov eax, [esp + 4]\r
+ fxrstor [eax]\r
+ ret\r
+InternalX86FxRestore ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# FxRestore.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmFxRestore function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmFxRestore (\r
+# IN CONST IA32_FX_BUFFER *Buffer\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmFxRestore\r
+_AsmFxRestore: \r
+ movl 4(%esp),%eax\r
+ fxrstor (%eax)\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; FxSave.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmFxSave function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat,C\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86FxSave (\r
+; OUT IA32_FX_BUFFER *Buffer\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalX86FxSave PROC\r
+ mov eax, [esp + 4]\r
+ fxsave [eax]\r
+ ret\r
+InternalX86FxSave ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# FxSave.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmFxSave function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmFxSave (\r
+# OUT IA32_FX_BUFFER *Buffer\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmFxSave\r
+_AsmFxSave: \r
+ movl 4(%esp),%eax\r
+ fxsave (%eax)\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; InterlockedCompareExchange32.Asm\r
+;\r
+; Abstract:\r
+;\r
+; InterlockedCompareExchange32 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .486\r
+ .model flat,C\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; InterlockedCompareExchange32 (\r
+; IN UINT32 *Value,\r
+; IN UINT32 CompareValue,\r
+; IN UINT32 ExchangeValue\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalSyncCompareExchange32 PROC\r
+ mov ecx, [esp + 4]\r
+ mov eax, [esp + 8]\r
+ mov edx, [esp + 12]\r
+ lock cmpxchg [ecx], edx\r
+ ret\r
+InternalSyncCompareExchange32 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# InterlockedCompareExchange32.Asm\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedCompareExchange32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID *\r
+# EFIAPI\r
+# InterlockedCompareExchangePointer (\r
+# IN VOID **Value,\r
+# IN VOID *CompareValue,\r
+# IN VOID *ExchangeValue\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _InterlockedCompareExchangePointer\r
+_InterlockedCompareExchangePointer: \r
+ #\r
+ # InterlockedCompareExchangePointer() shares the same code as\r
+ # InterlockedCompareExchange32() on IA32 and thus no code inside this\r
+ # function\r
+ #\r
+\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InterlockedCompareExchange32 (\r
+# IN UINT32 *Value,\r
+# IN UINT32 CompareValue,\r
+# IN UINT32 ExchangeValue\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _InterlockedCompareExchange32\r
+_InterlockedCompareExchange32: \r
+ movl 4(%esp),%ecx\r
+ movl 8(%esp),%eax\r
+ movl 12(%esp),%edx\r
+ lock cmpxchgl %edx,(%ecx)\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; InterlockedCompareExchange64.Asm\r
+;\r
+; Abstract:\r
+;\r
+; InterlockedCompareExchange64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat,C\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InterlockedCompareExchange64 (\r
+; IN UINT64 *Value,\r
+; IN UINT64 CompareValue,\r
+; IN UINT64 ExchangeValue\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalSyncCompareExchange64 PROC USES esi ebx\r
+ mov esi, [esp + 12]\r
+ mov eax, [esp + 16]\r
+ mov edx, [esp + 20]\r
+ mov ebx, [esp + 24]\r
+ mov ecx, [esp + 28]\r
+ lock cmpxchg8b qword ptr [esi]\r
+ ret\r
+InternalSyncCompareExchange64 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# InterlockedCompareExchange64.Asm\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedCompareExchange64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# InterlockedCompareExchange64 (\r
+# IN UINT64 *Value,\r
+# IN UINT64 CompareValue,\r
+# IN UINT64 ExchangeValue\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _InterlockedCompareExchange64\r
+ push %esi\r
+ push %ebx\r
+ movl 12(%esp),%esi\r
+ movl 16(%esp),%eax\r
+ movl 20(%esp),%edx\r
+ movl 24(%esp),%ebx\r
+ movl 28(%esp),%ecx\r
+ lock \r
+ cmpxchg8b (%esi)\r
+ pop %ebx\r
+ pop %esi\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; InterlockedDecrement.Asm\r
+;\r
+; Abstract:\r
+;\r
+; InterlockedDecrement function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; InterlockedDecrement (\r
+; IN UINT32 *Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalSyncDecrement PROC\r
+ mov eax, [esp + 4]\r
+ lock dec dword ptr [eax]\r
+ mov eax, [eax]\r
+ ret\r
+InternalSyncDecrement ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# InterlockedDecrement.Asm\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedDecrement function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InterlockedDecrement (\r
+# IN UINT32 *Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _InterlockedDecrement\r
+_InterlockedDecrement: \r
+ movl 4(%esp),%eax\r
+ lock \r
+ decl (%eax)\r
+ movl (%eax),%eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; InterlockedIncrement.Asm\r
+;\r
+; Abstract:\r
+;\r
+; InterlockedIncrement function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; InterlockedIncrement (\r
+; IN UINT32 *Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalSyncIncrement PROC\r
+ mov eax, [esp + 4]\r
+ lock inc dword ptr [eax]\r
+ mov eax, [eax]\r
+ ret\r
+InternalSyncIncrement ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# InterlockedIncrement.Asm\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedIncrement function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InterlockedIncrement (\r
+# IN UINT32 *Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _InterlockedIncrement\r
+_InterlockedIncrement: \r
+ movl 4(%esp),%eax\r
+ lock \r
+ incl (%eax)\r
+ movl (%eax),%eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; Invd.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmInvd function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .486p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmInvd (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmInvd PROC\r
+ invd\r
+ ret\r
+_AsmInvd ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# Invd.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmInvd function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmInvd (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmInvd\r
+_AsmInvd: \r
+ invd\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; LRotU64.asm\r
+;\r
+; Abstract:\r
+;\r
+; 64-bit left rotation for Ia32\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathLRotU64 PROC USES ebx\r
+ mov cl, [esp + 16]\r
+ mov edx, [esp + 12]\r
+ mov eax, [esp + 8]\r
+ shld ebx, edx, cl\r
+ shld edx, eax, cl\r
+ ror ebx, cl\r
+ shld eax, ebx, cl\r
+ test cl, 32\r
+ cmovnz ecx, eax\r
+ cmovnz eax, edx\r
+ cmovnz edx, ecx\r
+ ret\r
+InternalMathLRotU64 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# LRotU64.asm\r
+#\r
+# Abstract:\r
+#\r
+# 64-bit left rotation for Ia32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _LRotU64\r
+ push %ebx\r
+ movb 16(%esp),%cl\r
+ movl 12(%esp),%edx\r
+ movl 8(%esp),%eax\r
+ shldl %cl,%edx,%ebx\r
+ shldl %cl,%eax,%edx\r
+ rorl %cl,%ebx\r
+ shldl %cl,%ebx,%eax\r
+ testb $32,%cl\r
+ cmovnz %eax, %ecx\r
+ cmovnz %edx, %eax \r
+ cmovnz %ecx, %edx\r
+ pop %ebx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; LShiftU64.asm\r
+;\r
+; Abstract:\r
+;\r
+; 64-bit left shift function for IA-32\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathLShiftU64 PROC\r
+ mov cl, [esp + 12]\r
+ xor eax, eax\r
+ mov edx, [esp + 4]\r
+ test cl, 32\r
+ cmovz eax, edx\r
+ cmovz edx, [esp + 8]\r
+ shld edx, eax, cl\r
+ shl eax, cl\r
+ ret\r
+InternalMathLShiftU64 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# LShiftU64.asm\r
+#\r
+# Abstract:\r
+#\r
+# 64-bit left shift function for IA-32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _LShiftU64\r
+_LShiftU64: \r
+ movb 12(%esp),%cl\r
+ xorl %eax,%eax\r
+ movl 4(%esp),%edx\r
+ testb $32,%cl\r
+ cmovz %edx, %eax\r
+ cmovz 8(%esp), %edx\r
+ shldl %cl,%eax,%edx\r
+ shll %cl,%eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; LongJump.Asm\r
+;\r
+; Abstract:\r
+;\r
+; Implementation of LongJump() on IA-32.\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+_LongJump PROC\r
+ pop eax\r
+ pop edx\r
+ pop eax\r
+ mov ebx, [edx]\r
+ mov esi, [edx + 4]\r
+ mov edi, [edx + 8]\r
+ mov ebp, [edx + 12]\r
+ mov esp, [edx + 16]\r
+ jmp dword ptr [edx + 20]\r
+_LongJump ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# LongJump.Asm\r
+#\r
+# Abstract:\r
+#\r
+# Implementation of LongJump() on IA-32.\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _LongJump\r
+_LongJump: \r
+ popl %eax\r
+ popl %edx\r
+ popl %eax\r
+ movl (%edx),%ebx\r
+ movl 4(%edx),%esi\r
+ movl 8(%edx),%edi\r
+ movl 12(%edx),%ebp\r
+ movl 16(%edx),%esp\r
+ jmpl *20(%edx)\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; DivU64x32.asm\r
+;\r
+; Abstract:\r
+;\r
+; Calculate the remainder of a 64-bit integer by a 32-bit integer\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathModU64x32 PROC\r
+ mov eax, [esp + 8]\r
+ mov ecx, [esp + 12]\r
+ xor edx, edx\r
+ div ecx\r
+ mov eax, [esp + 4]\r
+ div ecx\r
+ mov eax, edx\r
+ ret\r
+InternalMathModU64x32 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# DivU64x32.asm\r
+#\r
+# Abstract:\r
+#\r
+# Calculate the remainder of a 64-bit integer by a 32-bit integer\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _ModU64x32\r
+_ModU64x32: \r
+ movl 8(%esp),%eax\r
+ movl 12(%esp),%ecx\r
+ xorl %edx,%edx\r
+ divl %ecx\r
+ movl 4(%esp),%eax\r
+ divl %ecx\r
+ movl %edx,%eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; Monitor.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmMonitor function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmMonitor (\r
+; IN UINTN Eax,\r
+; IN UINTN Ecx,\r
+; IN UINTN Edx\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmMonitor PROC\r
+ mov eax, [esp + 4]\r
+ mov ecx, [esp + 8]\r
+ mov edx, [esp + 12]\r
+ DB 0fh, 1, 0c8h\r
+ ret\r
+_AsmMonitor ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# Monitor.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmMonitor function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmMonitor (\r
+# IN UINTN Eax,\r
+# IN UINTN Ecx,\r
+# IN UINTN Edx\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmMonitor\r
+_AsmMonitor: \r
+ movl 4(%esp),%eax\r
+ movl 8(%esp),%ecx\r
+ movl 12(%esp),%edx\r
+ monitor %eax,%ecx,%edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; MultU64x32.asm\r
+;\r
+; Abstract:\r
+;\r
+; Calculate the product of a 64-bit integer and a 32-bit integer\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathMultU64x32 PROC\r
+ mov ecx, [esp + 12]\r
+ mov eax, ecx\r
+ imul ecx, [esp + 8]\r
+ mul dword ptr [esp + 4]\r
+ add edx, ecx\r
+ ret\r
+InternalMathMultU64x32 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# MultU64x32.asm\r
+#\r
+# Abstract:\r
+#\r
+# Calculate the product of a 64-bit integer and a 32-bit integer\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _MultU64x32\r
+_MultU64x32: \r
+ movl 12(%esp),%ecx\r
+ movl %ecx,%eax\r
+ imull 8(%esp),%ecx\r
+ mull 4(%esp)\r
+ addl %ecx,%edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; MultU64x64.asm\r
+;\r
+; Abstract:\r
+;\r
+; Calculate the product of a 64-bit integer and another 64-bit integer\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathMultU64x64 PROC USES ebx\r
+ mov ebx, [esp + 8]\r
+ mov edx, [esp + 16]\r
+ mov ecx, ebx\r
+ mov eax, edx\r
+ imul ebx, [esp + 20]\r
+ imul edx, [esp + 12]\r
+ add ebx, edx\r
+ mul ecx\r
+ add edx, ebx\r
+ ret\r
+InternalMathMultU64x64 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# MultU64x64.asm\r
+#\r
+# Abstract:\r
+#\r
+# Calculate the product of a 64-bit integer and another 64-bit integer\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _MultS64x64\r
+_MultS64x64: \r
+ #\r
+ # MultS64x32 shares the same implementation with _MultU64x32, and thus no\r
+ # code inside this function.\r
+ #\r
+\r
+\r
+.global _MultU64x64\r
+ push %ebx\r
+ movl 8(%esp),%ebx\r
+ movl 16(%esp),%edx\r
+ movl %ebx,%ecx\r
+ movl %edx,%eax\r
+ imull 20(%esp),%ebx\r
+ imull 12(%esp),%edx\r
+ addl %edx,%ebx\r
+ mull %ecx\r
+ addl %ebx,%edx\r
+ pop %ebx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; Mwait.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmMwait function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmMwait (\r
+; IN UINTN Eax,\r
+; IN UINTN Ecx\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmMwait PROC\r
+ mov eax, [esp + 4]\r
+ mov ecx, [esp + 8]\r
+ DB 0fh, 1, 0c9h\r
+ ret\r
+_AsmMwait ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# Mwait.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmMwait function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmMwait (\r
+# IN UINTN Eax,\r
+# IN UINTN Ecx\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmMwait\r
+_AsmMwait: \r
+ movl 4(%esp),%eax\r
+ movl 8(%esp),%ecx\r
+ mwait %eax,%ecx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+/** @file\r
+ Non-existing BaseLib functions on Ia32\r
+\r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. 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: Non-existing.c\r
+\r
+**/\r
+\r
+#include "../BaseLibInternals.h"\r
+\r
+VOID\r
+EFIAPI\r
+InternalX86DisablePaging64 (\r
+ IN UINT16 CodeSelector,\r
+ IN UINT32 EntryPoint,\r
+ IN UINT32 Context1, OPTIONAL\r
+ IN UINT32 Context2, OPTIONAL\r
+ IN UINT32 NewStack\r
+ )\r
+{\r
+ ASSERT (FALSE);\r
+}\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; RRotU64.asm\r
+;\r
+; Abstract:\r
+;\r
+; 64-bit right rotation for Ia32\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathRRotU64 PROC USES ebx\r
+ mov cl, [esp + 16]\r
+ mov eax, [esp + 8]\r
+ mov edx, [esp + 12]\r
+ shrd ebx, eax, cl\r
+ shrd eax, edx, cl\r
+ rol ebx, cl\r
+ shrd edx, ebx, cl\r
+ test cl, 32\r
+ cmovnz ecx, eax\r
+ cmovnz eax, edx\r
+ cmovnz edx, ecx\r
+ ret\r
+InternalMathRRotU64 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# RRotU64.asm\r
+#\r
+# Abstract:\r
+#\r
+# 64-bit right rotation for Ia32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _RRotU64\r
+ push %ebx\r
+ movb 16(%esp),%cl\r
+ movl 8(%esp),%eax\r
+ movl 12(%esp),%edx\r
+ shrdl %cl,%eax,%ebx\r
+ shrdl %cl,%edx,%eax\r
+ roll %cl,%ebx\r
+ shrdl %cl,%ebx,%edx\r
+ testb $32,%cl\r
+ cmovnz %eax, %ecx\r
+ cmovnz %edx, %eax\r
+ cmovnz %ecx, %edx\r
+ pop %ebx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; RShiftU64.asm\r
+;\r
+; Abstract:\r
+;\r
+; 64-bit logical right shift function for IA-32\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathRShiftU64 PROC\r
+ mov cl, [esp + 12]\r
+ xor edx, edx\r
+ mov eax, [esp + 8]\r
+ test cl, 32\r
+ cmovz edx, eax\r
+ cmovz eax, [esp + 4]\r
+ shrd eax, edx, cl\r
+ shr edx, cl\r
+ ret\r
+InternalMathRShiftU64 ENDP\r
+\r
+ END
\ No newline at end of file
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# RShiftU64.asm\r
+#\r
+# Abstract:\r
+#\r
+# 64-bit logical right shift function for IA-32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _RShiftU64\r
+_RShiftU64: \r
+ movb 12(%esp),%cl\r
+ xorl %edx,%edx\r
+ movl 8(%esp),%eax\r
+ testb $32,%cl\r
+ cmovz %eax, %edx\r
+ cmovz 4(%esp), %eax\r
+ shrdl %cl,%edx,%eax\r
+ shrl %cl,%edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadCr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadCr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr0 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadCr0 PROC\r
+ mov eax, cr0\r
+ ret\r
+_AsmReadCr0 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadCr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadCr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr0 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadCr0\r
+_AsmReadCr0: \r
+ movl %cr0, %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadCr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadCr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr2 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadCr2 PROC\r
+ mov eax, cr2\r
+ ret\r
+_AsmReadCr2 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadCr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadCr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr2 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadCr2\r
+_AsmReadCr2: \r
+ movl %cr2, %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadCr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadCr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr3 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadCr3 PROC\r
+ mov eax, cr3\r
+ ret\r
+_AsmReadCr3 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadCr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadCr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr3 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadCr3\r
+_AsmReadCr3: \r
+ movl %cr3, %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadCr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadCr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr4 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadCr4 PROC\r
+ mov eax, cr4\r
+ ret\r
+_AsmReadCr4 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadCr4.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadCr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr4 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadCr4\r
+_AsmReadCr4: \r
+ movl %cr4, %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadCs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadCs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadCs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadCs PROC\r
+ mov ax, cs\r
+ ret\r
+_AsmReadCs ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadCs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadCs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadCs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadCs\r
+_AsmReadCs: \r
+ movw %cs,%ax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr0 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadDr0 PROC\r
+ mov eax, dr0\r
+ ret\r
+_AsmReadDr0 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadDr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr0 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr0\r
+_AsmReadDr0: \r
+ movl %dr0, %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr1.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr1 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadDr1 PROC\r
+ mov eax, dr1\r
+ ret\r
+_AsmReadDr1 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadDr1.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr1 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr1\r
+_AsmReadDr1: \r
+ movl %dr1, %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr2 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadDr2 PROC\r
+ mov eax, dr2\r
+ ret\r
+_AsmReadDr2 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadDr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr2 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr2\r
+_AsmReadDr2: \r
+ movl %dr2, %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr3 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadDr3 PROC\r
+ mov eax, dr3\r
+ ret\r
+_AsmReadDr3 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadDr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr3 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr3\r
+_AsmReadDr3: \r
+ movl %dr3, %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr4 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadDr4 PROC\r
+ DB 0fh, 21h, 0e0h\r
+ ret\r
+_AsmReadDr4 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr5.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr5 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadDr5 PROC\r
+ DB 0fh, 21h, 0e8h\r
+ ret\r
+_AsmReadDr5 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr6.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr6 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadDr6 PROC\r
+ mov eax, dr6\r
+ ret\r
+_AsmReadDr6 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadDr6.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr6 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr6\r
+_AsmReadDr6: \r
+ movl %dr6, %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr7.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr7 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadDr7 PROC\r
+ mov eax, dr7\r
+ ret\r
+_AsmReadDr7 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadDr7.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr7 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr7\r
+_AsmReadDr7: \r
+ movl %dr7, %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadDs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadDs PROC\r
+ mov ax, ds\r
+ ret\r
+_AsmReadDs ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadDs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadDs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDs\r
+_AsmReadDs: \r
+ movw %ds,%ax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadEflags.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadEflags function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadEflags (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadEflags PROC\r
+ pushfd\r
+ pop eax\r
+ ret\r
+_AsmReadEflags ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadEflags.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadEflags function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadEflags (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadEflags\r
+_AsmReadEflags: \r
+ pushfl\r
+ popl %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadEs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadEs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadEs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadEs PROC\r
+ mov ax, es\r
+ ret\r
+_AsmReadEs ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadEs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadEs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadEs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadEs\r
+_AsmReadEs: \r
+ movw %es,%ax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadFs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadFs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadFs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadFs PROC\r
+ mov ax, fs\r
+ ret\r
+_AsmReadFs ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadFs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadFs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadFs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadFs\r
+_AsmReadFs: \r
+ movw %fs,%ax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadGdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadGdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86ReadGdtr (\r
+; OUT IA32_DESCRIPTOR *Gdtr\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalX86ReadGdtr PROC\r
+ mov eax, [esp + 4]\r
+ sgdt fword ptr [eax]\r
+ ret\r
+InternalX86ReadGdtr ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadGdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadGdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmReadGdtr (\r
+# OUT IA32_DESCRIPTOR *Gdtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadGdtr\r
+_AsmReadGdtr: \r
+ movl 4(%esp),%eax\r
+ sgdt (%eax)\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadGs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadGs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadGs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadGs PROC\r
+ mov ax, gs\r
+ ret\r
+_AsmReadGs ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadGs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadGs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadGs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadGs\r
+_AsmReadGs: \r
+ movw %gs,%ax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadIdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadIdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat,C\r
+ .code\r
+\r
+InternalX86ReadIdtr PROC\r
+ mov eax, [esp + 4]\r
+ sidt fword ptr [eax]\r
+ ret\r
+InternalX86ReadIdtr ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadIdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadIdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmReadIdtr (\r
+# OUT IA32_DESCRIPTOR *Idtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadIdtr\r
+_AsmReadIdtr: \r
+ movl 4(%esp),%eax\r
+ sidt (%eax)\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadLdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadLdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadLdtr (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadLdtr PROC\r
+ sldt ax\r
+ ret\r
+_AsmReadLdtr ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadLdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadLdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadLdtr (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadLdtr\r
+_AsmReadLdtr: \r
+ sldt %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm0 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadMm0 PROC\r
+ push eax\r
+ push eax\r
+ movq [esp], mm0\r
+ pop eax\r
+ pop edx\r
+ ret\r
+_AsmReadMm0 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadMm0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm0 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm0\r
+_AsmReadMm0: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm0,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm1.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm1 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadMm1 PROC\r
+ push eax\r
+ push eax\r
+ movq [esp], mm1\r
+ pop eax\r
+ pop edx\r
+ ret\r
+_AsmReadMm1 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadMm1.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm1 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm1\r
+_AsmReadMm1: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm1,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm2 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadMm2 PROC\r
+ push eax\r
+ push eax\r
+ movq [esp], mm2\r
+ pop eax\r
+ pop edx\r
+ ret\r
+_AsmReadMm2 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadMm2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm2 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm2\r
+_AsmReadMm2: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm2,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm3 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadMm3 PROC\r
+ push eax\r
+ push eax\r
+ movq [esp], mm3\r
+ pop eax\r
+ pop edx\r
+ ret\r
+_AsmReadMm3 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadMm3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm3 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm3\r
+_AsmReadMm3: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm3,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm4 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadMm4 PROC\r
+ push eax\r
+ push eax\r
+ movq [esp], mm4\r
+ pop eax\r
+ pop edx\r
+ ret\r
+_AsmReadMm4 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadMm4.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm4 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm4\r
+_AsmReadMm4: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm4,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm5.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm5 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadMm5 PROC\r
+ push eax\r
+ push eax\r
+ movq [esp], mm5\r
+ pop eax\r
+ pop edx\r
+ ret\r
+_AsmReadMm5 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadMm5.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm5 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm5\r
+_AsmReadMm5: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm5,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm6.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm6 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadMm6 PROC\r
+ push eax\r
+ push eax\r
+ movq [esp], mm6\r
+ pop eax\r
+ pop edx\r
+ ret\r
+_AsmReadMm6 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadMm6.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm6 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm6\r
+_AsmReadMm6: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm6,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm7.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm7 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadMm7 PROC\r
+ push eax\r
+ push eax\r
+ movq [esp], mm7\r
+ pop eax\r
+ pop edx\r
+ ret\r
+_AsmReadMm7 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadMm7.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm7 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm7\r
+_AsmReadMm7: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm7,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMsr64.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMsr64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; AsmReadMsr32 (\r
+; IN UINT32 Index\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadMsr32 PROC\r
+ ;\r
+ ; AsmReadMsr32 shares the same implementation with AsmReadMsr64 and thus no\r
+ ; code inside this function\r
+ ;\r
+_AsmReadMsr32 ENDP\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMsr64 (\r
+; IN UINT64 Index\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadMsr64 PROC\r
+ mov ecx, [esp + 4]\r
+ rdmsr\r
+ ret\r
+_AsmReadMsr64 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadMsr64.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMsr64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# AsmReadMsr32 (\r
+# IN UINT32 Index\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMsr32\r
+_AsmReadMsr32: \r
+ #\r
+ # AsmReadMsr32 shares the same implementation with AsmReadMsr64 and thus no\r
+ # code inside this function\r
+ #\r
+\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmReadMsr64 (\r
+# IN UINT64 Index\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMsr64\r
+_AsmReadMsr64: \r
+ movl 4(%esp),%ecx\r
+ rdmsr\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadPmc.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadPmc function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadPmc (\r
+; IN UINT32 PmcIndex\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadPmc PROC\r
+ mov ecx, [esp + 4]\r
+ rdpmc\r
+ ret\r
+_AsmReadPmc ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadPmc.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadPmc function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmReadPmc (\r
+# IN UINT32 PmcIndex\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadPmc\r
+_AsmReadPmc: \r
+ movl 4(%esp),%ecx\r
+ rdpmc\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadSs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadSs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadSs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadSs PROC\r
+ mov ax, ss\r
+ ret\r
+_AsmReadSs ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadSs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadSs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadSs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadSs\r
+_AsmReadSs: \r
+ movw %ss,%ax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadTr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadTr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadTr (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadTr PROC\r
+ str ax\r
+ ret\r
+_AsmReadTr ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadTr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadTr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadTr (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadTr\r
+_AsmReadTr: \r
+ str %eax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadTsc.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadTsc function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadTsc (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmReadTsc PROC\r
+ rdtsc\r
+ ret\r
+_AsmReadTsc ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# ReadTsc.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadTsc function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmReadTsc (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadTsc\r
+_AsmReadTsc: \r
+ rdtsc\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; SetJump.Asm\r
+;\r
+; Abstract:\r
+;\r
+; Implementation of SetJump() on IA-32.\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386\r
+ .model flat\r
+ .code\r
+\r
+_SetJump PROC\r
+ pop ecx\r
+ mov edx, [esp]\r
+ mov [edx], ebx\r
+ mov [edx + 4], esi\r
+ mov [edx + 8], edi\r
+ mov [edx + 12], ebp\r
+ mov [edx + 16], esp\r
+ mov [edx + 20], ecx\r
+ xor eax, eax\r
+ jmp ecx\r
+_SetJump ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# SetJump.Asm\r
+#\r
+# Abstract:\r
+#\r
+# Implementation of SetJump() on IA-32.\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _SetJump\r
+_SetJump: \r
+ popl %ecx\r
+ movl (%esp),%edx\r
+ movl %ebx,(%edx)\r
+ movl %esi,4(%edx)\r
+ movl %edi,8(%edx)\r
+ movl %ebp,12(%edx)\r
+ movl %esp,16(%edx)\r
+ movl %ecx,20(%edx)\r
+ xorl %eax,%eax\r
+ jmp *%ecx\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuId.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmCpuid function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat,C\r
+ .code\r
+\r
+InternalMathSwapBytes64 PROC\r
+ mov eax, [esp + 8]\r
+ mov edx, [esp + 4]\r
+ bswap eax\r
+ bswap edx\r
+ ret\r
+InternalMathSwapBytes64 ENDP\r
+\r
+ END\r
--- /dev/null
+/** @file\r
+ SwitchStack() function for IA-32.\r
+\r
+ Copyright (c) 2006, Intel Corporation<BR>\r
+ All rights reserved. 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: SwitchStack.c\r
+\r
+**/\r
+\r
+/**\r
+ Transfers control to a function starting with a new stack.\r
+\r
+ Transfers control to the function specified by EntryPoint using the new stack\r
+ specified by NewStack and passing in the parameters specified by Context1 and\r
+ Context2. Context1 and Context2 are optional and may be NULL. The function\r
+ EntryPoint must never return.\r
+\r
+ If EntryPoint is NULL, then ASSERT().\r
+ If NewStack is NULL, then ASSERT().\r
+\r
+ @param EntryPoint A pointer to function to call with the new stack.\r
+ @param Context1 A pointer to the context to pass into the EntryPoint\r
+ function.\r
+ @param Context2 A pointer to the context to pass into the EntryPoint\r
+ function.\r
+ @param NewStack A pointer to the new stack to use for the EntryPoint\r
+ function.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+SwitchStack (\r
+ IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+ IN VOID *Context1,\r
+ IN VOID *Context2,\r
+ IN VOID *NewStack\r
+ )\r
+{\r
+ BASE_LIBRARY_JUMP_BUFFER JumpBuffer;\r
+\r
+ ASSERT (EntryPoint != NULL && NewStack != NULL);\r
+\r
+ JumpBuffer.Eip = (UINTN)EntryPoint;\r
+ JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*);\r
+ JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2);\r
+ ((VOID**)JumpBuffer.Esp)[1] = Context1;\r
+ ((VOID**)JumpBuffer.Esp)[2] = Context2;\r
+\r
+ LongJump (&JumpBuffer, (UINTN)-1);\r
+}\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; Thunk.asm\r
+;\r
+; Abstract:\r
+;\r
+; Real mode thunk\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686p\r
+ .model flat,C\r
+\r
+ .data\r
+\r
+NullSegSel DQ 0\r
+_16BitCsSel LABEL QWORD\r
+ DW -1\r
+ DW 0\r
+ DB 0\r
+ DB 9bh\r
+ DB 8fh ; 16-bit segment\r
+ DB 0\r
+_16BitDsSel LABEL QWORD\r
+ DW -1\r
+ DW 0\r
+ DB 0\r
+ DB 93h\r
+ DB 8fh ; 16-bit segment\r
+ DB 0\r
+GdtEnd LABEL QWORD\r
+\r
+ .const\r
+\r
+_16Gdtr LABEL FWORD\r
+ DW offset GdtEnd - offset NullSegSel - 1\r
+ DD offset NullSegSel\r
+\r
+_16Idtr FWORD (1 SHL 10) - 1\r
+\r
+ .code\r
+\r
+IA32_REGS STRUC 4t\r
+_EDI DD ?\r
+_ESI DD ?\r
+_EBP DD ?\r
+_ESP DD ?\r
+_EBX DD ?\r
+_EDX DD ?\r
+_ECX DD ?\r
+_EAX DD ?\r
+_DS DW ?\r
+_ES DW ?\r
+_FS DW ?\r
+_GS DW ?\r
+_EFLAGS DD ?\r
+_EIP DD ?\r
+_CS DW ?\r
+_SS DW ?\r
+IA32_REGS ENDS\r
+\r
+InternalAsmThunk16 PROC USES ebp ebx esi edi ds es fs gs\r
+ mov esi, [esp + 36] ; esi <- RegSet\r
+ push sizeof (IA32_REGS)\r
+ pop ecx\r
+ movzx edx, (IA32_REGS ptr [esi])._SS\r
+ mov edi, (IA32_REGS ptr [esi])._ESP\r
+ sub edi, ecx ; reserve space on realmode stack\r
+ push edi ; save stack offset\r
+ imul eax, edx, 16 ; eax <- edx * 16\r
+ add edi, eax ; edi <- linear address of 16-bit stack\r
+ rep movsb ; copy RegSet\r
+ mov esi, edx ; esi <- 16-bit stack segment\r
+ pop ebx ; ebx <- 16-bit stack offset\r
+ mov edi, [esp + 40] ; edi <- realmode patch\r
+ push cs ; save CS segment selector\r
+ push offset @BackToThunk ; offset to back from real mode\r
+ mov eax, offset @16Return\r
+ stosd\r
+ xor eax, eax\r
+ stosw ; set CS base to 0\r
+ mov eax, esp\r
+ stosd\r
+ mov eax, ss\r
+ stosd\r
+ mov eax, cr0\r
+ mov ecx, eax ; ecx <- CR0\r
+ and ecx, 7ffffffeh ; clear PE, PG bits\r
+ stosd\r
+ mov eax, cr4\r
+ mov ebp, eax\r
+ and ebp, 300h ; clear all but PCE and OSFXSR bits\r
+ stosd\r
+ sidt fword ptr [esp + 44] ; use parameter space to save IDTR\r
+ sgdt fword ptr [edi]\r
+ lidt _16Idtr\r
+ push 10h\r
+ pop eax\r
+ push 8\r
+ push offset @16Start\r
+ lgdt _16Gdtr\r
+ retf\r
+@16Start: ; 16-bit starts here\r
+ mov ss, eax ; set SS to be a 16-bit segment\r
+ mov cr0, ecx\r
+ mov cr4, ebp\r
+ mov ss, esi ; set up 16-bit stack\r
+ mov sp, bx ; mov esp, ebx actually\r
+ popaw ; popad actually\r
+ pop ds\r
+ pop es\r
+ pop fs\r
+ pop gs\r
+ add sp, 4 ; skip _EFLAGS\r
+ DB 66h\r
+ retf ; transfer control to 16-bit code\r
+@16Return:\r
+ pushf ; pushfd actually\r
+ push gs\r
+ push fs\r
+ push es\r
+ push ds\r
+ pushaw ; pushad actually\r
+ DB 67h, 66h\r
+ lds esi, fword ptr (IA32_REGS ptr [esp])._EIP\r
+ DB 67h, 66h\r
+ mov eax, [esi + 12]\r
+ mov cr4, eax ; restore CR4\r
+ DB 67h, 66h\r
+ lgdt fword ptr [esi + 16]\r
+ DB 67h, 66h\r
+ mov eax, [esi + 8]\r
+ mov cr0, eax ; restore CR0\r
+ xor ax, ax ; xor eax, eax actually\r
+ mov eax, ss\r
+ DB 67h\r
+ mov dword ptr (IA32_REGS ptr [esp])._SS, eax\r
+ shl ax, 4 ; shl eax, 4 actually\r
+ add ax, sp ; add eax, esp actually\r
+ add sp, sizeof (IA32_REGS) ; add esp, sizeof (IA32_REGS)\r
+ DB 67h, 66h\r
+ mov dword ptr (IA32_REGS ptr [esp - sizeof (IA32_REGS)])._ESP, esp\r
+ DB 67h, 66h\r
+ lss esp, fword ptr [esi] ; restore protected mode stack\r
+ DB 66h\r
+ retf ; go back to protected mode\r
+@BackToThunk:\r
+ lidt fword ptr [esp + 36] ; restore protected mode IDTR\r
+ ret\r
+InternalAsmThunk16 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# Thunk.asm\r
+#\r
+# Abstract:\r
+#\r
+# Real mode thunk\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+MISMATCH: "EXTERNDEF C mCode16Size:DWORD"\r
+\r
+MISMATCH: "CONST SEGMENT FLAT "DATA" READONLY"\r
+\r
+MISMATCH: "mCode16Size DD _TEXT16SIZE"\r
+\r
+MISMATCH: "CONSTS"\r
+\r
+MISMATCH: "_DATA SEGMENT FLAT "DATA""\r
+\r
+MISMATCH: "NullSegSel DQ 0"\r
+MISMATCH: "_16BitCsSel LABEL QWORD"\r
+ .word -1\r
+ .word 0\r
+ .byte 0\r
+ .byte 0x9b\r
+ .byte 0x8f # 16-bit segment\r
+ .byte 0\r
+\r
+MISMATCH: "_16Gdtr LABEL FWORD"\r
+MISMATCH: " DW $ - offset NullSegSel - 1"\r
+MISMATCH: " DD offset NullSegSel"\r
+\r
+MISMATCH: "_DATAS"\r
+\r
+MISMATCH: "_TEXT SEGMENT FLAT "CODE" PARA"\r
+\r
+MISMATCH: "IA32_REGS STRUC 4t"\r
+MISMATCH: "_EDI DD ?"\r
+MISMATCH: "_ESI DD ?"\r
+MISMATCH: "_EBP DD ?"\r
+MISMATCH: "_ESP DD ?"\r
+MISMATCH: "_EBX DD ?"\r
+MISMATCH: "_EDX DD ?"\r
+MISMATCH: "_ECX DD ?"\r
+MISMATCH: "_EAX DD ?"\r
+MISMATCH: "_DS DW ?"\r
+MISMATCH: "_ES DW ?"\r
+MISMATCH: "_FS DW ?"\r
+MISMATCH: "_GS DW ?"\r
+MISMATCH: "_EFLAGS DD ?"\r
+MISMATCH: "_EIP DD ?"\r
+MISMATCH: "_CS DW ?"\r
+MISMATCH: "_SS DW ?"\r
+MISMATCH: "IA32_REGSS"\r
+\r
+MISMATCH: "_STK16 STRUC 1t"\r
+MISMATCH: "RetEip DD ?"\r
+MISMATCH: "RetCs DW ?"\r
+MISMATCH: "ThunkFlags DW ?"\r
+MISMATCH: "SavedEsp DD ?"\r
+MISMATCH: "SavedSs DW ?"\r
+MISMATCH: "SavedGdtr FWORD ?"\r
+MISMATCH: "SavedCr0 DD ?"\r
+MISMATCH: "SavedCr4 DD ?"\r
+MISMATCH: "_STK16S"\r
+\r
+.global _InternalAsmThunk16\r
+MISMATCH: "_InternalAsmThunk16: USES ebp ebx esi edi ds es fs gs"\r
+MISMATCH: " ASSUME esi:PTR IA32_REGS"\r
+ movl 36(%esp),%esi\r
+MISMATCH: " movzx edx, [esi]._SS"\r
+ movl $[esi]._ESP, %edi\r
+MISMATCH: " add edi, - sizeof (_STK16) - sizeof (IA32_REGS)"\r
+ pushl %edi # save stack offset\r
+ imull $16,%edx,%eax # eax <- edx*16\r
+ addl %eax,%edi # edi <- linear address of 16-bit stack\r
+MISMATCH: " push sizeof (IA32_REGS) / 4"\r
+ popl %ecx\r
+ rep\r
+ movsl # copy context to 16-bit stack\r
+ popl %ebx # ebx <- 16-bit stack offset\r
+MISMATCH: " mov eax, offset @F "\r
+ stosl\r
+ movl %cs,%eax # return segment\r
+ stosw\r
+ movl 40(%esp),%eax # THUNK flags\r
+ stosw\r
+ movl %esp,%eax\r
+ stosl # save esp\r
+ movl %ss,%eax # save ss\r
+ stosw\r
+MISMATCH: " sgdt fword ptr [edi] "\r
+MISMATCH: " sidt fword ptr [esp + 36] "\r
+ movl %cr0, %esi\r
+ movl %esi,6(%edi) # save CR0\r
+MISMATCH: " and esi, NOT 80000001h "\r
+ movl %cr4, %eax\r
+ movl %eax,10(%edi) # save CR4\r
+MISMATCH: " and al, NOT 30h "\r
+ movl %edx,%edi # edi <- 16-bit stack segment\r
+ movl 44(%esp),%edx\r
+ shll $16,%edx\r
+ pushl %edx\r
+MISMATCH: " lgdt _16Gdtr "\r
+ .byte 0xea\r
+MISMATCH: " DD offset @16Bit"\r
+ .word 8 # jmp far 8:@16Bit\r
+@16Bit: \r
+ movl %esi, %cr0 # disable protected mode\r
+ movl %eax, %cr4 # disable PAE & PSE\r
+ lret\r
+@@: \r
+ movl %ss,%eax\r
+ shll $4,%eax\r
+ addl %esp,%eax # eax <- address of 16-bit stack\r
+MISMATCH: " lss esp, fword ptr (_STK16 ptr [esp + sizeof (IA32_REGS)]).SavedEsp"\r
+MISMATCH: " lidt fword ptr [esp + 36] "\r
+ ret\r
+\r
+\r
+MISMATCH: "_TEXTS"\r
+\r
+MISMATCH: "_TEXT16 SEGMENT USE16 "CODE" PARA"\r
+\r
+.global _Code16Addr\r
+MISMATCH: "_Code16Addr: C"\r
+\r
+\r
+.global RealMode\r
+RealMode: \r
+MISMATCH: " ASSUME bp:PTR _STK16"\r
+ movw %di,%ss # set up stack\r
+ movl %ebx,%esp\r
+MISMATCH: " lidt fword ptr cs:[_16Idtr - _Code16Addr]"\r
+ popal\r
+ popl %ds\r
+ popl %es\r
+ popl %fs\r
+ popl %gs\r
+ addw $4,%sp # skip EFlags\r
+MISMATCH: " test (_STK16 ptr [esp + 8]).ThunkFlags, 1"\r
+ jz @F\r
+ pushf\r
+@@: \r
+ pushw %cs\r
+MISMATCH: " push @FarCallRet - _Code16Addr"\r
+ jz @F\r
+MISMATCH: " jmp fword ptr [esp + 6]"\r
+@@: \r
+MISMATCH: " jmp fword ptr [esp + 4]"\r
+@FarCallRet: \r
+ pushfl\r
+ pushw %gs\r
+ pushw %fs\r
+ pushw %es\r
+ pushw %ds\r
+ pushal\r
+ cli\r
+MISMATCH: " lea bp, [esp + sizeof (IA32_REGS)]"\r
+ .byte 0x66\r
+MISMATCH: " lgdt [bp].SavedGdtr"\r
+ movl $[bp].SavedCr4, %eax\r
+ movl %eax, %cr4\r
+ movl $[bp].SavedCr0, %eax\r
+ movl %eax, %cr0 # restore CR0\r
+MISMATCH: " jmp fword ptr [bp].RetEip"\r
+\r
+\r
+MISMATCH: "_16Idtr FWORD (1 SHL 10) - 1"\r
+\r
+_TEXT16: \r
+\r
+MISMATCH: "_TEXT16SIZE = _TEXT16- _Code16Addr"\r
+\r
+MISMATCH: "_TEXT16S"\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; Wbinvd.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWbinvd function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .486p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWbinvd (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWbinvd PROC\r
+ wbinvd\r
+ ret\r
+_AsmWbinvd ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# Wbinvd.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWbinvd function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWbinvd (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWbinvd\r
+_AsmWbinvd: \r
+ wbinvd\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteCr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteCr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr0 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteCr0 PROC\r
+ mov eax, [esp + 4]\r
+ mov cr0, eax\r
+ ret\r
+_AsmWriteCr0 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteCr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr0 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteCr0\r
+_AsmWriteCr0: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %cr0\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteCr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteCr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr2 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteCr2 PROC\r
+ mov eax, [esp + 4]\r
+ mov cr2, eax\r
+ ret\r
+_AsmWriteCr2 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteCr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr2 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteCr2\r
+_AsmWriteCr2: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %cr2\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteCr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteCr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr3 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteCr3 PROC\r
+ mov eax, [esp + 4]\r
+ mov cr3, eax\r
+ ret\r
+_AsmWriteCr3 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteCr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr3 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteCr3\r
+_AsmWriteCr3: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %cr3\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteCr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteCr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr4 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteCr4 PROC\r
+ mov eax, [esp + 4]\r
+ mov cr4, eax\r
+ ret\r
+_AsmWriteCr4 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteCr4.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr4 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteCr4\r
+_AsmWriteCr4: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %cr4\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteDr0 (\r
+; IN UINTN Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteDr0 PROC\r
+ mov eax, [esp + 4]\r
+ mov dr0, eax\r
+ ret\r
+_AsmWriteDr0 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteDr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr0 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr0\r
+_AsmWriteDr0: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr0\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr1.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteDr1 (\r
+; IN UINTN Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteDr1 PROC\r
+ mov eax, [esp + 4]\r
+ mov dr1, eax\r
+ ret\r
+_AsmWriteDr1 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteDr1.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr1 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr1\r
+_AsmWriteDr1: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr1\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteDr2 (\r
+; IN UINTN Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteDr2 PROC\r
+ mov eax, [esp + 4]\r
+ mov dr2, eax\r
+ ret\r
+_AsmWriteDr2 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteDr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr2 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr2\r
+_AsmWriteDr2: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr2\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteDr3 (\r
+; IN UINTN Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteDr3 PROC\r
+ mov eax, [esp + 4]\r
+ mov dr3, eax\r
+ ret\r
+_AsmWriteDr3 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteDr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr3 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr3\r
+_AsmWriteDr3: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr3\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteDr4 (\r
+; IN UINTN Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteDr4 PROC\r
+ mov eax, [esp + 4]\r
+ DB 0fh, 23h, 0e0h\r
+ ret\r
+_AsmWriteDr4 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr5.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteDr5 (\r
+; IN UINTN Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteDr5 PROC\r
+ mov eax, [esp + 4]\r
+ DB 0fh, 23h, 0e8h\r
+ ret\r
+_AsmWriteDr5 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr6.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteDr6 (\r
+; IN UINTN Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteDr6 PROC\r
+ mov eax, [esp + 4]\r
+ mov dr6, eax\r
+ ret\r
+_AsmWriteDr6 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteDr6.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr6 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr6\r
+_AsmWriteDr6: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr6\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr7.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteDr7 (\r
+; IN UINTN Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteDr7 PROC\r
+ mov eax, [esp + 4]\r
+ mov dr7, eax\r
+ ret\r
+_AsmWriteDr7 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteDr7.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr7 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr7\r
+_AsmWriteDr7: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr7\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteGdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteGdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686P\r
+ .model flat,C\r
+ .code\r
+\r
+InternalX86WriteGdtr PROC\r
+ mov eax, [esp + 4]\r
+ lgdt fword ptr [eax]\r
+ ret\r
+InternalX86WriteGdtr ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteGdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteGdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteGdtr (\r
+# OUT IA32_DESCRIPTOR *Gdtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteGdtr\r
+_AsmWriteGdtr: \r
+ movl 4(%esp),%eax\r
+ lgdt (%eax)\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteIdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteIdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .686P\r
+ .model flat,C\r
+ .code\r
+\r
+InternalX86WriteIdtr PROC\r
+ mov eax, [esp + 4]\r
+ lidt fword ptr [eax]\r
+ ret\r
+InternalX86WriteIdtr ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteIdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteIdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteIdtr (\r
+# OUT IA32_DESCRIPTOR *Idtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteIdtr\r
+_AsmWriteIdtr: \r
+ movl 4(%esp),%eax\r
+ lidt (%eax)\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteLdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteLdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .386p\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteLdtr (\r
+; IN UINT16 Ldtr\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteLdtr PROC\r
+ mov eax, [esp + 4]\r
+ lldt ax\r
+ ret\r
+_AsmWriteLdtr ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteLdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteLdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteLdtr (\r
+# IN UINT16 Ldtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteLdtr\r
+_AsmWriteLdtr: \r
+ movl 4(%esp),%eax\r
+ lldtw %ax\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMm0 (\r
+; IN UINT64 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteMm0 PROC\r
+ movq mm0, [esp + 4]\r
+ ret\r
+_AsmWriteMm0 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteMm0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm0 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm0\r
+_AsmWriteMm0: \r
+ movq 4(%esp),%mm0\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm1.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMm1 (\r
+; IN UINT64 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteMm1 PROC\r
+ movq mm1, [esp + 4]\r
+ ret\r
+_AsmWriteMm1 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteMm1.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm1 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm1\r
+_AsmWriteMm1: \r
+ movq 4(%esp),%mm1\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMm2 (\r
+; IN UINT64 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteMm2 PROC\r
+ movq mm2, [esp + 4]\r
+ ret\r
+_AsmWriteMm2 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteMm2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm2 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm2\r
+_AsmWriteMm2: \r
+ movq 4(%esp),%mm2\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMm3 (\r
+; IN UINT64 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteMm3 PROC\r
+ movq mm3, [esp + 4]\r
+ ret\r
+_AsmWriteMm3 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteMm3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm3 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm3\r
+_AsmWriteMm3: \r
+ movq 4(%esp),%mm3\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMm4 (\r
+; IN UINT64 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteMm4 PROC\r
+ movq mm4, [esp + 4]\r
+ ret\r
+_AsmWriteMm4 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteMm4.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm4 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm4\r
+_AsmWriteMm4: \r
+ movq 4(%esp),%mm4\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm5.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMm5 (\r
+; IN UINT64 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteMm5 PROC\r
+ movq mm5, [esp + 4]\r
+ ret\r
+_AsmWriteMm5 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteMm5.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm5 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm5\r
+_AsmWriteMm5: \r
+ movq 4(%esp),%mm5\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm6.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMm6 (\r
+; IN UINT64 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteMm6 PROC\r
+ movq mm6, [esp + 4]\r
+ ret\r
+_AsmWriteMm6 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteMm6.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm6 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm6\r
+_AsmWriteMm6: \r
+ movq 4(%esp),%mm6\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm7.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .xmm\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMm7 (\r
+; IN UINT64 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteMm7 PROC\r
+ movq mm7, [esp + 4]\r
+ ret\r
+_AsmWriteMm7 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteMm7.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm7 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm7\r
+_AsmWriteMm7: \r
+ movq 4(%esp),%mm7\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMsr32.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMsr32 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; AsmWriteMsr32 (\r
+; IN UINT32 Index,\r
+; IN UINT32 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteMsr32 PROC\r
+ mov eax, [esp + 8]\r
+ xor edx, edx\r
+ mov ecx, [esp + 4]\r
+ wrmsr\r
+ ret\r
+_AsmWriteMsr32 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteMsr32.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMsr32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# AsmWriteMsr32 (\r
+# IN UINT32 Index,\r
+# IN UINT32 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMsr32\r
+_AsmWriteMsr32: \r
+ movl 8(%esp),%eax\r
+ xorl %edx,%edx\r
+ movl 4(%esp),%ecx\r
+ wrmsr\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMsr64.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMsr64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .586P\r
+ .model flat\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMsr64 (\r
+; IN UINT32 Index,\r
+; IN UINT64 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteMsr64 PROC\r
+ mov edx, [esp + 12]\r
+ mov eax, [esp + 8]\r
+ mov ecx, [esp + 4]\r
+ wrmsr\r
+ ret\r
+_AsmWriteMsr64 ENDP\r
+\r
+ END\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. 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
+# WriteMsr64.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMsr64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMsr64 (\r
+# IN UINT32 Index,\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMsr64\r
+_AsmWriteMsr64: \r
+ movl 12(%esp),%edx\r
+ movl 8(%esp),%eax\r
+ movl 4(%esp),%ecx\r
+ wrmsr\r
+ ret\r
+\r
+\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuBreakpoint.Asm\r
+;\r
+; Abstract:\r
+;\r
+; CpuBreakpoint function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuBreakpoint (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+CpuBreakpoint PROC\r
+ int 3\r
+ ret\r
+CpuBreakpoint ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuFlushTlb.Asm\r
+;\r
+; Abstract:\r
+;\r
+; CpuFlushTlb function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuFlushTlb (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+CpuFlushTlb PROC\r
+ mov rax, cr3\r
+ mov cr3, rax\r
+ ret\r
+CpuFlushTlb ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuId.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmCpuid function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmCpuid (\r
+; IN UINT32 RegisterInEax,\r
+; OUT UINT32 *RegisterOutEax OPTIONAL,\r
+; OUT UINT32 *RegisterOutEbx OPTIONAL,\r
+; OUT UINT32 *RegisterOutEcx OPTIONAL,\r
+; OUT UINT32 *RegisterOutEdx OPTIONAL\r
+; )\r
+;------------------------------------------------------------------------------\r
+AsmCpuid PROC USES rbx\r
+ mov eax, ecx\r
+ push rdx\r
+ push rax ; save Index on stack\r
+ cpuid\r
+ test r9, r9\r
+ jz @F\r
+ mov [r9], ecx\r
+@@:\r
+ pop rcx\r
+ jrcxz @F\r
+ mov [rcx], eax\r
+@@:\r
+ mov rcx, r8\r
+ jrcxz @F\r
+ mov [rcx], ebx\r
+@@:\r
+ mov rcx, [rsp + 30h]\r
+ jrcxz @F\r
+ mov [rcx], edx\r
+@@:\r
+ pop rax ; restore Index to rax as return value\r
+ ret\r
+AsmCpuid ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuPause.Asm\r
+;\r
+; Abstract:\r
+;\r
+; CpuPause function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuPause (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+CpuPause PROC\r
+ pause\r
+ ret\r
+CpuPause ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; CpuSleep.Asm\r
+;\r
+; Abstract:\r
+;\r
+; CpuSleep function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuSleep (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+CpuSleep PROC\r
+ hlt\r
+ ret\r
+CpuSleep ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; DisableInterrupts.Asm\r
+;\r
+; Abstract:\r
+;\r
+; DisableInterrupts function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; DisableInterrupts (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+DisableInterrupts PROC\r
+ cli\r
+ ret\r
+DisableInterrupts ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; DisablePaging64.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmDisablePaging64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+InternalX86DisablePaging64 PROC\r
+ cli\r
+ shl rcx, 32\r
+ lea ecx, @F\r
+ push rcx\r
+ mov ebx, edx\r
+ mov esi, r8d\r
+ mov edi, r9d\r
+ mov eax, [rsp + 28h]\r
+ retf\r
+@@:\r
+ mov esp, eax ; set up new stack\r
+ mov rax, cr0\r
+ btr eax, 31\r
+ mov cr0, rax ; disable paging\r
+ mov ecx, 0c0000080h\r
+ rdmsr\r
+ and ah, NOT 1 ; clear LME\r
+ wrmsr\r
+ mov rax, cr4\r
+ and al, NOT (1 SHL 5) ; clear PAE\r
+ mov cr4, rax\r
+ push rdi\r
+ push rsi\r
+ call rbx\r
+ jmp $\r
+InternalX86DisablePaging64 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; EnableDisableInterrupts.Asm\r
+;\r
+; Abstract:\r
+;\r
+; EnableDisableInterrupts function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; EnableDisableInterrupts (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+EnableDisableInterrupts PROC\r
+ sti\r
+ cli\r
+ ret\r
+EnableDisableInterrupts ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; EnableInterrupts.Asm\r
+;\r
+; Abstract:\r
+;\r
+; EnableInterrupts function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; EnableInterrupts (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+EnableInterrupts PROC\r
+ sti\r
+ ret\r
+EnableInterrupts ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; FlushCacheLine.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmFlushCacheLine function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmFlushCacheLine (\r
+; IN VOID *LinearAddress\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmFlushCacheLine PROC\r
+ clflush [rcx]\r
+ ret\r
+AsmFlushCacheLine ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; FxRestore.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmFxRestore function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+InternalX86FxRestore PROC\r
+ fxrstor [rcx]\r
+ ret\r
+InternalX86FxRestore ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; FxSave.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmFxSave function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+InternalX86FxSave PROC\r
+ fxsave [rcx]\r
+ ret\r
+InternalX86FxSave ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; InterlockedCompareExchange32.Asm\r
+;\r
+; Abstract:\r
+;\r
+; InterlockedCompareExchange32 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; InterlockedCompareExchange32 (\r
+; IN UINT32 *Value,\r
+; IN UINT32 CompareValue,\r
+; IN UINT32 ExchangeValue\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalSyncCompareExchange32 PROC\r
+ mov eax, edx\r
+ lock cmpxchg [rcx], r8d\r
+ ret\r
+InternalSyncCompareExchange32 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; InterlockedCompareExchange64.Asm\r
+;\r
+; Abstract:\r
+;\r
+; InterlockedCompareExchange64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InterlockedCompareExchange64 (\r
+; IN UINT64 *Value,\r
+; IN UINT64 CompareValue,\r
+; IN UINT64 ExchangeValue\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalSyncCompareExchange64 PROC\r
+ mov rax, rdx\r
+ lock cmpxchg [rcx], r8\r
+ ret\r
+InternalSyncCompareExchange64 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; InterlockedDecrement.Asm\r
+;\r
+; Abstract:\r
+;\r
+; InterlockedDecrement function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; InterlockedDecrement (\r
+; IN UINT32 *Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalSyncDecrement PROC\r
+ lock dec dword ptr [rcx]\r
+ mov eax, [rcx]\r
+ ret\r
+InternalSyncDecrement ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; InterlockedIncrement.Asm\r
+;\r
+; Abstract:\r
+;\r
+; InterlockedIncrement function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; InterlockedIncrement (\r
+; IN UINT32 *Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+InternalSyncIncrement PROC\r
+ lock inc dword ptr [rcx]\r
+ mov eax, [rcx]\r
+ ret\r
+InternalSyncIncrement ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; Invd.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmInvd function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmInvd (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmInvd PROC\r
+ invd\r
+ ret\r
+AsmInvd ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; LongJump.Asm\r
+;\r
+; Abstract:\r
+;\r
+; Implementation of LongJump() on x64.\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+LongJump PROC\r
+ mov rbx, [rcx]\r
+ mov rsp, [rcx + 8]\r
+ mov rbp, [rcx + 10h]\r
+ mov rdi, [rcx + 18h]\r
+ mov rsi, [rcx + 20h]\r
+ mov r12, [rcx + 28h]\r
+ mov r13, [rcx + 30h]\r
+ mov r14, [rcx + 38h]\r
+ mov r15, [rcx + 40h]\r
+ mov rax, rdx\r
+ jmp qword ptr [rcx + 48h]\r
+LongJump ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; Monitor.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmMonitor function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmMonitor (\r
+; IN UINTN Eax,\r
+; IN UINTN Ecx,\r
+; IN UINTN Edx\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmMonitor PROC\r
+ mov eax, ecx\r
+ mov ecx, edx\r
+ mov edx, r8d\r
+ DB 0fh, 1, 0c8h\r
+ ret\r
+AsmMonitor ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; Mwait.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmMwait function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmMwait (\r
+; IN UINTN Eax,\r
+; IN UINTN Ecx\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmMwait PROC\r
+ mov eax, ecx\r
+ mov ecx, edx\r
+ DB 0fh, 1, 0c9h\r
+ ret\r
+AsmMwait ENDP\r
+\r
+ END\r
--- /dev/null
+/** @file\r
+ Non-existing BaseLib functions on x64\r
+\r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. 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: Non-existing.c\r
+\r
+**/\r
+\r
+#include "../BaseLibInternals.h"\r
+\r
+VOID\r
+EFIAPI\r
+InternalX86EnablePaging32 (\r
+ IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+ IN VOID *Context1, OPTIONAL\r
+ IN VOID *Context2, OPTIONAL\r
+ IN VOID *NewStack\r
+ )\r
+{\r
+ ASSERT (FALSE);\r
+}\r
+\r
+VOID\r
+EFIAPI\r
+InternalX86DisablePaging32 (\r
+ IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+ IN VOID *Context1, OPTIONAL\r
+ IN VOID *Context2, OPTIONAL\r
+ IN VOID *NewStack\r
+ )\r
+{\r
+ ASSERT (FALSE);\r
+}\r
+\r
+VOID\r
+EFIAPI\r
+InternalX86EnablePaging64 (\r
+ IN UINT16 Cs,\r
+ IN UINT64 EntryPoint,\r
+ IN UINT64 Context1, OPTIONAL\r
+ IN UINT64 Context2, OPTIONAL\r
+ IN UINT64 NewStack\r
+ )\r
+{\r
+ ASSERT (FALSE);\r
+}\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadCr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadCr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr0 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadCr0 PROC\r
+ mov rax, cr0\r
+ ret\r
+AsmReadCr0 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadCr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadCr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr2 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadCr2 PROC\r
+ mov rax, cr2\r
+ ret\r
+AsmReadCr2 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadCr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadCr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr3 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadCr3 PROC\r
+ mov rax, cr3\r
+ ret\r
+AsmReadCr3 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadCr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadCr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr4 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadCr4 PROC\r
+ mov rax, cr4\r
+ ret\r
+AsmReadCr4 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadCs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadCs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadCs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadCs PROC\r
+ mov ax, cs\r
+ ret\r
+AsmReadCs ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr0 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr0 PROC\r
+ mov rax, dr0\r
+ ret\r
+AsmReadDr0 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr1.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr1 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr1 PROC\r
+ mov rax, dr1\r
+ ret\r
+AsmReadDr1 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr2 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr2 PROC\r
+ mov rax, dr2\r
+ ret\r
+AsmReadDr2 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr3 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr3 PROC\r
+ mov rax, dr3\r
+ ret\r
+AsmReadDr3 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr4 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr4 PROC\r
+ DB 0fh, 21h, 0e0h\r
+ ret\r
+AsmReadDr4 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr5.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr5 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr5 PROC\r
+ DB 0fh, 21h, 0e8h\r
+ ret\r
+AsmReadDr5 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr6.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr6 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr6 PROC\r
+ mov rax, dr6\r
+ ret\r
+AsmReadDr6 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDr7.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDr7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr7 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr7 PROC\r
+ mov rax, dr7\r
+ ret\r
+AsmReadDr7 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadDs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadDs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadDs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadDs PROC\r
+ mov ax, ds\r
+ ret\r
+AsmReadDs ENDP\r
+\r
+ END\r
+\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadEflags.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadEflags function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadEflags (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadEflags PROC\r
+ pushfq\r
+ pop rax\r
+ ret\r
+AsmReadEflags ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadEs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadEs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadEs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadEs PROC\r
+ mov ax, es\r
+ ret\r
+AsmReadEs ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadFs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadFs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadFs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadFs PROC\r
+ mov ax, fs\r
+ ret\r
+AsmReadFs ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadGdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadGdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+InternalX86ReadGdtr PROC\r
+ sgdt fword ptr [rcx]\r
+ ret\r
+InternalX86ReadGdtr ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadGs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadGs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadGs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadGs PROC\r
+ mov ax, gs\r
+ ret\r
+AsmReadGs ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadIdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadIdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+InternalX86ReadIdtr PROC\r
+ sidt fword ptr [rcx]\r
+ ret\r
+InternalX86ReadIdtr ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadLdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadLdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadLdtr (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadLdtr PROC\r
+ sldt eax\r
+ ret\r
+AsmReadLdtr ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm0 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm0 PROC\r
+ DB 48h, 0fh, 7eh, 0c0h\r
+ ret\r
+AsmReadMm0 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm1.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm1 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm1 PROC\r
+ DB 48h, 0fh, 7eh, 0c8h\r
+ ret\r
+AsmReadMm1 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm2 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm2 PROC\r
+ DB 48h, 0fh, 7eh, 0d0h\r
+ ret\r
+AsmReadMm2 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm3 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm3 PROC\r
+ DB 48h, 0fh, 7eh, 0d8h\r
+ ret\r
+AsmReadMm3 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm4 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm4 PROC\r
+ DB 48h, 0fh, 7eh, 0e0h\r
+ ret\r
+AsmReadMm4 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm5.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm5 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm5 PROC\r
+ DB 48h, 0fh, 7eh, 0e8h\r
+ ret\r
+AsmReadMm5 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm6.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm6 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm6 PROC\r
+ DB 48h, 0fh, 7eh, 0f0h\r
+ ret\r
+AsmReadMm6 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMm7.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMm7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadMm7 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm7 PROC\r
+ DB 48h, 0fh, 7eh, 0f8h\r
+ ret\r
+AsmReadMm7 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMsr32.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMsr32 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; AsmReadMsr32 (\r
+; IN UINT32 Index\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadMsr32 PROC\r
+ rdmsr\r
+ ret\r
+AsmReadMsr32 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadMsr64.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadMsr64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMsr64 (\r
+; IN UINT32 Index\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadMsr64 PROC\r
+ rdmsr\r
+ shl rax, 20h\r
+ shrd rax, rdx, 20h\r
+ ret\r
+AsmReadMsr64 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadPmc.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadPmc function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadPmc (\r
+; IN UINT32 PmcIndex\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadPmc PROC\r
+ rdpmc\r
+ shl ecx, 1\r
+ jnc @F\r
+ shl rax, 20h\r
+ shrd rax, rdx, 20h\r
+@@:\r
+ ret\r
+AsmReadPmc ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadSs.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadSs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadSs (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadSs PROC\r
+ mov ax, ss\r
+ ret\r
+AsmReadSs ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadTr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadTr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadTr (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadTr PROC\r
+ str eax\r
+ ret\r
+AsmReadTr ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; ReadTsc.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmReadTsc function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadTsc (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmReadTsc PROC\r
+ rdtsc\r
+ shl rax, 20h\r
+ shrd rax, rdx, 20h\r
+ ret\r
+AsmReadTsc ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; SetJump.Asm\r
+;\r
+; Abstract:\r
+;\r
+; Implementation of SetJump() on x64.\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+SetJump PROC\r
+ pop rdx\r
+ mov [rcx], rbx\r
+ mov [rcx + 8], rsp\r
+ mov [rcx + 10h], rbp\r
+ mov [rcx + 18h], rdi\r
+ mov [rcx + 20h], rsi\r
+ mov [rcx + 28h], r12\r
+ mov [rcx + 30h], r13\r
+ mov [rcx + 38h], r14\r
+ mov [rcx + 40h], r15\r
+ mov [rcx + 48h], rdx\r
+ xor rax, rax\r
+ jmp rdx\r
+SetJump ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; SwitchStack.Asm\r
+;\r
+; Abstract:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; Routine Description:\r
+;\r
+; Routine for switching stacks with 1 parameter\r
+;\r
+; Arguments:\r
+;\r
+; (rcx) EntryPoint - Entry point with new stack.\r
+; (rdx) Context - Parameter for entry point.\r
+; (r8) Context2 - Parameter2 for entry point.\r
+; (r9) NewStack - Pointer to new stack.\r
+;\r
+; Returns:\r
+;\r
+; None\r
+;\r
+;------------------------------------------------------------------------------\r
+SwitchStack PROC\r
+ mov rax, rcx\r
+ mov rcx, rdx\r
+ mov rdx, r8\r
+ lea rsp, [r9 - 20h]\r
+ call rax\r
+SwitchStack ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; Thunk.asm\r
+;\r
+; Abstract:\r
+;\r
+; Real mode thunk\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .data\r
+\r
+NullSegSel DQ 0\r
+_16CsSegSel LABEL QWORD\r
+ DW -1\r
+ DW 0\r
+ DB 0\r
+ DB 9bh\r
+ DB 8fh ; 16-bit segment\r
+ DB 0\r
+_16BitDsSel LABEL QWORD\r
+ DW -1\r
+ DW 0\r
+ DB 0\r
+ DB 93h\r
+ DB 8fh ; 16-bit segment\r
+ DB 0\r
+GdtEnd LABEL QWORD\r
+\r
+ .const\r
+\r
+_16Gdtr LABEL FWORD\r
+ DW offset GdtEnd - offset NullSegSel - 1\r
+ DQ offset NullSegSel\r
+\r
+_16Idtr FWORD (1 SHL 10) - 1\r
+\r
+ .code\r
+\r
+IA32_REGS STRUC 4t\r
+_EDI DD ?\r
+_ESI DD ?\r
+_EBP DD ?\r
+_ESP DD ?\r
+_EBX DD ?\r
+_EDX DD ?\r
+_ECX DD ?\r
+_EAX DD ?\r
+_DS DW ?\r
+_ES DW ?\r
+_FS DW ?\r
+_GS DW ?\r
+_RFLAGS DQ ?\r
+_EIP DD ?\r
+_CS DW ?\r
+_SS DW ?\r
+IA32_REGS ENDS\r
+\r
+InternalAsmThunk16 PROC USES rbp rbx rsi rdi r12 r13 r14 r15\r
+ mov eax, ds\r
+ push rax\r
+ mov eax, es\r
+ push rax\r
+ push fs\r
+ push gs\r
+ mov rsi, rcx ; rsi <- RegSet\r
+ push sizeof (IA32_REGS)\r
+ pop rcx\r
+ movzx r8, (IA32_REGS ptr [rsi])._SS\r
+ xor rdi, rdi\r
+ mov edi, (IA32_REGS ptr [rsi])._ESP\r
+ sub rdi, rcx ; reserve space on realmode stack\r
+ push rdi ; save stack offset\r
+ imul rax, r8, 16\r
+ add rdi, rax ; rdi <- linear address of 16-bit stack\r
+ rep movsb ; copy RegSet\r
+ mov rsi, r8 ; si <- 16-bit stack segment\r
+ pop rbx ; rbx <- 16-bit stack offset\r
+ mov rdi, rdx ; rdi <- realmode patch\r
+ lea eax, @BackToThunk ; rax <- address to back from real mode\r
+ push rax ; use in a far return\r
+ mov eax, cs\r
+ mov [rsp + 4], eax ; save CS\r
+ lea eax, @16Return ; thus @Return must < 4GB\r
+ stosd ; set ret address offset\r
+ xor eax, eax\r
+ stosw ; set ret CS base to 0\r
+ mov eax, esp\r
+ stosd ; rsp must < 4GB\r
+ mov eax, ss\r
+ stosd\r
+ mov rax, cr0\r
+ mov ecx, eax ; ecx <- CR0\r
+ and ecx, 7ffffffeh ; clear PE, PG bits\r
+ stosd\r
+ mov rax, cr4\r
+ mov ebp, eax\r
+ and ebp, 300h ; clear all but PCE and OSFXSR bits\r
+ stosd\r
+ sidt fword ptr [rsp + 70h] ; use parameter space to save IDTR\r
+ sgdt fword ptr [rdi]\r
+ lea edi, _16Idtr\r
+ lea eax, @16Start ; rax <- seg:offset of @16Start\r
+ push rax\r
+ mov dword ptr [rsp + 4], 8\r
+ push 10h\r
+ pop rax ; rax <- 10h as dataseg selector\r
+ lgdt _16Gdtr\r
+ retf\r
+@16Start: ; 16-bit starts here\r
+ mov ss, eax ; set SS to be a 16-bit segment\r
+ mov cr0, rcx ; disable protected mode\r
+ mov cr4, rbp\r
+ DB 66h\r
+ mov ecx, 0c0000080h\r
+ rdmsr\r
+ and ah, NOT 1 ; clear LME\r
+ wrmsr\r
+ mov ss, esi ; set up 16-bit stack\r
+ mov sp, bx ; mov esp, ebx actually\r
+ lidt fword ptr [edi]\r
+ DB 66h, 61h ; popad\r
+ DB 1fh ; pop ds\r
+ DB 7 ; pop es\r
+ pop fs\r
+ pop gs\r
+ add sp, 8 ; skip _RFLAGS\r
+ DB 66h\r
+ retf ; transfer control to 16-bit code\r
+@16Return:\r
+ DB 66h\r
+ push 0 ; high order 32 bits of rflags\r
+ pushf ; pushfd actually\r
+ push gs\r
+ push fs\r
+ DB 6 ; push es\r
+ DB 1eh ; push ds\r
+ DB 66h, 60h ; pushad\r
+ DB 67h, 66h, 0c5h, 74h, 24h, 30h ; lds esi, [esp + 12*4]\r
+ DB 66h\r
+ mov eax, [esi + 12]\r
+ mov cr4, rax ; restore CR4\r
+ DB 66h\r
+ lgdt fword ptr [esi + 16]\r
+ DB 66h\r
+ mov ecx, 0c0000080h\r
+ rdmsr\r
+ or ah, 1 ; set LME\r
+ wrmsr\r
+ DB 66h\r
+ mov eax, [esi + 8]\r
+ mov cr0, rax ; restore CR0\r
+ xor ax, ax ; xor eax, eax actually\r
+ mov eax, ss\r
+ mov dword ptr (IA32_REGS ptr [esp])._SS, eax\r
+ shl ax, 4 ; shl eax, 4 actually\r
+ add ax, sp ; add eax, esp actually\r
+ add sp, sizeof (IA32_REGS) ; add esp, sizeof (IA32_REGS)\r
+ DB 66h\r
+ mov dword ptr (IA32_REGS ptr [esp - sizeof (IA32_REGS)])._ESP, esp\r
+ DB 66h\r
+ lss esp, fword ptr [esi] ; restore protected mode stack\r
+ DB 66h\r
+ retf ; go back to protected mode\r
+@BackToThunk:\r
+ lidt fword ptr [rsp + 68h] ; restore protected mode IDTR\r
+ shl rax, 32\r
+ shr rax, 32 ; clear high order 32 bits of RAX\r
+ pop gs\r
+ pop fs\r
+ pop rcx\r
+ mov es, ecx\r
+ pop rcx\r
+ mov ds, ecx\r
+ ret\r
+InternalAsmThunk16 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; Wbinvd.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWbinvd function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWbinvd (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWbinvd PROC\r
+ wbinvd\r
+ ret\r
+AsmWbinvd ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteCr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteCr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr0 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteCr0 PROC\r
+ mov cr0, rcx\r
+ ret\r
+AsmWriteCr0 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteCr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteCr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr2 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteCr2 PROC\r
+ mov cr2, rcx\r
+ ret\r
+AsmWriteCr2 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteCr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteCr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr3 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteCr3 PROC\r
+ mov cr3, rcx\r
+ ret\r
+AsmWriteCr3 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteCr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteCr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr4 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteCr4 PROC\r
+ mov cr4, rcx\r
+ ret\r
+AsmWriteCr4 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr0 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr0 PROC\r
+ mov dr0, rcx\r
+ ret\r
+AsmWriteDr0 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr1.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr1 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr1 PROC\r
+ mov dr1, rcx\r
+ ret\r
+AsmWriteDr1 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr2 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr2 PROC\r
+ mov dr2, rcx\r
+ ret\r
+AsmWriteDr2 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr3 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr3 PROC\r
+ mov dr3, rcx\r
+ ret\r
+AsmWriteDr3 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr4 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr4 PROC\r
+ DB 0fh, 23h, 0e1h\r
+ ret\r
+AsmWriteDr4 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr5.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr5 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr5 PROC\r
+ DB 0fh, 23h, 0e9h\r
+ ret\r
+AsmWriteDr5 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr6.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr6 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr6 PROC\r
+ mov dr6, rcx\r
+ ret\r
+AsmWriteDr6 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteDr7.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteDr7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr7 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr7 PROC\r
+ mov dr7, rcx\r
+ ret\r
+AsmWriteDr7 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteGdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteGdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+InternalX86WriteGdtr PROC\r
+ lgdt fword ptr [rcx]\r
+ ret\r
+InternalX86WriteGdtr ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteIdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteIdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+InternalX86WriteIdtr PROC\r
+ lidt fword ptr [rcx]\r
+ ret\r
+InternalX86WriteIdtr ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteLdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteLdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteLdtr (\r
+; IN UINT16 Ldtr\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteLdtr PROC\r
+ lldt cx\r
+ ret\r
+AsmWriteLdtr ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm0.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteMm0 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm0 PROC\r
+ DB 48h, 0fh, 6eh, 0c1h\r
+ ret\r
+AsmWriteMm0 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm1.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteMm1 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm1 PROC\r
+ DB 48h, 0fh, 6eh, 0c9h\r
+ ret\r
+AsmWriteMm1 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm2.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteMm2 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm2 PROC\r
+ DB 48h, 0fh, 6eh, 0d1h\r
+ ret\r
+AsmWriteMm2 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm3.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteMm3 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm3 PROC\r
+ DB 48h, 0fh, 6eh, 0d9h\r
+ ret\r
+AsmWriteMm3 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm4.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteMm4 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm4 PROC\r
+ DB 48h, 0fh, 6eh, 0e1h\r
+ ret\r
+AsmWriteMm4 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm5.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteMm5 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm5 PROC\r
+ DB 48h, 0fh, 6eh, 0e9h\r
+ ret\r
+AsmWriteMm5 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm6.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteMm6 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm6 PROC\r
+ DB 48h, 0fh, 6eh, 0f1h\r
+ ret\r
+AsmWriteMm6 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMm7.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMm7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteMm7 (\r
+; VOID\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm7 PROC\r
+ DB 48h, 0fh, 6eh, 0f9h\r
+ ret\r
+AsmWriteMm7 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMsr32.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMsr32 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; AsmWriteMsr32 (\r
+; IN UINT32 Index,\r
+; IN UINT32 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMsr32 PROC\r
+ mov eax, edx\r
+ xor edx, edx\r
+ wrmsr\r
+ ret\r
+AsmWriteMsr32 ENDP\r
+\r
+ END\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. 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
+; WriteMsr64.Asm\r
+;\r
+; Abstract:\r
+;\r
+; AsmWriteMsr64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMsr64 (\r
+; IN UINT32 Index,\r
+; IN UINT64 Value\r
+; );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMsr64 PROC\r
+ push rdx\r
+ mov eax, edx\r
+ shr rdx, 20h\r
+ wrmsr\r
+ pop rax\r
+ ret\r
+AsmWriteMsr64 ENDP\r
+\r
+ END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ARShiftU64.asm\r
-;\r
-; Abstract:\r
-;\r
-; 64-bit arithmetic right shift function for IA-32\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686\r
- .model flat,C\r
- .code\r
-\r
-InternalMathARShiftU64 PROC\r
- mov cl, [esp + 12]\r
- mov eax, [esp + 8]\r
- cdq\r
- test cl, 32\r
- cmovz edx, eax\r
- cmovz eax, [esp + 4]\r
- shrd eax, edx, cl\r
- sar edx, cl\r
- ret\r
-InternalMathARShiftU64 ENDP\r
-\r
- END
\ No newline at end of file
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ARShiftU64.asm\r
-#\r
-# Abstract:\r
-#\r
-# 64-bit arithmetic right shift function for IA-32\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _ARShiftU64\r
-_ARShiftU64: \r
- movb 12(%esp),%cl\r
- movl 8(%esp),%eax\r
- cltd\r
- testb $32,%cl\r
-# MISMATCH: " cmovz edx, eax"\r
- cmovz %eax, %edx\r
-# MISMATCH: " cmovz eax, [esp + 4]"\r
- cmovz 4(%esp), %eax\r
- shrdl %cl,%edx,%eax\r
- sar %cl,%edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuBreakpoint.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuBreakpoint function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuBreakpoint (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_CpuBreakpoint PROC\r
- int 3\r
- ret\r
-_CpuBreakpoint ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------ ;\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# CpuBreakpoint.s\r
-#\r
-# Abstract:\r
-#\r
-# CpuBreakpoint function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# CpuBreakpoint (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _CpuBreakpoint\r
-_CpuBreakpoint: \r
- int 3\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuFlushTlb.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuFlushTlb function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuFlushTlb (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_CpuFlushTlb PROC\r
- mov eax, cr3\r
- mov cr3, eax\r
- ret\r
-_CpuFlushTlb ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------ ;\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# CpuFlushTlb.Asm\r
-#\r
-# Abstract:\r
-#\r
-# CpuFlushTlb function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# CpuFlushTlb (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _CpuFlushTlb\r
-_CpuFlushTlb: \r
- movl %cr3, %eax\r
- movl %eax, %cr3\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuId.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmCpuid function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat,C\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmCpuid (\r
-; IN UINT32 RegisterInEax,\r
-; OUT UINT32 *RegisterOutEax OPTIONAL,\r
-; OUT UINT32 *RegisterOutEbx OPTIONAL,\r
-; OUT UINT32 *RegisterOutEcx OPTIONAL,\r
-; OUT UINT32 *RegisterOutEdx OPTIONAL\r
-; )\r
-;------------------------------------------------------------------------------\r
-AsmCpuid PROC USES ebx\r
- push ebp\r
- mov ebp, esp\r
- mov eax, [ebp + 12]\r
- cpuid\r
- push ecx\r
- mov ecx, [ebp + 16]\r
- jecxz @F\r
- mov [ecx], eax\r
-@@:\r
- mov ecx, [ebp + 20]\r
- jecxz @F\r
- mov [ecx], ebx\r
-@@:\r
- mov ecx, [ebp + 24]\r
- jecxz @F\r
- pop [ecx]\r
-@@:\r
- mov ecx, [ebp + 28]\r
- jecxz @F\r
- mov [ecx], edx\r
-@@:\r
- mov eax, [ebp + 12]\r
- leave\r
- ret\r
-AsmCpuid ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# CpuId.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmCpuid function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmCpuid (\r
-# IN UINT32 RegisterInEax,\r
-# OUT UINT32 *RegisterOutEax OPTIONAL,\r
-# OUT UINT32 *RegisterOutEbx OPTIONAL,\r
-# OUT UINT32 *RegisterOutEcx OPTIONAL,\r
-# OUT UINT32 *RegisterOutEdx OPTIONAL\r
-# )\r
-#------------------------------------------------------------------------------\r
-.globl _AsmCpuid\r
-_AsmCpuid:\r
- push %ebx\r
- push %edi\r
- movl 12(%esp),%eax\r
- cpuid\r
- movl %ecx,%edi\r
- movl 16(%esp),%ecx\r
- jecxz L1\r
- movl %eax,(%ecx)\r
-L1:\r
- movl 20(%esp),%ecx\r
- jecxz L2\r
- movl %ebx,(%ecx)\r
-L2:\r
- movl 24(%esp),%ecx\r
- jecxz L3\r
- movl %edi,(%ecx)\r
-L3:\r
- movl 28(%esp),%ecx\r
- jecxz L4\r
- movl %edx,(%ecx)\r
-L4:\r
- pop %edi\r
- pop %ebx\r
- ret\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuPause.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuPause function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuPause (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_CpuPause PROC\r
- pause\r
- ret\r
-_CpuPause ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------ ;\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# CpuPause.Asm\r
-#\r
-# Abstract:\r
-#\r
-# CpuPause function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# CpuPause (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _CpuPause\r
-_CpuPause: \r
- pause\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuSleep.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuSleep function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuSleep (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_CpuSleep PROC\r
- hlt\r
- ret\r
-_CpuSleep ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------ ;\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# CpuSleep.Asm\r
-#\r
-# Abstract:\r
-#\r
-# CpuSleep function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# CpuSleep (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _CpuSleep\r
-_CpuSleep: \r
- hlt\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; DisableInterrupts.Asm\r
-;\r
-; Abstract:\r
-;\r
-; DisableInterrupts function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; DisableInterrupts (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_DisableInterrupts PROC\r
- cli\r
- ret\r
-_DisableInterrupts ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# DisableInterrupts.Asm\r
-#\r
-# Abstract:\r
-#\r
-# DisableInterrupts function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# DisableInterrupts (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _DisableInterrupts\r
-_DisableInterrupts: \r
- cli\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; DisablePaging32.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmDisablePaging32 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; InternalX86DisablePaging32 (\r
-; IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
-; IN VOID *Context1, OPTIONAL\r
-; IN VOID *Context2, OPTIONAL\r
-; IN VOID *NewStack\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalX86DisablePaging32 PROC\r
- mov ebx, [esp + 4]\r
- mov ecx, [esp + 8]\r
- mov edx, [esp + 12]\r
- pushfd\r
- pop edi\r
- cli\r
- mov eax, cr0\r
- btr eax, 31\r
- mov esp, [esp + 16]\r
- mov cr0, eax\r
- push edi\r
- popfd\r
- push edx\r
- push ecx\r
- call ebx\r
- jmp $\r
-InternalX86DisablePaging32 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# DisablePaging32.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmDisablePaging32 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmDisablePaging32 (\r
-# IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
-# IN VOID *Context1, OPTIONAL\r
-# IN VOID *Context2, OPTIONAL\r
-# IN VOID *NewStack\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmDisablePaging32\r
-_AsmDisablePaging32: \r
- movl 4(%esp),%ebx\r
- movl 8(%esp),%ecx\r
- movl 12(%esp),%edx\r
- pushfl\r
- popl %edi\r
- cli\r
- movl %cr0, %eax\r
- btrl $31,%eax\r
- movl 16(%esp),%esp\r
- movl %eax, %cr0\r
- pushl %edi\r
- popfl\r
- pushl %edx\r
- pushl %ecx\r
- call *%ebx\r
- jmp .\r
-\r
-\r
-\r
+++ /dev/null
-/** @file\r
- Integer division worker functions for Ia32.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. 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: DivS64x64Remainder.c\r
-\r
-**/\r
-\r
-#include "../BaseLibInternals.h"\r
-\r
-INT64\r
-EFIAPI\r
-InternalMathDivRemS64x64 (\r
- IN INT64 Dividend,\r
- IN INT64 Divisor,\r
- OUT INT64 *Remainder\r
- )\r
-{\r
- INT64 Quot;\r
-\r
- Quot = InternalMathDivRemU64x64 (\r
- Dividend >= 0 ? Dividend : -Dividend,\r
- Divisor >= 0 ? Divisor : -Divisor,\r
- (UINT64 *) Remainder\r
- );\r
- if (Remainder != NULL && Dividend < 0) {\r
- *Remainder = -*Remainder;\r
- }\r
- return (Dividend ^ Divisor) >= 0 ? Quot : -Quot;\r
-}\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; DivU64x32.asm\r
-;\r
-; Abstract:\r
-;\r
-; Calculate the quotient of a 64-bit integer by a 32-bit integer\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-InternalMathDivU64x32 PROC\r
- mov eax, [esp + 8]\r
- mov ecx, [esp + 12]\r
- xor edx, edx\r
- div ecx\r
- push eax\r
- mov eax, [esp + 8]\r
- div ecx\r
- pop edx\r
- ret\r
-InternalMathDivU64x32 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# DivU64x32.asm\r
-#\r
-# Abstract:\r
-#\r
-# Calculate the quotient of a 64-bit integer by a 32-bit integer\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _DivU64x32\r
-_DivU64x32: \r
- movl 8(%esp),%eax\r
- movl 12(%esp),%ecx\r
- xorl %edx,%edx\r
- divl %ecx\r
- pushl %eax\r
- movl 8(%esp),%eax\r
- divl %ecx\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; DivError.asm\r
-;\r
-; Abstract:\r
-;\r
-; Set error flag for all division functions\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-InternalMathDivRemU64x32 PROC\r
- mov ecx, [esp + 12]\r
- mov eax, [esp + 8]\r
- xor edx, edx\r
- div ecx\r
- push eax\r
- mov eax, [esp + 8]\r
- div ecx\r
- mov ecx, [esp + 20]\r
- jecxz @F\r
- mov [ecx], edx\r
-@@:\r
- pop edx\r
- ret\r
-InternalMathDivRemU64x32 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# DivError.asm\r
-#\r
-# Abstract:\r
-#\r
-# Set error flag for all division functions\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _InternalMathDivRemU64x32\r
-_InternalMathDivRemU64x32: \r
- movl 12(%esp),%ecx\r
- movl 8(%esp),%eax\r
- xorl %edx,%edx\r
- divl %ecx\r
- pushl %eax\r
- movl 8(%esp),%eax\r
- divl %ecx\r
- movl 20(%esp),%ecx\r
- jecxz L1\r
- movl %edx,(%ecx)\r
-L1: \r
- popl %edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; DivU64x64Remainder.asm\r
-;\r
-; Abstract:\r
-;\r
-; Calculate the quotient of a 64-bit integer by a 64-bit integer and returns\r
-; both the quotient and the remainder\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-EXTERN InternalMathDivRemU64x32:PROC\r
-\r
-InternalMathDivRemU64x64 PROC\r
- mov ecx, [esp + 16]\r
- test ecx, ecx\r
- jnz _@DivRemU64x64\r
- mov ecx, [esp + 20]\r
- jecxz @F\r
- and dword ptr [ecx + 4], 0\r
- mov [esp + 16], ecx\r
-@@:\r
- jmp InternalMathDivRemU64x32\r
-InternalMathDivRemU64x64 ENDP\r
-\r
-_@DivRemU64x64 PROC USES ebx esi edi\r
- mov edx, dword ptr [esp + 20]\r
- mov eax, dword ptr [esp + 16]\r
- mov edi, edx\r
- mov esi, eax\r
- mov ebx, dword ptr [esp + 24]\r
-@@:\r
- shr edx, 1\r
- rcr eax, 1\r
- shrd ebx, ecx, 1\r
- shr ecx, 1\r
- jnz @B\r
- div ebx\r
- mov ebx, eax\r
- mov ecx, [esp + 28]\r
- mul dword ptr [esp + 24]\r
- imul ecx, ebx\r
- add edx, ecx\r
- mov ecx, dword ptr [esp + 32]\r
- jc @TooLarge\r
- cmp edi, edx\r
- ja @Correct\r
- jb @TooLarge\r
- cmp esi, eax\r
- jae @Correct\r
-@TooLarge:\r
- dec ebx\r
- jecxz @Return\r
- sub eax, dword ptr [esp + 24]\r
- sbb edx, dword ptr [esp + 28]\r
-@Correct:\r
- jecxz @Return\r
- sub esi, eax\r
- sbb edi, edx\r
- mov [ecx], esi\r
- mov [ecx + 4], edi\r
-@Return:\r
- mov eax, ebx\r
- xor edx, edx\r
- ret\r
-_@DivRemU64x64 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# DivU64x64Remainder.asm\r
-#\r
-# Abstract:\r
-#\r
-# Calculate the quotient of a 64-bit integer by a 64-bit integer and returns\r
-# both the quotient and the remainder\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.extern _InternalMathDivRemU64x32\r
-\r
-.global _InternalMathDivRemU64x64\r
-_InternalMathDivRemU64x64: \r
- movl 16(%esp),%ecx\r
- testl %ecx,%ecx\r
- jnz _DivRemU64x64\r
- movl 20(%esp),%ecx\r
- jecxz L1\r
- and $0,4(%ecx)\r
- movl %ecx,16(%esp)\r
-L1: \r
- jmp _InternalMathDivRemU64x32\r
-\r
-\r
-.global DivRemU64x64\r
-DivRemU64x64:\r
-# MISMATCH: "DivRemU64x64: USES ebx esi edi"\r
- push %ebx \r
- push %esi \r
- push %edi \r
- mov 20(%esp), %edx\r
- mov 16(%esp), %eax\r
- movl %edx,%edi\r
- movl %eax,%esi\r
- mov 24(%esp), %ebx\r
-L2: \r
- shrl %edx\r
- rcrl $1,%eax\r
- shrdl $1,%ecx,%ebx\r
- shrl %ecx\r
- jnz L2\r
- divl %ebx\r
- movl %eax,%ebx\r
- movl 28(%esp),%ecx\r
- mull 24(%esp)\r
- imull %ebx,%ecx\r
- addl %ecx,%edx\r
- mov 32(%esp), %ecx\r
- jc TooLarge\r
- cmpl %edx,%edi\r
- ja Correct\r
- jb TooLarge\r
- cmpl %eax,%esi\r
- jae Correct\r
-TooLarge: \r
- decl %ebx\r
- jecxz Return\r
- sub 24(%esp), %eax\r
- sbb 28(%esp), %edx\r
-Correct: \r
- jecxz Return\r
- subl %eax,%esi\r
- sbbl %edx,%edi\r
- movl %esi,(%ecx)\r
- movl %edi,4(%ecx)\r
-Return: \r
- movl %ebx,%eax\r
- xorl %edx,%edx\r
- push %edi \r
- push %esi \r
- push %ebx \r
- ret\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; EnableDisableInterrupts.Asm\r
-;\r
-; Abstract:\r
-;\r
-; EnableDisableInterrupts function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; EnableDisableInterrupts (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_EnableDisableInterrupts PROC\r
- sti\r
- cli\r
- ret\r
-_EnableDisableInterrupts ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# EnableDisableInterrupts.Asm\r
-#\r
-# Abstract:\r
-#\r
-# EnableDisableInterrupts function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# EnableDisableInterrupts (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _EnableDisableInterrupts\r
-_EnableDisableInterrupts: \r
- sti\r
- cli\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; EnableInterrupts.Asm\r
-;\r
-; Abstract:\r
-;\r
-; EnableInterrupts function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; EnableInterrupts (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_EnableInterrupts PROC\r
- sti\r
- ret\r
-_EnableInterrupts ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# EnableInterrupts.Asm\r
-#\r
-# Abstract:\r
-#\r
-# EnableInterrupts function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# EnableInterrupts (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _EnableInterrupts\r
-_EnableInterrupts: \r
- sti\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; EnablePaging32.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmEnablePaging32 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; InternalX86EnablePaging32 (\r
-; IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
-; IN VOID *Context1, OPTIONAL\r
-; IN VOID *Context2, OPTIONAL\r
-; IN VOID *NewStack\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalX86EnablePaging32 PROC\r
- mov ebx, [esp + 4]\r
- mov ecx, [esp + 8]\r
- mov edx, [esp + 12]\r
- pushfd\r
- pop edi\r
- cli\r
- mov eax, cr0\r
- bts eax, 31\r
- mov esp, [esp + 16]\r
- mov cr0, eax\r
- push edi\r
- popfd\r
- push edx\r
- push ecx\r
- call ebx\r
- jmp $\r
-InternalX86EnablePaging32 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# EnablePaging32.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmEnablePaging32 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmEnablePaging32 (\r
-# IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
-# IN VOID *Context1, OPTIONAL\r
-# IN VOID *Context2, OPTIONAL\r
-# IN VOID *NewStack\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmEnablePaging32\r
-_AsmEnablePaging32: \r
- movl 4(%esp),%ebx\r
- movl 8(%esp),%ecx\r
- movl 12(%esp),%edx\r
- pushfl\r
- popl %edi\r
- cli\r
- movl %cr0, %eax\r
- btsl $31,%eax\r
- movl 16(%esp),%esp\r
- movl %eax, %cr0\r
- pushl %edi\r
- popfl\r
- pushl %edx\r
- pushl %ecx\r
- call *%ebx\r
- jmp .\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; EnablePaging64.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmEnablePaging64 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686p\r
- .model flat,C\r
- .code\r
-\r
-InternalX86EnablePaging64 PROC\r
- cli\r
- mov [esp], @F ; offset for far retf\r
- mov eax, cr4\r
- or al, (1 SHL 5)\r
- mov cr4, eax ; enable PAE\r
- mov ecx, 0c0000080h\r
- rdmsr\r
- or ah, 1 ; set LME\r
- wrmsr\r
- mov eax, cr0\r
- bts eax, 31\r
- mov cr0, eax ; enable paging\r
- retf\r
-@@: ; long mode starts here\r
- DB 67h, 48h\r
- mov ebx, [esp] ; mov rbx, [esp]\r
- DB 67h, 48h\r
- mov ecx, [esp + 8] ; mov rcx, [esp + 8]\r
- DB 67h, 48h\r
- mov edx, [esp + 10h] ; mov rdx, [esp + 10h]\r
- DB 67h, 48h\r
- mov esp, [esp + 18h] ; mov rsp, [esp + 18h]\r
- DB 48h\r
- add esp, -20h ; add rsp, -20h\r
- call ebx ; call rbx\r
- jmp $\r
-InternalX86EnablePaging64 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# EnablePaging64.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmEnablePaging64 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
- \r
- #.MODEL flat\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmEnablePaging64 (\r
-# IN UINT16 CodeSelector,\r
-# IN UINT64 EntryPoint,\r
-# IN UINT64 Context1, OPTIONAL\r
-# IN UINT64 Context2, OPTIONAL\r
-# IN UINT64 NewStack\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmEnablePaging64\r
-_AsmEnablePaging64:\r
- cli\r
- movl $$LongStart, (%esp)\r
- movl %cr4, %eax\r
- orb $0x20, %al\r
- movl %eax, %cr4 # enable PAE\r
- movl $0xc0000080, %ecx\r
- rdmsr\r
- orb $1, %ah # set LME\r
- wrmsr\r
- movl %cr0, %eax\r
- btsl $31, %eax\r
- movl %eax, %cr0 # enable paging\r
- lret\r
-LongStart: # long mode starts here\r
- .byte 0x67,0x48\r
- movl (%esp), %ebx # mov rbx, [esp]\r
- .byte 0x67,0x48\r
- movl 8(%esp), %ecx # mov rcx, [esp + 8]\r
- .byte 0x67,0x48\r
- movl 0x10(%esp), %edx # mov rdx, [esp + 10h]\r
- .byte 0x67,0x48\r
- movl 0x18(%esp), %esp # mov rsp, [esp + 18h]\r
- .byte 0x48\r
- addl $0x-20, %esp # add rsp, -20h\r
- call *%ebx # call rbx\r
- jmp .\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; FlushCacheLine.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmFlushCacheLine function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmFlushCacheLine (\r
-; IN VOID *LinearAddress\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmFlushCacheLine PROC\r
- mov eax, [esp + 4]\r
- clflush [eax]\r
- ret\r
-_AsmFlushCacheLine ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# FlushCacheLine.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmFlushCacheLine function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmFlushCacheLine (\r
-# IN VOID *LinearAddress\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmFlushCacheLine\r
-_AsmFlushCacheLine: \r
- movl 4(%esp),%eax\r
- clflush (%eax)\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; FxRestore.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmFxRestore function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat,C\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; InternalX86FxRestore (\r
-; IN CONST IA32_FX_BUFFER *Buffer\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalX86FxRestore PROC\r
- mov eax, [esp + 4]\r
- fxrstor [eax]\r
- ret\r
-InternalX86FxRestore ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# FxRestore.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmFxRestore function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmFxRestore (\r
-# IN CONST IA32_FX_BUFFER *Buffer\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmFxRestore\r
-_AsmFxRestore: \r
- movl 4(%esp),%eax\r
- fxrstor (%eax)\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; FxSave.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmFxSave function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat,C\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; InternalX86FxSave (\r
-; OUT IA32_FX_BUFFER *Buffer\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalX86FxSave PROC\r
- mov eax, [esp + 4]\r
- fxsave [eax]\r
- ret\r
-InternalX86FxSave ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# FxSave.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmFxSave function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmFxSave (\r
-# OUT IA32_FX_BUFFER *Buffer\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmFxSave\r
-_AsmFxSave: \r
- movl 4(%esp),%eax\r
- fxsave (%eax)\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; InterlockedCompareExchange32.Asm\r
-;\r
-; Abstract:\r
-;\r
-; InterlockedCompareExchange32 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .486\r
- .model flat,C\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT32\r
-; EFIAPI\r
-; InterlockedCompareExchange32 (\r
-; IN UINT32 *Value,\r
-; IN UINT32 CompareValue,\r
-; IN UINT32 ExchangeValue\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalSyncCompareExchange32 PROC\r
- mov ecx, [esp + 4]\r
- mov eax, [esp + 8]\r
- mov edx, [esp + 12]\r
- lock cmpxchg [ecx], edx\r
- ret\r
-InternalSyncCompareExchange32 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# InterlockedCompareExchange32.Asm\r
-#\r
-# Abstract:\r
-#\r
-# InterlockedCompareExchange32 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID *\r
-# EFIAPI\r
-# InterlockedCompareExchangePointer (\r
-# IN VOID **Value,\r
-# IN VOID *CompareValue,\r
-# IN VOID *ExchangeValue\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedCompareExchangePointer\r
-_InterlockedCompareExchangePointer: \r
- #\r
- # InterlockedCompareExchangePointer() shares the same code as\r
- # InterlockedCompareExchange32() on IA32 and thus no code inside this\r
- # function\r
- #\r
-\r
-\r
-#------------------------------------------------------------------------------\r
-# UINT32\r
-# EFIAPI\r
-# InterlockedCompareExchange32 (\r
-# IN UINT32 *Value,\r
-# IN UINT32 CompareValue,\r
-# IN UINT32 ExchangeValue\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedCompareExchange32\r
-_InterlockedCompareExchange32: \r
- movl 4(%esp),%ecx\r
- movl 8(%esp),%eax\r
- movl 12(%esp),%edx\r
- lock cmpxchgl %edx,(%ecx)\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; InterlockedCompareExchange64.Asm\r
-;\r
-; Abstract:\r
-;\r
-; InterlockedCompareExchange64 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat,C\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; InterlockedCompareExchange64 (\r
-; IN UINT64 *Value,\r
-; IN UINT64 CompareValue,\r
-; IN UINT64 ExchangeValue\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalSyncCompareExchange64 PROC USES esi ebx\r
- mov esi, [esp + 12]\r
- mov eax, [esp + 16]\r
- mov edx, [esp + 20]\r
- mov ebx, [esp + 24]\r
- mov ecx, [esp + 28]\r
- lock cmpxchg8b qword ptr [esi]\r
- ret\r
-InternalSyncCompareExchange64 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# InterlockedCompareExchange64.Asm\r
-#\r
-# Abstract:\r
-#\r
-# InterlockedCompareExchange64 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# InterlockedCompareExchange64 (\r
-# IN UINT64 *Value,\r
-# IN UINT64 CompareValue,\r
-# IN UINT64 ExchangeValue\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedCompareExchange64\r
- push %esi\r
- push %ebx\r
- movl 12(%esp),%esi\r
- movl 16(%esp),%eax\r
- movl 20(%esp),%edx\r
- movl 24(%esp),%ebx\r
- movl 28(%esp),%ecx\r
- lock \r
- cmpxchg8b (%esi)\r
- pop %ebx\r
- pop %esi\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; InterlockedDecrement.Asm\r
-;\r
-; Abstract:\r
-;\r
-; InterlockedDecrement function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT32\r
-; EFIAPI\r
-; InterlockedDecrement (\r
-; IN UINT32 *Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalSyncDecrement PROC\r
- mov eax, [esp + 4]\r
- lock dec dword ptr [eax]\r
- mov eax, [eax]\r
- ret\r
-InternalSyncDecrement ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# InterlockedDecrement.Asm\r
-#\r
-# Abstract:\r
-#\r
-# InterlockedDecrement function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT32\r
-# EFIAPI\r
-# InterlockedDecrement (\r
-# IN UINT32 *Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedDecrement\r
-_InterlockedDecrement: \r
- movl 4(%esp),%eax\r
- lock \r
- decl (%eax)\r
- movl (%eax),%eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; InterlockedIncrement.Asm\r
-;\r
-; Abstract:\r
-;\r
-; InterlockedIncrement function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT32\r
-; EFIAPI\r
-; InterlockedIncrement (\r
-; IN UINT32 *Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalSyncIncrement PROC\r
- mov eax, [esp + 4]\r
- lock inc dword ptr [eax]\r
- mov eax, [eax]\r
- ret\r
-InternalSyncIncrement ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# InterlockedIncrement.Asm\r
-#\r
-# Abstract:\r
-#\r
-# InterlockedIncrement function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT32\r
-# EFIAPI\r
-# InterlockedIncrement (\r
-# IN UINT32 *Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedIncrement\r
-_InterlockedIncrement: \r
- movl 4(%esp),%eax\r
- lock \r
- incl (%eax)\r
- movl (%eax),%eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; Invd.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmInvd function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .486p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmInvd (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmInvd PROC\r
- invd\r
- ret\r
-_AsmInvd ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# Invd.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmInvd function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmInvd (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmInvd\r
-_AsmInvd: \r
- invd\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; LRotU64.asm\r
-;\r
-; Abstract:\r
-;\r
-; 64-bit left rotation for Ia32\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686\r
- .model flat,C\r
- .code\r
-\r
-InternalMathLRotU64 PROC USES ebx\r
- mov cl, [esp + 16]\r
- mov edx, [esp + 12]\r
- mov eax, [esp + 8]\r
- shld ebx, edx, cl\r
- shld edx, eax, cl\r
- ror ebx, cl\r
- shld eax, ebx, cl\r
- test cl, 32\r
- cmovnz ecx, eax\r
- cmovnz eax, edx\r
- cmovnz edx, ecx\r
- ret\r
-InternalMathLRotU64 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# LRotU64.asm\r
-#\r
-# Abstract:\r
-#\r
-# 64-bit left rotation for Ia32\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _LRotU64\r
- push %ebx\r
- movb 16(%esp),%cl\r
- movl 12(%esp),%edx\r
- movl 8(%esp),%eax\r
- shldl %cl,%edx,%ebx\r
- shldl %cl,%eax,%edx\r
- rorl %cl,%ebx\r
- shldl %cl,%ebx,%eax\r
- testb $32,%cl\r
- cmovnz %eax, %ecx\r
- cmovnz %edx, %eax \r
- cmovnz %ecx, %edx\r
- pop %ebx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; LShiftU64.asm\r
-;\r
-; Abstract:\r
-;\r
-; 64-bit left shift function for IA-32\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686\r
- .model flat,C\r
- .code\r
-\r
-InternalMathLShiftU64 PROC\r
- mov cl, [esp + 12]\r
- xor eax, eax\r
- mov edx, [esp + 4]\r
- test cl, 32\r
- cmovz eax, edx\r
- cmovz edx, [esp + 8]\r
- shld edx, eax, cl\r
- shl eax, cl\r
- ret\r
-InternalMathLShiftU64 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# LShiftU64.asm\r
-#\r
-# Abstract:\r
-#\r
-# 64-bit left shift function for IA-32\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _LShiftU64\r
-_LShiftU64: \r
- movb 12(%esp),%cl\r
- xorl %eax,%eax\r
- movl 4(%esp),%edx\r
- testb $32,%cl\r
- cmovz %edx, %eax\r
- cmovz 8(%esp), %edx\r
- shldl %cl,%eax,%edx\r
- shll %cl,%eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; LongJump.Asm\r
-;\r
-; Abstract:\r
-;\r
-; Implementation of LongJump() on IA-32.\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-_LongJump PROC\r
- pop eax\r
- pop edx\r
- pop eax\r
- mov ebx, [edx]\r
- mov esi, [edx + 4]\r
- mov edi, [edx + 8]\r
- mov ebp, [edx + 12]\r
- mov esp, [edx + 16]\r
- jmp dword ptr [edx + 20]\r
-_LongJump ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# LongJump.Asm\r
-#\r
-# Abstract:\r
-#\r
-# Implementation of LongJump() on IA-32.\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _LongJump\r
-_LongJump: \r
- popl %eax\r
- popl %edx\r
- popl %eax\r
- movl (%edx),%ebx\r
- movl 4(%edx),%esi\r
- movl 8(%edx),%edi\r
- movl 12(%edx),%ebp\r
- movl 16(%edx),%esp\r
- jmpl *20(%edx)\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; DivU64x32.asm\r
-;\r
-; Abstract:\r
-;\r
-; Calculate the remainder of a 64-bit integer by a 32-bit integer\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-InternalMathModU64x32 PROC\r
- mov eax, [esp + 8]\r
- mov ecx, [esp + 12]\r
- xor edx, edx\r
- div ecx\r
- mov eax, [esp + 4]\r
- div ecx\r
- mov eax, edx\r
- ret\r
-InternalMathModU64x32 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# DivU64x32.asm\r
-#\r
-# Abstract:\r
-#\r
-# Calculate the remainder of a 64-bit integer by a 32-bit integer\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _ModU64x32\r
-_ModU64x32: \r
- movl 8(%esp),%eax\r
- movl 12(%esp),%ecx\r
- xorl %edx,%edx\r
- divl %ecx\r
- movl 4(%esp),%eax\r
- divl %ecx\r
- movl %edx,%eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; Monitor.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmMonitor function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmMonitor (\r
-; IN UINTN Eax,\r
-; IN UINTN Ecx,\r
-; IN UINTN Edx\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmMonitor PROC\r
- mov eax, [esp + 4]\r
- mov ecx, [esp + 8]\r
- mov edx, [esp + 12]\r
- DB 0fh, 1, 0c8h\r
- ret\r
-_AsmMonitor ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# Monitor.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmMonitor function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmMonitor (\r
-# IN UINTN Eax,\r
-# IN UINTN Ecx,\r
-# IN UINTN Edx\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmMonitor\r
-_AsmMonitor: \r
- movl 4(%esp),%eax\r
- movl 8(%esp),%ecx\r
- movl 12(%esp),%edx\r
- monitor %eax,%ecx,%edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; MultU64x32.asm\r
-;\r
-; Abstract:\r
-;\r
-; Calculate the product of a 64-bit integer and a 32-bit integer\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-InternalMathMultU64x32 PROC\r
- mov ecx, [esp + 12]\r
- mov eax, ecx\r
- imul ecx, [esp + 8]\r
- mul dword ptr [esp + 4]\r
- add edx, ecx\r
- ret\r
-InternalMathMultU64x32 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# MultU64x32.asm\r
-#\r
-# Abstract:\r
-#\r
-# Calculate the product of a 64-bit integer and a 32-bit integer\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _MultU64x32\r
-_MultU64x32: \r
- movl 12(%esp),%ecx\r
- movl %ecx,%eax\r
- imull 8(%esp),%ecx\r
- mull 4(%esp)\r
- addl %ecx,%edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; MultU64x64.asm\r
-;\r
-; Abstract:\r
-;\r
-; Calculate the product of a 64-bit integer and another 64-bit integer\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-InternalMathMultU64x64 PROC USES ebx\r
- mov ebx, [esp + 8]\r
- mov edx, [esp + 16]\r
- mov ecx, ebx\r
- mov eax, edx\r
- imul ebx, [esp + 20]\r
- imul edx, [esp + 12]\r
- add ebx, edx\r
- mul ecx\r
- add edx, ebx\r
- ret\r
-InternalMathMultU64x64 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# MultU64x64.asm\r
-#\r
-# Abstract:\r
-#\r
-# Calculate the product of a 64-bit integer and another 64-bit integer\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _MultS64x64\r
-_MultS64x64: \r
- #\r
- # MultS64x32 shares the same implementation with _MultU64x32, and thus no\r
- # code inside this function.\r
- #\r
-\r
-\r
-.global _MultU64x64\r
- push %ebx\r
- movl 8(%esp),%ebx\r
- movl 16(%esp),%edx\r
- movl %ebx,%ecx\r
- movl %edx,%eax\r
- imull 20(%esp),%ebx\r
- imull 12(%esp),%edx\r
- addl %edx,%ebx\r
- mull %ecx\r
- addl %ebx,%edx\r
- pop %ebx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; Mwait.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmMwait function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmMwait (\r
-; IN UINTN Eax,\r
-; IN UINTN Ecx\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmMwait PROC\r
- mov eax, [esp + 4]\r
- mov ecx, [esp + 8]\r
- DB 0fh, 1, 0c9h\r
- ret\r
-_AsmMwait ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# Mwait.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmMwait function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmMwait (\r
-# IN UINTN Eax,\r
-# IN UINTN Ecx\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmMwait\r
-_AsmMwait: \r
- movl 4(%esp),%eax\r
- movl 8(%esp),%ecx\r
- mwait %eax,%ecx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-/** @file\r
- Non-existing BaseLib functions on Ia32\r
-\r
- Copyright (c) 2006, Intel Corporation\r
- All rights reserved. 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: Non-existing.c\r
-\r
-**/\r
-\r
-#include "../BaseLibInternals.h"\r
-\r
-VOID\r
-EFIAPI\r
-InternalX86DisablePaging64 (\r
- IN UINT16 CodeSelector,\r
- IN UINT32 EntryPoint,\r
- IN UINT32 Context1, OPTIONAL\r
- IN UINT32 Context2, OPTIONAL\r
- IN UINT32 NewStack\r
- )\r
-{\r
- ASSERT (FALSE);\r
-}\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; RRotU64.asm\r
-;\r
-; Abstract:\r
-;\r
-; 64-bit right rotation for Ia32\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686\r
- .model flat,C\r
- .code\r
-\r
-InternalMathRRotU64 PROC USES ebx\r
- mov cl, [esp + 16]\r
- mov eax, [esp + 8]\r
- mov edx, [esp + 12]\r
- shrd ebx, eax, cl\r
- shrd eax, edx, cl\r
- rol ebx, cl\r
- shrd edx, ebx, cl\r
- test cl, 32\r
- cmovnz ecx, eax\r
- cmovnz eax, edx\r
- cmovnz edx, ecx\r
- ret\r
-InternalMathRRotU64 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# RRotU64.asm\r
-#\r
-# Abstract:\r
-#\r
-# 64-bit right rotation for Ia32\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _RRotU64\r
- push %ebx\r
- movb 16(%esp),%cl\r
- movl 8(%esp),%eax\r
- movl 12(%esp),%edx\r
- shrdl %cl,%eax,%ebx\r
- shrdl %cl,%edx,%eax\r
- roll %cl,%ebx\r
- shrdl %cl,%ebx,%edx\r
- testb $32,%cl\r
- cmovnz %eax, %ecx\r
- cmovnz %edx, %eax\r
- cmovnz %ecx, %edx\r
- pop %ebx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; RShiftU64.asm\r
-;\r
-; Abstract:\r
-;\r
-; 64-bit logical right shift function for IA-32\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686\r
- .model flat,C\r
- .code\r
-\r
-InternalMathRShiftU64 PROC\r
- mov cl, [esp + 12]\r
- xor edx, edx\r
- mov eax, [esp + 8]\r
- test cl, 32\r
- cmovz edx, eax\r
- cmovz eax, [esp + 4]\r
- shrd eax, edx, cl\r
- shr edx, cl\r
- ret\r
-InternalMathRShiftU64 ENDP\r
-\r
- END
\ No newline at end of file
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# RShiftU64.asm\r
-#\r
-# Abstract:\r
-#\r
-# 64-bit logical right shift function for IA-32\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _RShiftU64\r
-_RShiftU64: \r
- movb 12(%esp),%cl\r
- xorl %edx,%edx\r
- movl 8(%esp),%eax\r
- testb $32,%cl\r
- cmovz %eax, %edx\r
- cmovz 4(%esp), %eax\r
- shrdl %cl,%edx,%eax\r
- shrl %cl,%edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadCr0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadCr0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadCr0 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadCr0 PROC\r
- mov eax, cr0\r
- ret\r
-_AsmReadCr0 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadCr0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadCr0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadCr0 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadCr0\r
-_AsmReadCr0: \r
- movl %cr0, %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadCr2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadCr2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadCr2 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadCr2 PROC\r
- mov eax, cr2\r
- ret\r
-_AsmReadCr2 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadCr2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadCr2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadCr2 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadCr2\r
-_AsmReadCr2: \r
- movl %cr2, %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadCr3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadCr3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadCr3 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadCr3 PROC\r
- mov eax, cr3\r
- ret\r
-_AsmReadCr3 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadCr3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadCr3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadCr3 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadCr3\r
-_AsmReadCr3: \r
- movl %cr3, %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadCr4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadCr4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadCr4 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadCr4 PROC\r
- mov eax, cr4\r
- ret\r
-_AsmReadCr4 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadCr4.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadCr4 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadCr4 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadCr4\r
-_AsmReadCr4: \r
- movl %cr4, %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadCs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadCs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadCs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadCs PROC\r
- mov ax, cs\r
- ret\r
-_AsmReadCs ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadCs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadCs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadCs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadCs\r
-_AsmReadCs: \r
- movw %cs,%ax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr0 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadDr0 PROC\r
- mov eax, dr0\r
- ret\r
-_AsmReadDr0 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadDr0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr0 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr0\r
-_AsmReadDr0: \r
- movl %dr0, %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr1.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr1 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr1 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadDr1 PROC\r
- mov eax, dr1\r
- ret\r
-_AsmReadDr1 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadDr1.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr1 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr1 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr1\r
-_AsmReadDr1: \r
- movl %dr1, %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr2 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadDr2 PROC\r
- mov eax, dr2\r
- ret\r
-_AsmReadDr2 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadDr2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr2 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr2\r
-_AsmReadDr2: \r
- movl %dr2, %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr3 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadDr3 PROC\r
- mov eax, dr3\r
- ret\r
-_AsmReadDr3 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadDr3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr3 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr3\r
-_AsmReadDr3: \r
- movl %dr3, %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr4 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadDr4 PROC\r
- DB 0fh, 21h, 0e0h\r
- ret\r
-_AsmReadDr4 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr5.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr5 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr5 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadDr5 PROC\r
- DB 0fh, 21h, 0e8h\r
- ret\r
-_AsmReadDr5 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr6.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr6 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr6 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadDr6 PROC\r
- mov eax, dr6\r
- ret\r
-_AsmReadDr6 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadDr6.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr6 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr6 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr6\r
-_AsmReadDr6: \r
- movl %dr6, %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr7.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr7 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr7 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadDr7 PROC\r
- mov eax, dr7\r
- ret\r
-_AsmReadDr7 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadDr7.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr7 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr7 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr7\r
-_AsmReadDr7: \r
- movl %dr7, %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadDs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadDs PROC\r
- mov ax, ds\r
- ret\r
-_AsmReadDs ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadDs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadDs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDs\r
-_AsmReadDs: \r
- movw %ds,%ax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadEflags.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadEflags function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadEflags (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadEflags PROC\r
- pushfd\r
- pop eax\r
- ret\r
-_AsmReadEflags ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadEflags.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadEflags function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadEflags (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadEflags\r
-_AsmReadEflags: \r
- pushfl\r
- popl %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadEs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadEs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadEs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadEs PROC\r
- mov ax, es\r
- ret\r
-_AsmReadEs ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadEs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadEs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadEs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadEs\r
-_AsmReadEs: \r
- movw %es,%ax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadFs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadFs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadFs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadFs PROC\r
- mov ax, fs\r
- ret\r
-_AsmReadFs ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadFs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadFs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadFs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadFs\r
-_AsmReadFs: \r
- movw %fs,%ax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadGdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadGdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; InternalX86ReadGdtr (\r
-; OUT IA32_DESCRIPTOR *Gdtr\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalX86ReadGdtr PROC\r
- mov eax, [esp + 4]\r
- sgdt fword ptr [eax]\r
- ret\r
-InternalX86ReadGdtr ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadGdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadGdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmReadGdtr (\r
-# OUT IA32_DESCRIPTOR *Gdtr\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadGdtr\r
-_AsmReadGdtr: \r
- movl 4(%esp),%eax\r
- sgdt (%eax)\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadGs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadGs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadGs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadGs PROC\r
- mov ax, gs\r
- ret\r
-_AsmReadGs ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadGs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadGs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadGs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadGs\r
-_AsmReadGs: \r
- movw %gs,%ax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadIdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadIdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat,C\r
- .code\r
-\r
-InternalX86ReadIdtr PROC\r
- mov eax, [esp + 4]\r
- sidt fword ptr [eax]\r
- ret\r
-InternalX86ReadIdtr ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadIdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadIdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmReadIdtr (\r
-# OUT IA32_DESCRIPTOR *Idtr\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadIdtr\r
-_AsmReadIdtr: \r
- movl 4(%esp),%eax\r
- sidt (%eax)\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadLdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadLdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadLdtr (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadLdtr PROC\r
- sldt ax\r
- ret\r
-_AsmReadLdtr ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadLdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadLdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadLdtr (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadLdtr\r
-_AsmReadLdtr: \r
- sldt %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm0 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadMm0 PROC\r
- push eax\r
- push eax\r
- movq [esp], mm0\r
- pop eax\r
- pop edx\r
- ret\r
-_AsmReadMm0 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadMm0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm0 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm0\r
-_AsmReadMm0: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm0,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm1.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm1 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm1 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadMm1 PROC\r
- push eax\r
- push eax\r
- movq [esp], mm1\r
- pop eax\r
- pop edx\r
- ret\r
-_AsmReadMm1 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadMm1.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm1 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm1 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm1\r
-_AsmReadMm1: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm1,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm2 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadMm2 PROC\r
- push eax\r
- push eax\r
- movq [esp], mm2\r
- pop eax\r
- pop edx\r
- ret\r
-_AsmReadMm2 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadMm2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm2 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm2\r
-_AsmReadMm2: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm2,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm3 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadMm3 PROC\r
- push eax\r
- push eax\r
- movq [esp], mm3\r
- pop eax\r
- pop edx\r
- ret\r
-_AsmReadMm3 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadMm3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm3 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm3\r
-_AsmReadMm3: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm3,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm4 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadMm4 PROC\r
- push eax\r
- push eax\r
- movq [esp], mm4\r
- pop eax\r
- pop edx\r
- ret\r
-_AsmReadMm4 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadMm4.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm4 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm4 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm4\r
-_AsmReadMm4: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm4,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm5.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm5 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm5 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadMm5 PROC\r
- push eax\r
- push eax\r
- movq [esp], mm5\r
- pop eax\r
- pop edx\r
- ret\r
-_AsmReadMm5 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadMm5.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm5 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm5 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm5\r
-_AsmReadMm5: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm5,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm6.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm6 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm6 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadMm6 PROC\r
- push eax\r
- push eax\r
- movq [esp], mm6\r
- pop eax\r
- pop edx\r
- ret\r
-_AsmReadMm6 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadMm6.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm6 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm6 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm6\r
-_AsmReadMm6: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm6,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm7.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm7 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm7 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadMm7 PROC\r
- push eax\r
- push eax\r
- movq [esp], mm7\r
- pop eax\r
- pop edx\r
- ret\r
-_AsmReadMm7 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadMm7.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm7 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm7 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm7\r
-_AsmReadMm7: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm7,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMsr64.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMsr64 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT32\r
-; EFIAPI\r
-; AsmReadMsr32 (\r
-; IN UINT32 Index\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadMsr32 PROC\r
- ;\r
- ; AsmReadMsr32 shares the same implementation with AsmReadMsr64 and thus no\r
- ; code inside this function\r
- ;\r
-_AsmReadMsr32 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmReadMsr64 (\r
-; IN UINT64 Index\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadMsr64 PROC\r
- mov ecx, [esp + 4]\r
- rdmsr\r
- ret\r
-_AsmReadMsr64 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadMsr64.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMsr64 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT32\r
-# EFIAPI\r
-# AsmReadMsr32 (\r
-# IN UINT32 Index\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMsr32\r
-_AsmReadMsr32: \r
- #\r
- # AsmReadMsr32 shares the same implementation with AsmReadMsr64 and thus no\r
- # code inside this function\r
- #\r
-\r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmReadMsr64 (\r
-# IN UINT64 Index\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMsr64\r
-_AsmReadMsr64: \r
- movl 4(%esp),%ecx\r
- rdmsr\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadPmc.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadPmc function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmReadPmc (\r
-; IN UINT32 PmcIndex\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadPmc PROC\r
- mov ecx, [esp + 4]\r
- rdpmc\r
- ret\r
-_AsmReadPmc ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadPmc.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadPmc function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmReadPmc (\r
-# IN UINT32 PmcIndex\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadPmc\r
-_AsmReadPmc: \r
- movl 4(%esp),%ecx\r
- rdpmc\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadSs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadSs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadSs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadSs PROC\r
- mov ax, ss\r
- ret\r
-_AsmReadSs ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadSs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadSs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadSs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadSs\r
-_AsmReadSs: \r
- movw %ss,%ax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadTr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadTr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadTr (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadTr PROC\r
- str ax\r
- ret\r
-_AsmReadTr ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadTr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadTr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadTr (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadTr\r
-_AsmReadTr: \r
- str %eax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadTsc.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadTsc function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmReadTsc (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmReadTsc PROC\r
- rdtsc\r
- ret\r
-_AsmReadTsc ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# ReadTsc.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadTsc function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmReadTsc (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadTsc\r
-_AsmReadTsc: \r
- rdtsc\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; SetJump.Asm\r
-;\r
-; Abstract:\r
-;\r
-; Implementation of SetJump() on IA-32.\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386\r
- .model flat\r
- .code\r
-\r
-_SetJump PROC\r
- pop ecx\r
- mov edx, [esp]\r
- mov [edx], ebx\r
- mov [edx + 4], esi\r
- mov [edx + 8], edi\r
- mov [edx + 12], ebp\r
- mov [edx + 16], esp\r
- mov [edx + 20], ecx\r
- xor eax, eax\r
- jmp ecx\r
-_SetJump ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# SetJump.Asm\r
-#\r
-# Abstract:\r
-#\r
-# Implementation of SetJump() on IA-32.\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _SetJump\r
-_SetJump: \r
- popl %ecx\r
- movl (%esp),%edx\r
- movl %ebx,(%edx)\r
- movl %esi,4(%edx)\r
- movl %edi,8(%edx)\r
- movl %ebp,12(%edx)\r
- movl %esp,16(%edx)\r
- movl %ecx,20(%edx)\r
- xorl %eax,%eax\r
- jmp *%ecx\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuId.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmCpuid function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat,C\r
- .code\r
-\r
-InternalMathSwapBytes64 PROC\r
- mov eax, [esp + 8]\r
- mov edx, [esp + 4]\r
- bswap eax\r
- bswap edx\r
- ret\r
-InternalMathSwapBytes64 ENDP\r
-\r
- END\r
+++ /dev/null
-/** @file\r
- SwitchStack() function for IA-32.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. 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: SwitchStack.c\r
-\r
-**/\r
-\r
-/**\r
- Transfers control to a function starting with a new stack.\r
-\r
- Transfers control to the function specified by EntryPoint using the new stack\r
- specified by NewStack and passing in the parameters specified by Context1 and\r
- Context2. Context1 and Context2 are optional and may be NULL. The function\r
- EntryPoint must never return.\r
-\r
- If EntryPoint is NULL, then ASSERT().\r
- If NewStack is NULL, then ASSERT().\r
-\r
- @param EntryPoint A pointer to function to call with the new stack.\r
- @param Context1 A pointer to the context to pass into the EntryPoint\r
- function.\r
- @param Context2 A pointer to the context to pass into the EntryPoint\r
- function.\r
- @param NewStack A pointer to the new stack to use for the EntryPoint\r
- function.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-SwitchStack (\r
- IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
- IN VOID *Context1,\r
- IN VOID *Context2,\r
- IN VOID *NewStack\r
- )\r
-{\r
- BASE_LIBRARY_JUMP_BUFFER JumpBuffer;\r
-\r
- ASSERT (EntryPoint != NULL && NewStack != NULL);\r
-\r
- JumpBuffer.Eip = (UINTN)EntryPoint;\r
- JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*);\r
- JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2);\r
- ((VOID**)JumpBuffer.Esp)[1] = Context1;\r
- ((VOID**)JumpBuffer.Esp)[2] = Context2;\r
-\r
- LongJump (&JumpBuffer, (UINTN)-1);\r
-}\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; Thunk.asm\r
-;\r
-; Abstract:\r
-;\r
-; Real mode thunk\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686p\r
- .model flat,C\r
-\r
- .data\r
-\r
-NullSegSel DQ 0\r
-_16BitCsSel LABEL QWORD\r
- DW -1\r
- DW 0\r
- DB 0\r
- DB 9bh\r
- DB 8fh ; 16-bit segment\r
- DB 0\r
-_16BitDsSel LABEL QWORD\r
- DW -1\r
- DW 0\r
- DB 0\r
- DB 93h\r
- DB 8fh ; 16-bit segment\r
- DB 0\r
-GdtEnd LABEL QWORD\r
-\r
- .const\r
-\r
-_16Gdtr LABEL FWORD\r
- DW offset GdtEnd - offset NullSegSel - 1\r
- DD offset NullSegSel\r
-\r
-_16Idtr FWORD (1 SHL 10) - 1\r
-\r
- .code\r
-\r
-IA32_REGS STRUC 4t\r
-_EDI DD ?\r
-_ESI DD ?\r
-_EBP DD ?\r
-_ESP DD ?\r
-_EBX DD ?\r
-_EDX DD ?\r
-_ECX DD ?\r
-_EAX DD ?\r
-_DS DW ?\r
-_ES DW ?\r
-_FS DW ?\r
-_GS DW ?\r
-_EFLAGS DD ?\r
-_EIP DD ?\r
-_CS DW ?\r
-_SS DW ?\r
-IA32_REGS ENDS\r
-\r
-InternalAsmThunk16 PROC USES ebp ebx esi edi ds es fs gs\r
- mov esi, [esp + 36] ; esi <- RegSet\r
- push sizeof (IA32_REGS)\r
- pop ecx\r
- movzx edx, (IA32_REGS ptr [esi])._SS\r
- mov edi, (IA32_REGS ptr [esi])._ESP\r
- sub edi, ecx ; reserve space on realmode stack\r
- push edi ; save stack offset\r
- imul eax, edx, 16 ; eax <- edx * 16\r
- add edi, eax ; edi <- linear address of 16-bit stack\r
- rep movsb ; copy RegSet\r
- mov esi, edx ; esi <- 16-bit stack segment\r
- pop ebx ; ebx <- 16-bit stack offset\r
- mov edi, [esp + 40] ; edi <- realmode patch\r
- push cs ; save CS segment selector\r
- push offset @BackToThunk ; offset to back from real mode\r
- mov eax, offset @16Return\r
- stosd\r
- xor eax, eax\r
- stosw ; set CS base to 0\r
- mov eax, esp\r
- stosd\r
- mov eax, ss\r
- stosd\r
- mov eax, cr0\r
- mov ecx, eax ; ecx <- CR0\r
- and ecx, 7ffffffeh ; clear PE, PG bits\r
- stosd\r
- mov eax, cr4\r
- mov ebp, eax\r
- and ebp, 300h ; clear all but PCE and OSFXSR bits\r
- stosd\r
- sidt fword ptr [esp + 44] ; use parameter space to save IDTR\r
- sgdt fword ptr [edi]\r
- lidt _16Idtr\r
- push 10h\r
- pop eax\r
- push 8\r
- push offset @16Start\r
- lgdt _16Gdtr\r
- retf\r
-@16Start: ; 16-bit starts here\r
- mov ss, eax ; set SS to be a 16-bit segment\r
- mov cr0, ecx\r
- mov cr4, ebp\r
- mov ss, esi ; set up 16-bit stack\r
- mov sp, bx ; mov esp, ebx actually\r
- popaw ; popad actually\r
- pop ds\r
- pop es\r
- pop fs\r
- pop gs\r
- add sp, 4 ; skip _EFLAGS\r
- DB 66h\r
- retf ; transfer control to 16-bit code\r
-@16Return:\r
- pushf ; pushfd actually\r
- push gs\r
- push fs\r
- push es\r
- push ds\r
- pushaw ; pushad actually\r
- DB 67h, 66h\r
- lds esi, fword ptr (IA32_REGS ptr [esp])._EIP\r
- DB 67h, 66h\r
- mov eax, [esi + 12]\r
- mov cr4, eax ; restore CR4\r
- DB 67h, 66h\r
- lgdt fword ptr [esi + 16]\r
- DB 67h, 66h\r
- mov eax, [esi + 8]\r
- mov cr0, eax ; restore CR0\r
- xor ax, ax ; xor eax, eax actually\r
- mov eax, ss\r
- DB 67h\r
- mov dword ptr (IA32_REGS ptr [esp])._SS, eax\r
- shl ax, 4 ; shl eax, 4 actually\r
- add ax, sp ; add eax, esp actually\r
- add sp, sizeof (IA32_REGS) ; add esp, sizeof (IA32_REGS)\r
- DB 67h, 66h\r
- mov dword ptr (IA32_REGS ptr [esp - sizeof (IA32_REGS)])._ESP, esp\r
- DB 67h, 66h\r
- lss esp, fword ptr [esi] ; restore protected mode stack\r
- DB 66h\r
- retf ; go back to protected mode\r
-@BackToThunk:\r
- lidt fword ptr [esp + 36] ; restore protected mode IDTR\r
- ret\r
-InternalAsmThunk16 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# Thunk.asm\r
-#\r
-# Abstract:\r
-#\r
-# Real mode thunk\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
-MISMATCH: "EXTERNDEF C mCode16Size:DWORD"\r
-\r
-MISMATCH: "CONST SEGMENT FLAT "DATA" READONLY"\r
-\r
-MISMATCH: "mCode16Size DD _TEXT16SIZE"\r
-\r
-MISMATCH: "CONSTS"\r
-\r
-MISMATCH: "_DATA SEGMENT FLAT "DATA""\r
-\r
-MISMATCH: "NullSegSel DQ 0"\r
-MISMATCH: "_16BitCsSel LABEL QWORD"\r
- .word -1\r
- .word 0\r
- .byte 0\r
- .byte 0x9b\r
- .byte 0x8f # 16-bit segment\r
- .byte 0\r
-\r
-MISMATCH: "_16Gdtr LABEL FWORD"\r
-MISMATCH: " DW $ - offset NullSegSel - 1"\r
-MISMATCH: " DD offset NullSegSel"\r
-\r
-MISMATCH: "_DATAS"\r
-\r
-MISMATCH: "_TEXT SEGMENT FLAT "CODE" PARA"\r
-\r
-MISMATCH: "IA32_REGS STRUC 4t"\r
-MISMATCH: "_EDI DD ?"\r
-MISMATCH: "_ESI DD ?"\r
-MISMATCH: "_EBP DD ?"\r
-MISMATCH: "_ESP DD ?"\r
-MISMATCH: "_EBX DD ?"\r
-MISMATCH: "_EDX DD ?"\r
-MISMATCH: "_ECX DD ?"\r
-MISMATCH: "_EAX DD ?"\r
-MISMATCH: "_DS DW ?"\r
-MISMATCH: "_ES DW ?"\r
-MISMATCH: "_FS DW ?"\r
-MISMATCH: "_GS DW ?"\r
-MISMATCH: "_EFLAGS DD ?"\r
-MISMATCH: "_EIP DD ?"\r
-MISMATCH: "_CS DW ?"\r
-MISMATCH: "_SS DW ?"\r
-MISMATCH: "IA32_REGSS"\r
-\r
-MISMATCH: "_STK16 STRUC 1t"\r
-MISMATCH: "RetEip DD ?"\r
-MISMATCH: "RetCs DW ?"\r
-MISMATCH: "ThunkFlags DW ?"\r
-MISMATCH: "SavedEsp DD ?"\r
-MISMATCH: "SavedSs DW ?"\r
-MISMATCH: "SavedGdtr FWORD ?"\r
-MISMATCH: "SavedCr0 DD ?"\r
-MISMATCH: "SavedCr4 DD ?"\r
-MISMATCH: "_STK16S"\r
-\r
-.global _InternalAsmThunk16\r
-MISMATCH: "_InternalAsmThunk16: USES ebp ebx esi edi ds es fs gs"\r
-MISMATCH: " ASSUME esi:PTR IA32_REGS"\r
- movl 36(%esp),%esi\r
-MISMATCH: " movzx edx, [esi]._SS"\r
- movl $[esi]._ESP, %edi\r
-MISMATCH: " add edi, - sizeof (_STK16) - sizeof (IA32_REGS)"\r
- pushl %edi # save stack offset\r
- imull $16,%edx,%eax # eax <- edx*16\r
- addl %eax,%edi # edi <- linear address of 16-bit stack\r
-MISMATCH: " push sizeof (IA32_REGS) / 4"\r
- popl %ecx\r
- rep\r
- movsl # copy context to 16-bit stack\r
- popl %ebx # ebx <- 16-bit stack offset\r
-MISMATCH: " mov eax, offset @F "\r
- stosl\r
- movl %cs,%eax # return segment\r
- stosw\r
- movl 40(%esp),%eax # THUNK flags\r
- stosw\r
- movl %esp,%eax\r
- stosl # save esp\r
- movl %ss,%eax # save ss\r
- stosw\r
-MISMATCH: " sgdt fword ptr [edi] "\r
-MISMATCH: " sidt fword ptr [esp + 36] "\r
- movl %cr0, %esi\r
- movl %esi,6(%edi) # save CR0\r
-MISMATCH: " and esi, NOT 80000001h "\r
- movl %cr4, %eax\r
- movl %eax,10(%edi) # save CR4\r
-MISMATCH: " and al, NOT 30h "\r
- movl %edx,%edi # edi <- 16-bit stack segment\r
- movl 44(%esp),%edx\r
- shll $16,%edx\r
- pushl %edx\r
-MISMATCH: " lgdt _16Gdtr "\r
- .byte 0xea\r
-MISMATCH: " DD offset @16Bit"\r
- .word 8 # jmp far 8:@16Bit\r
-@16Bit: \r
- movl %esi, %cr0 # disable protected mode\r
- movl %eax, %cr4 # disable PAE & PSE\r
- lret\r
-@@: \r
- movl %ss,%eax\r
- shll $4,%eax\r
- addl %esp,%eax # eax <- address of 16-bit stack\r
-MISMATCH: " lss esp, fword ptr (_STK16 ptr [esp + sizeof (IA32_REGS)]).SavedEsp"\r
-MISMATCH: " lidt fword ptr [esp + 36] "\r
- ret\r
-\r
-\r
-MISMATCH: "_TEXTS"\r
-\r
-MISMATCH: "_TEXT16 SEGMENT USE16 "CODE" PARA"\r
-\r
-.global _Code16Addr\r
-MISMATCH: "_Code16Addr: C"\r
-\r
-\r
-.global RealMode\r
-RealMode: \r
-MISMATCH: " ASSUME bp:PTR _STK16"\r
- movw %di,%ss # set up stack\r
- movl %ebx,%esp\r
-MISMATCH: " lidt fword ptr cs:[_16Idtr - _Code16Addr]"\r
- popal\r
- popl %ds\r
- popl %es\r
- popl %fs\r
- popl %gs\r
- addw $4,%sp # skip EFlags\r
-MISMATCH: " test (_STK16 ptr [esp + 8]).ThunkFlags, 1"\r
- jz @F\r
- pushf\r
-@@: \r
- pushw %cs\r
-MISMATCH: " push @FarCallRet - _Code16Addr"\r
- jz @F\r
-MISMATCH: " jmp fword ptr [esp + 6]"\r
-@@: \r
-MISMATCH: " jmp fword ptr [esp + 4]"\r
-@FarCallRet: \r
- pushfl\r
- pushw %gs\r
- pushw %fs\r
- pushw %es\r
- pushw %ds\r
- pushal\r
- cli\r
-MISMATCH: " lea bp, [esp + sizeof (IA32_REGS)]"\r
- .byte 0x66\r
-MISMATCH: " lgdt [bp].SavedGdtr"\r
- movl $[bp].SavedCr4, %eax\r
- movl %eax, %cr4\r
- movl $[bp].SavedCr0, %eax\r
- movl %eax, %cr0 # restore CR0\r
-MISMATCH: " jmp fword ptr [bp].RetEip"\r
-\r
-\r
-MISMATCH: "_16Idtr FWORD (1 SHL 10) - 1"\r
-\r
-_TEXT16: \r
-\r
-MISMATCH: "_TEXT16SIZE = _TEXT16- _Code16Addr"\r
-\r
-MISMATCH: "_TEXT16S"\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; Wbinvd.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWbinvd function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .486p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWbinvd (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWbinvd PROC\r
- wbinvd\r
- ret\r
-_AsmWbinvd ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# Wbinvd.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWbinvd function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWbinvd (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWbinvd\r
-_AsmWbinvd: \r
- wbinvd\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteCr0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteCr0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteCr0 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteCr0 PROC\r
- mov eax, [esp + 4]\r
- mov cr0, eax\r
- ret\r
-_AsmWriteCr0 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteCr0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteCr0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmWriteCr0 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteCr0\r
-_AsmWriteCr0: \r
- movl 4(%esp),%eax\r
- movl %eax, %cr0\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteCr2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteCr2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteCr2 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteCr2 PROC\r
- mov eax, [esp + 4]\r
- mov cr2, eax\r
- ret\r
-_AsmWriteCr2 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteCr2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteCr2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmWriteCr2 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteCr2\r
-_AsmWriteCr2: \r
- movl 4(%esp),%eax\r
- movl %eax, %cr2\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteCr3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteCr3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteCr3 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteCr3 PROC\r
- mov eax, [esp + 4]\r
- mov cr3, eax\r
- ret\r
-_AsmWriteCr3 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteCr3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteCr3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmWriteCr3 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteCr3\r
-_AsmWriteCr3: \r
- movl 4(%esp),%eax\r
- movl %eax, %cr3\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteCr4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteCr4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteCr4 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteCr4 PROC\r
- mov eax, [esp + 4]\r
- mov cr4, eax\r
- ret\r
-_AsmWriteCr4 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteCr4.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteCr4 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmWriteCr4 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteCr4\r
-_AsmWriteCr4: \r
- movl 4(%esp),%eax\r
- movl %eax, %cr4\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWriteDr0 (\r
-; IN UINTN Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteDr0 PROC\r
- mov eax, [esp + 4]\r
- mov dr0, eax\r
- ret\r
-_AsmWriteDr0 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteDr0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr0 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr0\r
-_AsmWriteDr0: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr0\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr1.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr1 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWriteDr1 (\r
-; IN UINTN Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteDr1 PROC\r
- mov eax, [esp + 4]\r
- mov dr1, eax\r
- ret\r
-_AsmWriteDr1 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteDr1.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr1 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr1 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr1\r
-_AsmWriteDr1: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr1\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWriteDr2 (\r
-; IN UINTN Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteDr2 PROC\r
- mov eax, [esp + 4]\r
- mov dr2, eax\r
- ret\r
-_AsmWriteDr2 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteDr2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr2 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr2\r
-_AsmWriteDr2: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr2\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWriteDr3 (\r
-; IN UINTN Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteDr3 PROC\r
- mov eax, [esp + 4]\r
- mov dr3, eax\r
- ret\r
-_AsmWriteDr3 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteDr3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr3 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr3\r
-_AsmWriteDr3: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr3\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWriteDr4 (\r
-; IN UINTN Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteDr4 PROC\r
- mov eax, [esp + 4]\r
- DB 0fh, 23h, 0e0h\r
- ret\r
-_AsmWriteDr4 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr5.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr5 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWriteDr5 (\r
-; IN UINTN Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteDr5 PROC\r
- mov eax, [esp + 4]\r
- DB 0fh, 23h, 0e8h\r
- ret\r
-_AsmWriteDr5 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr6.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr6 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWriteDr6 (\r
-; IN UINTN Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteDr6 PROC\r
- mov eax, [esp + 4]\r
- mov dr6, eax\r
- ret\r
-_AsmWriteDr6 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteDr6.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr6 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr6 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr6\r
-_AsmWriteDr6: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr6\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr7.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr7 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWriteDr7 (\r
-; IN UINTN Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteDr7 PROC\r
- mov eax, [esp + 4]\r
- mov dr7, eax\r
- ret\r
-_AsmWriteDr7 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteDr7.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr7 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr7 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr7\r
-_AsmWriteDr7: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr7\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteGdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteGdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686P\r
- .model flat,C\r
- .code\r
-\r
-InternalX86WriteGdtr PROC\r
- mov eax, [esp + 4]\r
- lgdt fword ptr [eax]\r
- ret\r
-InternalX86WriteGdtr ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteGdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteGdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteGdtr (\r
-# OUT IA32_DESCRIPTOR *Gdtr\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteGdtr\r
-_AsmWriteGdtr: \r
- movl 4(%esp),%eax\r
- lgdt (%eax)\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteIdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteIdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .686P\r
- .model flat,C\r
- .code\r
-\r
-InternalX86WriteIdtr PROC\r
- mov eax, [esp + 4]\r
- lidt fword ptr [eax]\r
- ret\r
-InternalX86WriteIdtr ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteIdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteIdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteIdtr (\r
-# OUT IA32_DESCRIPTOR *Idtr\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteIdtr\r
-_AsmWriteIdtr: \r
- movl 4(%esp),%eax\r
- lidt (%eax)\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteLdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteLdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWriteLdtr (\r
-; IN UINT16 Ldtr\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteLdtr PROC\r
- mov eax, [esp + 4]\r
- lldt ax\r
- ret\r
-_AsmWriteLdtr ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteLdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteLdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteLdtr (\r
-# IN UINT16 Ldtr\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteLdtr\r
-_AsmWriteLdtr: \r
- movl 4(%esp),%eax\r
- lldtw %ax\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmWriteMm0 (\r
-; IN UINT64 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteMm0 PROC\r
- movq mm0, [esp + 4]\r
- ret\r
-_AsmWriteMm0 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteMm0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm0 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm0\r
-_AsmWriteMm0: \r
- movq 4(%esp),%mm0\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm1.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm1 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmWriteMm1 (\r
-; IN UINT64 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteMm1 PROC\r
- movq mm1, [esp + 4]\r
- ret\r
-_AsmWriteMm1 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteMm1.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm1 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm1 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm1\r
-_AsmWriteMm1: \r
- movq 4(%esp),%mm1\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmWriteMm2 (\r
-; IN UINT64 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteMm2 PROC\r
- movq mm2, [esp + 4]\r
- ret\r
-_AsmWriteMm2 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteMm2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm2 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm2\r
-_AsmWriteMm2: \r
- movq 4(%esp),%mm2\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmWriteMm3 (\r
-; IN UINT64 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteMm3 PROC\r
- movq mm3, [esp + 4]\r
- ret\r
-_AsmWriteMm3 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteMm3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm3 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm3\r
-_AsmWriteMm3: \r
- movq 4(%esp),%mm3\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmWriteMm4 (\r
-; IN UINT64 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteMm4 PROC\r
- movq mm4, [esp + 4]\r
- ret\r
-_AsmWriteMm4 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteMm4.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm4 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm4 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm4\r
-_AsmWriteMm4: \r
- movq 4(%esp),%mm4\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm5.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm5 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmWriteMm5 (\r
-; IN UINT64 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteMm5 PROC\r
- movq mm5, [esp + 4]\r
- ret\r
-_AsmWriteMm5 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteMm5.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm5 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm5 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm5\r
-_AsmWriteMm5: \r
- movq 4(%esp),%mm5\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm6.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm6 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmWriteMm6 (\r
-; IN UINT64 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteMm6 PROC\r
- movq mm6, [esp + 4]\r
- ret\r
-_AsmWriteMm6 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteMm6.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm6 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm6 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm6\r
-_AsmWriteMm6: \r
- movq 4(%esp),%mm6\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm7.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm7 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .xmm\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmWriteMm7 (\r
-; IN UINT64 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteMm7 PROC\r
- movq mm7, [esp + 4]\r
- ret\r
-_AsmWriteMm7 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteMm7.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm7 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm7 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm7\r
-_AsmWriteMm7: \r
- movq 4(%esp),%mm7\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMsr32.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMsr32 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT32\r
-; EFIAPI\r
-; AsmWriteMsr32 (\r
-; IN UINT32 Index,\r
-; IN UINT32 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteMsr32 PROC\r
- mov eax, [esp + 8]\r
- xor edx, edx\r
- mov ecx, [esp + 4]\r
- wrmsr\r
- ret\r
-_AsmWriteMsr32 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteMsr32.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMsr32 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT32\r
-# EFIAPI\r
-# AsmWriteMsr32 (\r
-# IN UINT32 Index,\r
-# IN UINT32 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMsr32\r
-_AsmWriteMsr32: \r
- movl 8(%esp),%eax\r
- xorl %edx,%edx\r
- movl 4(%esp),%ecx\r
- wrmsr\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMsr64.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMsr64 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .586P\r
- .model flat\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmWriteMsr64 (\r
-; IN UINT32 Index,\r
-; IN UINT64 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-_AsmWriteMsr64 PROC\r
- mov edx, [esp + 12]\r
- mov eax, [esp + 8]\r
- mov ecx, [esp + 4]\r
- wrmsr\r
- ret\r
-_AsmWriteMsr64 ENDP\r
-\r
- END\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. 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
-# WriteMsr64.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMsr64 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMsr64 (\r
-# IN UINT32 Index,\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMsr64\r
-_AsmWriteMsr64: \r
- movl 12(%esp),%edx\r
- movl 8(%esp),%eax\r
- movl 4(%esp),%ecx\r
- wrmsr\r
- ret\r
-\r
-\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuBreakpoint.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuBreakpoint function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuBreakpoint (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-CpuBreakpoint PROC\r
- int 3\r
- ret\r
-CpuBreakpoint ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuFlushTlb.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuFlushTlb function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuFlushTlb (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-CpuFlushTlb PROC\r
- mov rax, cr3\r
- mov cr3, rax\r
- ret\r
-CpuFlushTlb ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuId.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmCpuid function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmCpuid (\r
-; IN UINT32 RegisterInEax,\r
-; OUT UINT32 *RegisterOutEax OPTIONAL,\r
-; OUT UINT32 *RegisterOutEbx OPTIONAL,\r
-; OUT UINT32 *RegisterOutEcx OPTIONAL,\r
-; OUT UINT32 *RegisterOutEdx OPTIONAL\r
-; )\r
-;------------------------------------------------------------------------------\r
-AsmCpuid PROC USES rbx\r
- mov eax, ecx\r
- push rdx\r
- push rax ; save Index on stack\r
- cpuid\r
- test r9, r9\r
- jz @F\r
- mov [r9], ecx\r
-@@:\r
- pop rcx\r
- jrcxz @F\r
- mov [rcx], eax\r
-@@:\r
- mov rcx, r8\r
- jrcxz @F\r
- mov [rcx], ebx\r
-@@:\r
- mov rcx, [rsp + 30h]\r
- jrcxz @F\r
- mov [rcx], edx\r
-@@:\r
- pop rax ; restore Index to rax as return value\r
- ret\r
-AsmCpuid ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuPause.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuPause function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuPause (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-CpuPause PROC\r
- pause\r
- ret\r
-CpuPause ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; CpuSleep.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuSleep function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuSleep (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-CpuSleep PROC\r
- hlt\r
- ret\r
-CpuSleep ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; DisableInterrupts.Asm\r
-;\r
-; Abstract:\r
-;\r
-; DisableInterrupts function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; DisableInterrupts (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-DisableInterrupts PROC\r
- cli\r
- ret\r
-DisableInterrupts ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; DisablePaging64.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmDisablePaging64 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-InternalX86DisablePaging64 PROC\r
- cli\r
- shl rcx, 32\r
- lea ecx, @F\r
- push rcx\r
- mov ebx, edx\r
- mov esi, r8d\r
- mov edi, r9d\r
- mov eax, [rsp + 28h]\r
- retf\r
-@@:\r
- mov esp, eax ; set up new stack\r
- mov rax, cr0\r
- btr eax, 31\r
- mov cr0, rax ; disable paging\r
- mov ecx, 0c0000080h\r
- rdmsr\r
- and ah, NOT 1 ; clear LME\r
- wrmsr\r
- mov rax, cr4\r
- and al, NOT (1 SHL 5) ; clear PAE\r
- mov cr4, rax\r
- push rdi\r
- push rsi\r
- call rbx\r
- jmp $\r
-InternalX86DisablePaging64 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; EnableDisableInterrupts.Asm\r
-;\r
-; Abstract:\r
-;\r
-; EnableDisableInterrupts function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; EnableDisableInterrupts (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-EnableDisableInterrupts PROC\r
- sti\r
- cli\r
- ret\r
-EnableDisableInterrupts ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; EnableInterrupts.Asm\r
-;\r
-; Abstract:\r
-;\r
-; EnableInterrupts function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; EnableInterrupts (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-EnableInterrupts PROC\r
- sti\r
- ret\r
-EnableInterrupts ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; FlushCacheLine.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmFlushCacheLine function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmFlushCacheLine (\r
-; IN VOID *LinearAddress\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmFlushCacheLine PROC\r
- clflush [rcx]\r
- ret\r
-AsmFlushCacheLine ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; FxRestore.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmFxRestore function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-InternalX86FxRestore PROC\r
- fxrstor [rcx]\r
- ret\r
-InternalX86FxRestore ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; FxSave.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmFxSave function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-InternalX86FxSave PROC\r
- fxsave [rcx]\r
- ret\r
-InternalX86FxSave ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; InterlockedCompareExchange32.Asm\r
-;\r
-; Abstract:\r
-;\r
-; InterlockedCompareExchange32 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT32\r
-; EFIAPI\r
-; InterlockedCompareExchange32 (\r
-; IN UINT32 *Value,\r
-; IN UINT32 CompareValue,\r
-; IN UINT32 ExchangeValue\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalSyncCompareExchange32 PROC\r
- mov eax, edx\r
- lock cmpxchg [rcx], r8d\r
- ret\r
-InternalSyncCompareExchange32 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; InterlockedCompareExchange64.Asm\r
-;\r
-; Abstract:\r
-;\r
-; InterlockedCompareExchange64 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; InterlockedCompareExchange64 (\r
-; IN UINT64 *Value,\r
-; IN UINT64 CompareValue,\r
-; IN UINT64 ExchangeValue\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalSyncCompareExchange64 PROC\r
- mov rax, rdx\r
- lock cmpxchg [rcx], r8\r
- ret\r
-InternalSyncCompareExchange64 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; InterlockedDecrement.Asm\r
-;\r
-; Abstract:\r
-;\r
-; InterlockedDecrement function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT32\r
-; EFIAPI\r
-; InterlockedDecrement (\r
-; IN UINT32 *Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalSyncDecrement PROC\r
- lock dec dword ptr [rcx]\r
- mov eax, [rcx]\r
- ret\r
-InternalSyncDecrement ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; InterlockedIncrement.Asm\r
-;\r
-; Abstract:\r
-;\r
-; InterlockedIncrement function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT32\r
-; EFIAPI\r
-; InterlockedIncrement (\r
-; IN UINT32 *Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-InternalSyncIncrement PROC\r
- lock inc dword ptr [rcx]\r
- mov eax, [rcx]\r
- ret\r
-InternalSyncIncrement ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; Invd.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmInvd function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmInvd (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmInvd PROC\r
- invd\r
- ret\r
-AsmInvd ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; LongJump.Asm\r
-;\r
-; Abstract:\r
-;\r
-; Implementation of LongJump() on x64.\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-LongJump PROC\r
- mov rbx, [rcx]\r
- mov rsp, [rcx + 8]\r
- mov rbp, [rcx + 10h]\r
- mov rdi, [rcx + 18h]\r
- mov rsi, [rcx + 20h]\r
- mov r12, [rcx + 28h]\r
- mov r13, [rcx + 30h]\r
- mov r14, [rcx + 38h]\r
- mov r15, [rcx + 40h]\r
- mov rax, rdx\r
- jmp qword ptr [rcx + 48h]\r
-LongJump ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; Monitor.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmMonitor function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmMonitor (\r
-; IN UINTN Eax,\r
-; IN UINTN Ecx,\r
-; IN UINTN Edx\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmMonitor PROC\r
- mov eax, ecx\r
- mov ecx, edx\r
- mov edx, r8d\r
- DB 0fh, 1, 0c8h\r
- ret\r
-AsmMonitor ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; Mwait.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmMwait function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmMwait (\r
-; IN UINTN Eax,\r
-; IN UINTN Ecx\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmMwait PROC\r
- mov eax, ecx\r
- mov ecx, edx\r
- DB 0fh, 1, 0c9h\r
- ret\r
-AsmMwait ENDP\r
-\r
- END\r
+++ /dev/null
-/** @file\r
- Non-existing BaseLib functions on x64\r
-\r
- Copyright (c) 2006, Intel Corporation\r
- All rights reserved. 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: Non-existing.c\r
-\r
-**/\r
-\r
-#include "../BaseLibInternals.h"\r
-\r
-VOID\r
-EFIAPI\r
-InternalX86EnablePaging32 (\r
- IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
- IN VOID *Context1, OPTIONAL\r
- IN VOID *Context2, OPTIONAL\r
- IN VOID *NewStack\r
- )\r
-{\r
- ASSERT (FALSE);\r
-}\r
-\r
-VOID\r
-EFIAPI\r
-InternalX86DisablePaging32 (\r
- IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
- IN VOID *Context1, OPTIONAL\r
- IN VOID *Context2, OPTIONAL\r
- IN VOID *NewStack\r
- )\r
-{\r
- ASSERT (FALSE);\r
-}\r
-\r
-VOID\r
-EFIAPI\r
-InternalX86EnablePaging64 (\r
- IN UINT16 Cs,\r
- IN UINT64 EntryPoint,\r
- IN UINT64 Context1, OPTIONAL\r
- IN UINT64 Context2, OPTIONAL\r
- IN UINT64 NewStack\r
- )\r
-{\r
- ASSERT (FALSE);\r
-}\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadCr0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadCr0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadCr0 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadCr0 PROC\r
- mov rax, cr0\r
- ret\r
-AsmReadCr0 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadCr2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadCr2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadCr2 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadCr2 PROC\r
- mov rax, cr2\r
- ret\r
-AsmReadCr2 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadCr3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadCr3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadCr3 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadCr3 PROC\r
- mov rax, cr3\r
- ret\r
-AsmReadCr3 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadCr4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadCr4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadCr4 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadCr4 PROC\r
- mov rax, cr4\r
- ret\r
-AsmReadCr4 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadCs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadCs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadCs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadCs PROC\r
- mov ax, cs\r
- ret\r
-AsmReadCs ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr0 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadDr0 PROC\r
- mov rax, dr0\r
- ret\r
-AsmReadDr0 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr1.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr1 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr1 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadDr1 PROC\r
- mov rax, dr1\r
- ret\r
-AsmReadDr1 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr2 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadDr2 PROC\r
- mov rax, dr2\r
- ret\r
-AsmReadDr2 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr3 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadDr3 PROC\r
- mov rax, dr3\r
- ret\r
-AsmReadDr3 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr4 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadDr4 PROC\r
- DB 0fh, 21h, 0e0h\r
- ret\r
-AsmReadDr4 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr5.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr5 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr5 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadDr5 PROC\r
- DB 0fh, 21h, 0e8h\r
- ret\r
-AsmReadDr5 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr6.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr6 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr6 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadDr6 PROC\r
- mov rax, dr6\r
- ret\r
-AsmReadDr6 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDr7.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDr7 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadDr7 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadDr7 PROC\r
- mov rax, dr7\r
- ret\r
-AsmReadDr7 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadDs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadDs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadDs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadDs PROC\r
- mov ax, ds\r
- ret\r
-AsmReadDs ENDP\r
-\r
- END\r
-\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadEflags.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadEflags function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadEflags (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadEflags PROC\r
- pushfq\r
- pop rax\r
- ret\r
-AsmReadEflags ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadEs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadEs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadEs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadEs PROC\r
- mov ax, es\r
- ret\r
-AsmReadEs ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadFs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadFs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadFs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadFs PROC\r
- mov ax, fs\r
- ret\r
-AsmReadFs ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadGdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadGdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-InternalX86ReadGdtr PROC\r
- sgdt fword ptr [rcx]\r
- ret\r
-InternalX86ReadGdtr ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadGs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadGs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadGs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadGs PROC\r
- mov ax, gs\r
- ret\r
-AsmReadGs ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadIdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadIdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-InternalX86ReadIdtr PROC\r
- sidt fword ptr [rcx]\r
- ret\r
-InternalX86ReadIdtr ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadLdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadLdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadLdtr (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadLdtr PROC\r
- sldt eax\r
- ret\r
-AsmReadLdtr ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm0 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadMm0 PROC\r
- DB 48h, 0fh, 7eh, 0c0h\r
- ret\r
-AsmReadMm0 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm1.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm1 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm1 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadMm1 PROC\r
- DB 48h, 0fh, 7eh, 0c8h\r
- ret\r
-AsmReadMm1 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm2 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadMm2 PROC\r
- DB 48h, 0fh, 7eh, 0d0h\r
- ret\r
-AsmReadMm2 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm3 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadMm3 PROC\r
- DB 48h, 0fh, 7eh, 0d8h\r
- ret\r
-AsmReadMm3 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm4 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadMm4 PROC\r
- DB 48h, 0fh, 7eh, 0e0h\r
- ret\r
-AsmReadMm4 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm5.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm5 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm5 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadMm5 PROC\r
- DB 48h, 0fh, 7eh, 0e8h\r
- ret\r
-AsmReadMm5 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm6.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm6 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm6 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadMm6 PROC\r
- DB 48h, 0fh, 7eh, 0f0h\r
- ret\r
-AsmReadMm6 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMm7.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMm7 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmReadMm7 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadMm7 PROC\r
- DB 48h, 0fh, 7eh, 0f8h\r
- ret\r
-AsmReadMm7 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMsr32.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMsr32 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT32\r
-; EFIAPI\r
-; AsmReadMsr32 (\r
-; IN UINT32 Index\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadMsr32 PROC\r
- rdmsr\r
- ret\r
-AsmReadMsr32 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadMsr64.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadMsr64 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmReadMsr64 (\r
-; IN UINT32 Index\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadMsr64 PROC\r
- rdmsr\r
- shl rax, 20h\r
- shrd rax, rdx, 20h\r
- ret\r
-AsmReadMsr64 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadPmc.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadPmc function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmReadPmc (\r
-; IN UINT32 PmcIndex\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadPmc PROC\r
- rdpmc\r
- shl ecx, 1\r
- jnc @F\r
- shl rax, 20h\r
- shrd rax, rdx, 20h\r
-@@:\r
- ret\r
-AsmReadPmc ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadSs.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadSs function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadSs (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadSs PROC\r
- mov ax, ss\r
- ret\r
-AsmReadSs ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadTr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadTr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT16\r
-; EFIAPI\r
-; AsmReadTr (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadTr PROC\r
- str eax\r
- ret\r
-AsmReadTr ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; ReadTsc.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmReadTsc function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmReadTsc (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmReadTsc PROC\r
- rdtsc\r
- shl rax, 20h\r
- shrd rax, rdx, 20h\r
- ret\r
-AsmReadTsc ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; SetJump.Asm\r
-;\r
-; Abstract:\r
-;\r
-; Implementation of SetJump() on x64.\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-SetJump PROC\r
- pop rdx\r
- mov [rcx], rbx\r
- mov [rcx + 8], rsp\r
- mov [rcx + 10h], rbp\r
- mov [rcx + 18h], rdi\r
- mov [rcx + 20h], rsi\r
- mov [rcx + 28h], r12\r
- mov [rcx + 30h], r13\r
- mov [rcx + 38h], r14\r
- mov [rcx + 40h], r15\r
- mov [rcx + 48h], rdx\r
- xor rax, rax\r
- jmp rdx\r
-SetJump ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; SwitchStack.Asm\r
-;\r
-; Abstract:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; Routine Description:\r
-;\r
-; Routine for switching stacks with 1 parameter\r
-;\r
-; Arguments:\r
-;\r
-; (rcx) EntryPoint - Entry point with new stack.\r
-; (rdx) Context - Parameter for entry point.\r
-; (r8) Context2 - Parameter2 for entry point.\r
-; (r9) NewStack - Pointer to new stack.\r
-;\r
-; Returns:\r
-;\r
-; None\r
-;\r
-;------------------------------------------------------------------------------\r
-SwitchStack PROC\r
- mov rax, rcx\r
- mov rcx, rdx\r
- mov rdx, r8\r
- lea rsp, [r9 - 20h]\r
- call rax\r
-SwitchStack ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; Thunk.asm\r
-;\r
-; Abstract:\r
-;\r
-; Real mode thunk\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .data\r
-\r
-NullSegSel DQ 0\r
-_16CsSegSel LABEL QWORD\r
- DW -1\r
- DW 0\r
- DB 0\r
- DB 9bh\r
- DB 8fh ; 16-bit segment\r
- DB 0\r
-_16BitDsSel LABEL QWORD\r
- DW -1\r
- DW 0\r
- DB 0\r
- DB 93h\r
- DB 8fh ; 16-bit segment\r
- DB 0\r
-GdtEnd LABEL QWORD\r
-\r
- .const\r
-\r
-_16Gdtr LABEL FWORD\r
- DW offset GdtEnd - offset NullSegSel - 1\r
- DQ offset NullSegSel\r
-\r
-_16Idtr FWORD (1 SHL 10) - 1\r
-\r
- .code\r
-\r
-IA32_REGS STRUC 4t\r
-_EDI DD ?\r
-_ESI DD ?\r
-_EBP DD ?\r
-_ESP DD ?\r
-_EBX DD ?\r
-_EDX DD ?\r
-_ECX DD ?\r
-_EAX DD ?\r
-_DS DW ?\r
-_ES DW ?\r
-_FS DW ?\r
-_GS DW ?\r
-_RFLAGS DQ ?\r
-_EIP DD ?\r
-_CS DW ?\r
-_SS DW ?\r
-IA32_REGS ENDS\r
-\r
-InternalAsmThunk16 PROC USES rbp rbx rsi rdi r12 r13 r14 r15\r
- mov eax, ds\r
- push rax\r
- mov eax, es\r
- push rax\r
- push fs\r
- push gs\r
- mov rsi, rcx ; rsi <- RegSet\r
- push sizeof (IA32_REGS)\r
- pop rcx\r
- movzx r8, (IA32_REGS ptr [rsi])._SS\r
- xor rdi, rdi\r
- mov edi, (IA32_REGS ptr [rsi])._ESP\r
- sub rdi, rcx ; reserve space on realmode stack\r
- push rdi ; save stack offset\r
- imul rax, r8, 16\r
- add rdi, rax ; rdi <- linear address of 16-bit stack\r
- rep movsb ; copy RegSet\r
- mov rsi, r8 ; si <- 16-bit stack segment\r
- pop rbx ; rbx <- 16-bit stack offset\r
- mov rdi, rdx ; rdi <- realmode patch\r
- lea eax, @BackToThunk ; rax <- address to back from real mode\r
- push rax ; use in a far return\r
- mov eax, cs\r
- mov [rsp + 4], eax ; save CS\r
- lea eax, @16Return ; thus @Return must < 4GB\r
- stosd ; set ret address offset\r
- xor eax, eax\r
- stosw ; set ret CS base to 0\r
- mov eax, esp\r
- stosd ; rsp must < 4GB\r
- mov eax, ss\r
- stosd\r
- mov rax, cr0\r
- mov ecx, eax ; ecx <- CR0\r
- and ecx, 7ffffffeh ; clear PE, PG bits\r
- stosd\r
- mov rax, cr4\r
- mov ebp, eax\r
- and ebp, 300h ; clear all but PCE and OSFXSR bits\r
- stosd\r
- sidt fword ptr [rsp + 70h] ; use parameter space to save IDTR\r
- sgdt fword ptr [rdi]\r
- lea edi, _16Idtr\r
- lea eax, @16Start ; rax <- seg:offset of @16Start\r
- push rax\r
- mov dword ptr [rsp + 4], 8\r
- push 10h\r
- pop rax ; rax <- 10h as dataseg selector\r
- lgdt _16Gdtr\r
- retf\r
-@16Start: ; 16-bit starts here\r
- mov ss, eax ; set SS to be a 16-bit segment\r
- mov cr0, rcx ; disable protected mode\r
- mov cr4, rbp\r
- DB 66h\r
- mov ecx, 0c0000080h\r
- rdmsr\r
- and ah, NOT 1 ; clear LME\r
- wrmsr\r
- mov ss, esi ; set up 16-bit stack\r
- mov sp, bx ; mov esp, ebx actually\r
- lidt fword ptr [edi]\r
- DB 66h, 61h ; popad\r
- DB 1fh ; pop ds\r
- DB 7 ; pop es\r
- pop fs\r
- pop gs\r
- add sp, 8 ; skip _RFLAGS\r
- DB 66h\r
- retf ; transfer control to 16-bit code\r
-@16Return:\r
- DB 66h\r
- push 0 ; high order 32 bits of rflags\r
- pushf ; pushfd actually\r
- push gs\r
- push fs\r
- DB 6 ; push es\r
- DB 1eh ; push ds\r
- DB 66h, 60h ; pushad\r
- DB 67h, 66h, 0c5h, 74h, 24h, 30h ; lds esi, [esp + 12*4]\r
- DB 66h\r
- mov eax, [esi + 12]\r
- mov cr4, rax ; restore CR4\r
- DB 66h\r
- lgdt fword ptr [esi + 16]\r
- DB 66h\r
- mov ecx, 0c0000080h\r
- rdmsr\r
- or ah, 1 ; set LME\r
- wrmsr\r
- DB 66h\r
- mov eax, [esi + 8]\r
- mov cr0, rax ; restore CR0\r
- xor ax, ax ; xor eax, eax actually\r
- mov eax, ss\r
- mov dword ptr (IA32_REGS ptr [esp])._SS, eax\r
- shl ax, 4 ; shl eax, 4 actually\r
- add ax, sp ; add eax, esp actually\r
- add sp, sizeof (IA32_REGS) ; add esp, sizeof (IA32_REGS)\r
- DB 66h\r
- mov dword ptr (IA32_REGS ptr [esp - sizeof (IA32_REGS)])._ESP, esp\r
- DB 66h\r
- lss esp, fword ptr [esi] ; restore protected mode stack\r
- DB 66h\r
- retf ; go back to protected mode\r
-@BackToThunk:\r
- lidt fword ptr [rsp + 68h] ; restore protected mode IDTR\r
- shl rax, 32\r
- shr rax, 32 ; clear high order 32 bits of RAX\r
- pop gs\r
- pop fs\r
- pop rcx\r
- mov es, ecx\r
- pop rcx\r
- mov ds, ecx\r
- ret\r
-InternalAsmThunk16 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; Wbinvd.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWbinvd function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWbinvd (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWbinvd PROC\r
- wbinvd\r
- ret\r
-AsmWbinvd ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteCr0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteCr0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteCr0 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteCr0 PROC\r
- mov cr0, rcx\r
- ret\r
-AsmWriteCr0 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteCr2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteCr2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteCr2 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteCr2 PROC\r
- mov cr2, rcx\r
- ret\r
-AsmWriteCr2 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteCr3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteCr3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteCr3 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteCr3 PROC\r
- mov cr3, rcx\r
- ret\r
-AsmWriteCr3 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteCr4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteCr4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteCr4 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteCr4 PROC\r
- mov cr4, rcx\r
- ret\r
-AsmWriteCr4 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteDr0 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteDr0 PROC\r
- mov dr0, rcx\r
- ret\r
-AsmWriteDr0 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr1.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr1 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteDr1 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteDr1 PROC\r
- mov dr1, rcx\r
- ret\r
-AsmWriteDr1 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteDr2 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteDr2 PROC\r
- mov dr2, rcx\r
- ret\r
-AsmWriteDr2 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteDr3 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteDr3 PROC\r
- mov dr3, rcx\r
- ret\r
-AsmWriteDr3 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteDr4 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteDr4 PROC\r
- DB 0fh, 23h, 0e1h\r
- ret\r
-AsmWriteDr4 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr5.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr5 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteDr5 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteDr5 PROC\r
- DB 0fh, 23h, 0e9h\r
- ret\r
-AsmWriteDr5 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr6.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr6 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteDr6 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteDr6 PROC\r
- mov dr6, rcx\r
- ret\r
-AsmWriteDr6 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteDr7.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteDr7 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteDr7 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteDr7 PROC\r
- mov dr7, rcx\r
- ret\r
-AsmWriteDr7 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteGdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteGdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-InternalX86WriteGdtr PROC\r
- lgdt fword ptr [rcx]\r
- ret\r
-InternalX86WriteGdtr ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteIdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteIdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-InternalX86WriteIdtr PROC\r
- lidt fword ptr [rcx]\r
- ret\r
-InternalX86WriteIdtr ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteLdtr.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteLdtr function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; AsmWriteLdtr (\r
-; IN UINT16 Ldtr\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteLdtr PROC\r
- lldt cx\r
- ret\r
-AsmWriteLdtr ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm0.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm0 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteMm0 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteMm0 PROC\r
- DB 48h, 0fh, 6eh, 0c1h\r
- ret\r
-AsmWriteMm0 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm1.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm1 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteMm1 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteMm1 PROC\r
- DB 48h, 0fh, 6eh, 0c9h\r
- ret\r
-AsmWriteMm1 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm2.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm2 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteMm2 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteMm2 PROC\r
- DB 48h, 0fh, 6eh, 0d1h\r
- ret\r
-AsmWriteMm2 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm3.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm3 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteMm3 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteMm3 PROC\r
- DB 48h, 0fh, 6eh, 0d9h\r
- ret\r
-AsmWriteMm3 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm4.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm4 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteMm4 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteMm4 PROC\r
- DB 48h, 0fh, 6eh, 0e1h\r
- ret\r
-AsmWriteMm4 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm5.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm5 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteMm5 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteMm5 PROC\r
- DB 48h, 0fh, 6eh, 0e9h\r
- ret\r
-AsmWriteMm5 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm6.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm6 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteMm6 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteMm6 PROC\r
- DB 48h, 0fh, 6eh, 0f1h\r
- ret\r
-AsmWriteMm6 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMm7.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMm7 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINTN\r
-; EFIAPI\r
-; AsmWriteMm7 (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteMm7 PROC\r
- DB 48h, 0fh, 6eh, 0f9h\r
- ret\r
-AsmWriteMm7 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMsr32.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMsr32 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT32\r
-; EFIAPI\r
-; AsmWriteMsr32 (\r
-; IN UINT32 Index,\r
-; IN UINT32 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteMsr32 PROC\r
- mov eax, edx\r
- xor edx, edx\r
- wrmsr\r
- ret\r
-AsmWriteMsr32 ENDP\r
-\r
- END\r
+++ /dev/null
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. 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
-; WriteMsr64.Asm\r
-;\r
-; Abstract:\r
-;\r
-; AsmWriteMsr64 function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; UINT64\r
-; EFIAPI\r
-; AsmWriteMsr64 (\r
-; IN UINT32 Index,\r
-; IN UINT64 Value\r
-; );\r
-;------------------------------------------------------------------------------\r
-AsmWriteMsr64 PROC\r
- push rdx\r
- mov eax, edx\r
- shr rdx, 20h\r
- wrmsr\r
- pop rax\r
- ret\r
-AsmWriteMsr64 ENDP\r
-\r
- END\r