Rename dirs

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@16 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
bbahnsen
2006-04-24 22:17:39 +00:00
parent dd9f96de98
commit 185d764218
275 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ARShiftU64.asm
;
; Abstract:
;
; 64-bit arithmetic right shift function for IA-32
;
;------------------------------------------------------------------------------
.686
.model flat,C
.code
InternalMathARShiftU64 PROC
mov cl, [esp + 12]
mov eax, [esp + 8]
cdq
test cl, 32
cmovz edx, eax
cmovz eax, [esp + 4]
shrd eax, edx, cl
sar edx, cl
ret
InternalMathARShiftU64 ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ARShiftU64.asm
#
# Abstract:
#
# 64-bit arithmetic right shift function for IA-32
#
#------------------------------------------------------------------------------
.global _ARShiftU64
_ARShiftU64:
movb 12(%esp),%cl
movl 8(%esp),%eax
cltd
testb $32,%cl
# MISMATCH: " cmovz edx, eax"
cmovz %eax, %edx
# MISMATCH: " cmovz eax, [esp + 4]"
cmovz 4(%esp), %eax
shrdl %cl,%edx,%eax
sar %cl,%edx
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------ ;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; CpuBreakpoint.Asm
;
; Abstract:
;
; CpuBreakpoint function
;
; Notes:
;
;------------------------------------------------------------------------------
.686
.model flat
.xmm
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; CpuBreakpoint (
; VOID
; );
;------------------------------------------------------------------------------
_CpuBreakpoint PROC
int 3
ret
_CpuBreakpoint ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------ ;
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# CpuBreakpoint.s
#
# Abstract:
#
# CpuBreakpoint function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# CpuBreakpoint (
# VOID
# );
#------------------------------------------------------------------------------
.global _CpuBreakpoint
_CpuBreakpoint:
int 3
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------ ;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; CpuFlushTlb.Asm
;
; Abstract:
;
; CpuFlushTlb function
;
; Notes:
;
;------------------------------------------------------------------------------
.386p
.model flat
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; CpuFlushTlb (
; VOID
; );
;------------------------------------------------------------------------------
_CpuFlushTlb PROC
mov eax, cr3
mov cr3, eax
ret
_CpuFlushTlb ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------ ;
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# CpuFlushTlb.Asm
#
# Abstract:
#
# CpuFlushTlb function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# CpuFlushTlb (
# VOID
# );
#------------------------------------------------------------------------------
.global _CpuFlushTlb
_CpuFlushTlb:
movl %cr3, %eax
movl %eax, %cr3
ret

View File

@@ -0,0 +1,66 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; CpuId.Asm
;
; Abstract:
;
; AsmCpuid function
;
; Notes:
;
;------------------------------------------------------------------------------
.586P
.model flat,C
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; AsmCpuid (
; IN UINT32 RegisterInEax,
; OUT UINT32 *RegisterOutEax OPTIONAL,
; OUT UINT32 *RegisterOutEbx OPTIONAL,
; OUT UINT32 *RegisterOutEcx OPTIONAL,
; OUT UINT32 *RegisterOutEdx OPTIONAL
; )
;------------------------------------------------------------------------------
AsmCpuid PROC USES ebx
push ebp
mov ebp, esp
mov eax, [ebp + 12]
cpuid
push ecx
mov ecx, [ebp + 16]
jecxz @F
mov [ecx], eax
@@:
mov ecx, [ebp + 20]
jecxz @F
mov [ecx], ebx
@@:
mov ecx, [ebp + 24]
jecxz @F
pop [ecx]
@@:
mov ecx, [ebp + 28]
jecxz @F
mov [ecx], edx
@@:
mov eax, [ebp + 12]
leave
ret
AsmCpuid ENDP
END

View File

@@ -0,0 +1,63 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# CpuId.Asm
#
# Abstract:
#
# AsmCpuid function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmCpuid (
# IN UINT32 RegisterInEax,
# OUT UINT32 *RegisterOutEax OPTIONAL,
# OUT UINT32 *RegisterOutEbx OPTIONAL,
# OUT UINT32 *RegisterOutEcx OPTIONAL,
# OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
.globl _AsmCpuid
_AsmCpuid:
push %ebx
push %edi
movl 12(%esp),%eax
cpuid
movl %ecx,%edi
movl 16(%esp),%ecx
jecxz L1
movl %eax,(%ecx)
L1:
movl 20(%esp),%ecx
jecxz L2
movl %ebx,(%ecx)
L2:
movl 24(%esp),%ecx
jecxz L3
movl %edi,(%ecx)
L3:
movl 28(%esp),%ecx
jecxz L4
movl %edx,(%ecx)
L4:
pop %edi
pop %ebx
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------ ;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; CpuPause.Asm
;
; Abstract:
;
; CpuPause function
;
; Notes:
;
;------------------------------------------------------------------------------
.686
.model flat
.xmm
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; CpuPause (
; VOID
; );
;------------------------------------------------------------------------------
_CpuPause PROC
pause
ret
_CpuPause ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------ ;
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# CpuPause.Asm
#
# Abstract:
#
# CpuPause function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# CpuPause (
# VOID
# );
#------------------------------------------------------------------------------
.global _CpuPause
_CpuPause:
pause
ret

View File

@@ -0,0 +1,39 @@
;------------------------------------------------------------------------------ ;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; CpuSleep.Asm
;
; Abstract:
;
; CpuSleep function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; CpuSleep (
; VOID
; );
;------------------------------------------------------------------------------
_CpuSleep PROC
hlt
ret
_CpuSleep ENDP
END

View File

@@ -0,0 +1,40 @@
#------------------------------------------------------------------------------ ;
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# CpuSleep.Asm
#
# Abstract:
#
# CpuSleep function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# CpuSleep (
# VOID
# );
#------------------------------------------------------------------------------
.global _CpuSleep
_CpuSleep:
hlt
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; DisableInterrupts.Asm
;
; Abstract:
;
; DisableInterrupts function
;
; Notes:
;
;------------------------------------------------------------------------------
.386p
.model flat
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; DisableInterrupts (
; VOID
; );
;------------------------------------------------------------------------------
_DisableInterrupts PROC
cli
ret
_DisableInterrupts ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# DisableInterrupts.Asm
#
# Abstract:
#
# DisableInterrupts function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# DisableInterrupts (
# VOID
# );
#------------------------------------------------------------------------------
.global _DisableInterrupts
_DisableInterrupts:
cli
ret

View File

@@ -0,0 +1,57 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; DisablePaging32.Asm
;
; Abstract:
;
; AsmDisablePaging32 function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; InternalX86DisablePaging32 (
; IN SWITCH_STACK_ENTRY_POINT EntryPoint,
; IN VOID *Context1, OPTIONAL
; IN VOID *Context2, OPTIONAL
; IN VOID *NewStack
; );
;------------------------------------------------------------------------------
InternalX86DisablePaging32 PROC
mov ebx, [esp + 4]
mov ecx, [esp + 8]
mov edx, [esp + 12]
pushfd
pop edi
cli
mov eax, cr0
btr eax, 31
mov esp, [esp + 16]
mov cr0, eax
push edi
popfd
push edx
push ecx
call ebx
jmp $
InternalX86DisablePaging32 ENDP
END

View File

@@ -0,0 +1,58 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# DisablePaging32.Asm
#
# Abstract:
#
# AsmDisablePaging32 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmDisablePaging32 (
# IN SWITCH_STACK_ENTRY_POINT EntryPoint,
# IN VOID *Context1, OPTIONAL
# IN VOID *Context2, OPTIONAL
# IN VOID *NewStack
# );
#------------------------------------------------------------------------------
.global _AsmDisablePaging32
_AsmDisablePaging32:
movl 4(%esp),%ebx
movl 8(%esp),%ecx
movl 12(%esp),%edx
pushfl
popl %edi
cli
movl %cr0, %eax
btrl $31,%eax
movl 16(%esp),%esp
movl %eax, %cr0
pushl %edi
popfl
pushl %edx
pushl %ecx
call *%ebx
jmp .

View File

@@ -0,0 +1,38 @@
/** @file
Integer division worker functions for Ia32.
Copyright (c) 2006, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: DivS64x64Remainder.c
**/
#include "../BaseLibInternals.h"
INT64
EFIAPI
InternalMathDivRemS64x64 (
IN INT64 Dividend,
IN INT64 Divisor,
OUT INT64 *Remainder
)
{
INT64 Quot;
Quot = InternalMathDivRemU64x64 (
Dividend >= 0 ? Dividend : -Dividend,
Divisor >= 0 ? Divisor : -Divisor,
(UINT64 *) Remainder
);
if (Remainder != NULL && Dividend < 0) {
*Remainder = -*Remainder;
}
return (Dividend ^ Divisor) >= 0 ? Quot : -Quot;
}

View File

@@ -0,0 +1,38 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; DivU64x32.asm
;
; Abstract:
;
; Calculate the quotient of a 64-bit integer by a 32-bit integer
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
InternalMathDivU64x32 PROC
mov eax, [esp + 8]
mov ecx, [esp + 12]
xor edx, edx
div ecx
push eax
mov eax, [esp + 8]
div ecx
pop edx
ret
InternalMathDivU64x32 ENDP
END

View File

@@ -0,0 +1,39 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# DivU64x32.asm
#
# Abstract:
#
# Calculate the quotient of a 64-bit integer by a 32-bit integer
#
#------------------------------------------------------------------------------
.global _DivU64x32
_DivU64x32:
movl 8(%esp),%eax
movl 12(%esp),%ecx
xorl %edx,%edx
divl %ecx
pushl %eax
movl 8(%esp),%eax
divl %ecx
popl %edx
ret

View File

@@ -0,0 +1,42 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; DivError.asm
;
; Abstract:
;
; Set error flag for all division functions
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
InternalMathDivRemU64x32 PROC
mov ecx, [esp + 12]
mov eax, [esp + 8]
xor edx, edx
div ecx
push eax
mov eax, [esp + 8]
div ecx
mov ecx, [esp + 20]
jecxz @F
mov [ecx], edx
@@:
pop edx
ret
InternalMathDivRemU64x32 ENDP
END

View File

@@ -0,0 +1,43 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# DivError.asm
#
# Abstract:
#
# Set error flag for all division functions
#
#------------------------------------------------------------------------------
.global _InternalMathDivRemU64x32
_InternalMathDivRemU64x32:
movl 12(%esp),%ecx
movl 8(%esp),%eax
xorl %edx,%edx
divl %ecx
pushl %eax
movl 8(%esp),%eax
divl %ecx
movl 20(%esp),%ecx
jecxz L1
movl %edx,(%ecx)
L1:
popl %edx
ret

View File

@@ -0,0 +1,83 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; DivU64x64Remainder.asm
;
; Abstract:
;
; Calculate the quotient of a 64-bit integer by a 64-bit integer and returns
; both the quotient and the remainder
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
EXTERN InternalMathDivRemU64x32:PROC
InternalMathDivRemU64x64 PROC
mov ecx, [esp + 16]
test ecx, ecx
jnz _@DivRemU64x64
mov ecx, [esp + 20]
jecxz @F
and dword ptr [ecx + 4], 0
mov [esp + 16], ecx
@@:
jmp InternalMathDivRemU64x32
InternalMathDivRemU64x64 ENDP
_@DivRemU64x64 PROC USES ebx esi edi
mov edx, dword ptr [esp + 20]
mov eax, dword ptr [esp + 16]
mov edi, edx
mov esi, eax
mov ebx, dword ptr [esp + 24]
@@:
shr edx, 1
rcr eax, 1
shrd ebx, ecx, 1
shr ecx, 1
jnz @B
div ebx
mov ebx, eax
mov ecx, [esp + 28]
mul dword ptr [esp + 24]
imul ecx, ebx
add edx, ecx
mov ecx, dword ptr [esp + 32]
jc @TooLarge
cmp edi, edx
ja @Correct
jb @TooLarge
cmp esi, eax
jae @Correct
@TooLarge:
dec ebx
jecxz @Return
sub eax, dword ptr [esp + 24]
sbb edx, dword ptr [esp + 28]
@Correct:
jecxz @Return
sub esi, eax
sbb edi, edx
mov [ecx], esi
mov [ecx + 4], edi
@Return:
mov eax, ebx
xor edx, edx
ret
_@DivRemU64x64 ENDP
END

View File

@@ -0,0 +1,89 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# DivU64x64Remainder.asm
#
# Abstract:
#
# Calculate the quotient of a 64-bit integer by a 64-bit integer and returns
# both the quotient and the remainder
#
#------------------------------------------------------------------------------
.extern _InternalMathDivRemU64x32
.global _InternalMathDivRemU64x64
_InternalMathDivRemU64x64:
movl 16(%esp),%ecx
testl %ecx,%ecx
jnz _DivRemU64x64
movl 20(%esp),%ecx
jecxz L1
and $0,4(%ecx)
movl %ecx,16(%esp)
L1:
jmp _InternalMathDivRemU64x32
.global DivRemU64x64
DivRemU64x64:
# MISMATCH: "DivRemU64x64: USES ebx esi edi"
push %ebx
push %esi
push %edi
mov 20(%esp), %edx
mov 16(%esp), %eax
movl %edx,%edi
movl %eax,%esi
mov 24(%esp), %ebx
L2:
shrl %edx
rcrl $1,%eax
shrdl $1,%ecx,%ebx
shrl %ecx
jnz L2
divl %ebx
movl %eax,%ebx
movl 28(%esp),%ecx
mull 24(%esp)
imull %ebx,%ecx
addl %ecx,%edx
mov 32(%esp), %ecx
jc TooLarge
cmpl %edx,%edi
ja Correct
jb TooLarge
cmpl %eax,%esi
jae Correct
TooLarge:
decl %ebx
jecxz Return
sub 24(%esp), %eax
sbb 28(%esp), %edx
Correct:
jecxz Return
subl %eax,%esi
sbbl %edx,%edi
movl %esi,(%ecx)
movl %edi,4(%ecx)
Return:
movl %ebx,%eax
xorl %edx,%edx
push %edi
push %esi
push %ebx
ret

View File

@@ -0,0 +1,41 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; EnableDisableInterrupts.Asm
;
; Abstract:
;
; EnableDisableInterrupts function
;
; Notes:
;
;------------------------------------------------------------------------------
.386p
.model flat
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; EnableDisableInterrupts (
; VOID
; );
;------------------------------------------------------------------------------
_EnableDisableInterrupts PROC
sti
cli
ret
_EnableDisableInterrupts ENDP
END

View File

@@ -0,0 +1,42 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# EnableDisableInterrupts.Asm
#
# Abstract:
#
# EnableDisableInterrupts function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# EnableDisableInterrupts (
# VOID
# );
#------------------------------------------------------------------------------
.global _EnableDisableInterrupts
_EnableDisableInterrupts:
sti
cli
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; EnableInterrupts.Asm
;
; Abstract:
;
; EnableInterrupts function
;
; Notes:
;
;------------------------------------------------------------------------------
.386p
.model flat
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; EnableInterrupts (
; VOID
; );
;------------------------------------------------------------------------------
_EnableInterrupts PROC
sti
ret
_EnableInterrupts ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# EnableInterrupts.Asm
#
# Abstract:
#
# EnableInterrupts function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# EnableInterrupts (
# VOID
# );
#------------------------------------------------------------------------------
.global _EnableInterrupts
_EnableInterrupts:
sti
ret

View File

@@ -0,0 +1,57 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; EnablePaging32.Asm
;
; Abstract:
;
; AsmEnablePaging32 function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; InternalX86EnablePaging32 (
; IN SWITCH_STACK_ENTRY_POINT EntryPoint,
; IN VOID *Context1, OPTIONAL
; IN VOID *Context2, OPTIONAL
; IN VOID *NewStack
; );
;------------------------------------------------------------------------------
InternalX86EnablePaging32 PROC
mov ebx, [esp + 4]
mov ecx, [esp + 8]
mov edx, [esp + 12]
pushfd
pop edi
cli
mov eax, cr0
bts eax, 31
mov esp, [esp + 16]
mov cr0, eax
push edi
popfd
push edx
push ecx
call ebx
jmp $
InternalX86EnablePaging32 ENDP
END

View File

@@ -0,0 +1,58 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# EnablePaging32.Asm
#
# Abstract:
#
# AsmEnablePaging32 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmEnablePaging32 (
# IN SWITCH_STACK_ENTRY_POINT EntryPoint,
# IN VOID *Context1, OPTIONAL
# IN VOID *Context2, OPTIONAL
# IN VOID *NewStack
# );
#------------------------------------------------------------------------------
.global _AsmEnablePaging32
_AsmEnablePaging32:
movl 4(%esp),%ebx
movl 8(%esp),%ecx
movl 12(%esp),%edx
pushfl
popl %edi
cli
movl %cr0, %eax
btsl $31,%eax
movl 16(%esp),%esp
movl %eax, %cr0
pushl %edi
popfl
pushl %edx
pushl %ecx
call *%ebx
jmp .

View File

@@ -0,0 +1,57 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; EnablePaging64.Asm
;
; Abstract:
;
; AsmEnablePaging64 function
;
; Notes:
;
;------------------------------------------------------------------------------
.686p
.model flat,C
.code
InternalX86EnablePaging64 PROC
cli
mov [esp], @F ; offset for far retf
mov eax, cr4
or al, (1 SHL 5)
mov cr4, eax ; enable PAE
mov ecx, 0c0000080h
rdmsr
or ah, 1 ; set LME
wrmsr
mov eax, cr0
bts eax, 31
mov cr0, eax ; enable paging
retf
@@: ; long mode starts here
DB 67h, 48h
mov ebx, [esp] ; mov rbx, [esp]
DB 67h, 48h
mov ecx, [esp + 8] ; mov rcx, [esp + 8]
DB 67h, 48h
mov edx, [esp + 10h] ; mov rdx, [esp + 10h]
DB 67h, 48h
mov esp, [esp + 18h] ; mov rsp, [esp + 18h]
DB 48h
add esp, -20h ; add rsp, -20h
call ebx ; call rbx
jmp $
InternalX86EnablePaging64 ENDP
END

View File

@@ -0,0 +1,66 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# EnablePaging64.Asm
#
# Abstract:
#
# AsmEnablePaging64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#.MODEL flat
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmEnablePaging64 (
# IN UINT16 CodeSelector,
# IN UINT64 EntryPoint,
# IN UINT64 Context1, OPTIONAL
# IN UINT64 Context2, OPTIONAL
# IN UINT64 NewStack
# );
#------------------------------------------------------------------------------
.global _AsmEnablePaging64
_AsmEnablePaging64:
cli
movl $$LongStart, (%esp)
movl %cr4, %eax
orb $0x20, %al
movl %eax, %cr4 # enable PAE
movl $0xc0000080, %ecx
rdmsr
orb $1, %ah # set LME
wrmsr
movl %cr0, %eax
btsl $31, %eax
movl %eax, %cr0 # enable paging
lret
LongStart: # long mode starts here
.byte 0x67,0x48
movl (%esp), %ebx # mov rbx, [esp]
.byte 0x67,0x48
movl 8(%esp), %ecx # mov rcx, [esp + 8]
.byte 0x67,0x48
movl 0x10(%esp), %edx # mov rdx, [esp + 10h]
.byte 0x67,0x48
movl 0x18(%esp), %esp # mov rsp, [esp + 18h]
.byte 0x48
addl $0x-20, %esp # add rsp, -20h
call *%ebx # call rbx
jmp .

View File

@@ -0,0 +1,42 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; FlushCacheLine.Asm
;
; Abstract:
;
; AsmFlushCacheLine function
;
; Notes:
;
;------------------------------------------------------------------------------
.586P
.model flat
.xmm
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; AsmFlushCacheLine (
; IN VOID *LinearAddress
; );
;------------------------------------------------------------------------------
_AsmFlushCacheLine PROC
mov eax, [esp + 4]
clflush [eax]
ret
_AsmFlushCacheLine ENDP
END

View File

@@ -0,0 +1,43 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# FlushCacheLine.Asm
#
# Abstract:
#
# AsmFlushCacheLine function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmFlushCacheLine (
# IN VOID *LinearAddress
# );
#------------------------------------------------------------------------------
.global _AsmFlushCacheLine
_AsmFlushCacheLine:
movl 4(%esp),%eax
clflush (%eax)
ret

View File

@@ -0,0 +1,42 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; FxRestore.Asm
;
; Abstract:
;
; AsmFxRestore function
;
; Notes:
;
;------------------------------------------------------------------------------
.586P
.model flat,C
.xmm
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; InternalX86FxRestore (
; IN CONST IA32_FX_BUFFER *Buffer
; );
;------------------------------------------------------------------------------
InternalX86FxRestore PROC
mov eax, [esp + 4]
fxrstor [eax]
ret
InternalX86FxRestore ENDP
END

View File

@@ -0,0 +1,43 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# FxRestore.Asm
#
# Abstract:
#
# AsmFxRestore function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmFxRestore (
# IN CONST IA32_FX_BUFFER *Buffer
# );
#------------------------------------------------------------------------------
.global _AsmFxRestore
_AsmFxRestore:
movl 4(%esp),%eax
fxrstor (%eax)
ret

View File

@@ -0,0 +1,42 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; FxSave.Asm
;
; Abstract:
;
; AsmFxSave function
;
; Notes:
;
;------------------------------------------------------------------------------
.586P
.model flat,C
.xmm
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; InternalX86FxSave (
; OUT IA32_FX_BUFFER *Buffer
; );
;------------------------------------------------------------------------------
InternalX86FxSave PROC
mov eax, [esp + 4]
fxsave [eax]
ret
InternalX86FxSave ENDP
END

View File

@@ -0,0 +1,43 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# FxSave.Asm
#
# Abstract:
#
# AsmFxSave function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmFxSave (
# OUT IA32_FX_BUFFER *Buffer
# );
#------------------------------------------------------------------------------
.global _AsmFxSave
_AsmFxSave:
movl 4(%esp),%eax
fxsave (%eax)
ret

View File

@@ -0,0 +1,45 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; InterlockedCompareExchange32.Asm
;
; Abstract:
;
; InterlockedCompareExchange32 function
;
; Notes:
;
;------------------------------------------------------------------------------
.486
.model flat,C
.code
;------------------------------------------------------------------------------
; UINT32
; EFIAPI
; InterlockedCompareExchange32 (
; IN UINT32 *Value,
; IN UINT32 CompareValue,
; IN UINT32 ExchangeValue
; );
;------------------------------------------------------------------------------
InternalSyncCompareExchange32 PROC
mov ecx, [esp + 4]
mov eax, [esp + 8]
mov edx, [esp + 12]
lock cmpxchg [ecx], edx
ret
InternalSyncCompareExchange32 ENDP
END

View File

@@ -0,0 +1,64 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# InterlockedCompareExchange32.Asm
#
# Abstract:
#
# InterlockedCompareExchange32 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID *
# EFIAPI
# InterlockedCompareExchangePointer (
# IN VOID **Value,
# IN VOID *CompareValue,
# IN VOID *ExchangeValue
# );
#------------------------------------------------------------------------------
.global _InterlockedCompareExchangePointer
_InterlockedCompareExchangePointer:
#
# InterlockedCompareExchangePointer() shares the same code as
# InterlockedCompareExchange32() on IA32 and thus no code inside this
# function
#
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# InterlockedCompareExchange32 (
# IN UINT32 *Value,
# IN UINT32 CompareValue,
# IN UINT32 ExchangeValue
# );
#------------------------------------------------------------------------------
.global _InterlockedCompareExchange32
_InterlockedCompareExchange32:
movl 4(%esp),%ecx
movl 8(%esp),%eax
movl 12(%esp),%edx
lock cmpxchgl %edx,(%ecx)
ret

View File

@@ -0,0 +1,47 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; InterlockedCompareExchange64.Asm
;
; Abstract:
;
; InterlockedCompareExchange64 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586P
.model flat,C
.code
;------------------------------------------------------------------------------
; UINT64
; EFIAPI
; InterlockedCompareExchange64 (
; IN UINT64 *Value,
; IN UINT64 CompareValue,
; IN UINT64 ExchangeValue
; );
;------------------------------------------------------------------------------
InternalSyncCompareExchange64 PROC USES esi ebx
mov esi, [esp + 12]
mov eax, [esp + 16]
mov edx, [esp + 20]
mov ebx, [esp + 24]
mov ecx, [esp + 28]
lock cmpxchg8b qword ptr [esi]
ret
InternalSyncCompareExchange64 ENDP
END

View File

@@ -0,0 +1,52 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# InterlockedCompareExchange64.Asm
#
# Abstract:
#
# InterlockedCompareExchange64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InterlockedCompareExchange64 (
# IN UINT64 *Value,
# IN UINT64 CompareValue,
# IN UINT64 ExchangeValue
# );
#------------------------------------------------------------------------------
.global _InterlockedCompareExchange64
push %esi
push %ebx
movl 12(%esp),%esi
movl 16(%esp),%eax
movl 20(%esp),%edx
movl 24(%esp),%ebx
movl 28(%esp),%ecx
lock
cmpxchg8b (%esi)
pop %ebx
pop %esi
ret

View File

@@ -0,0 +1,42 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; InterlockedDecrement.Asm
;
; Abstract:
;
; InterlockedDecrement function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
;------------------------------------------------------------------------------
; UINT32
; EFIAPI
; InterlockedDecrement (
; IN UINT32 *Value
; );
;------------------------------------------------------------------------------
InternalSyncDecrement PROC
mov eax, [esp + 4]
lock dec dword ptr [eax]
mov eax, [eax]
ret
InternalSyncDecrement ENDP
END

View File

@@ -0,0 +1,44 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# InterlockedDecrement.Asm
#
# Abstract:
#
# InterlockedDecrement function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# InterlockedDecrement (
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
.global _InterlockedDecrement
_InterlockedDecrement:
movl 4(%esp),%eax
lock
decl (%eax)
movl (%eax),%eax
ret

View File

@@ -0,0 +1,42 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; InterlockedIncrement.Asm
;
; Abstract:
;
; InterlockedIncrement function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
;------------------------------------------------------------------------------
; UINT32
; EFIAPI
; InterlockedIncrement (
; IN UINT32 *Value
; );
;------------------------------------------------------------------------------
InternalSyncIncrement PROC
mov eax, [esp + 4]
lock inc dword ptr [eax]
mov eax, [eax]
ret
InternalSyncIncrement ENDP
END

View File

@@ -0,0 +1,44 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# InterlockedIncrement.Asm
#
# Abstract:
#
# InterlockedIncrement function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# InterlockedIncrement (
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
.global _InterlockedIncrement
_InterlockedIncrement:
movl 4(%esp),%eax
lock
incl (%eax)
movl (%eax),%eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; Invd.Asm
;
; Abstract:
;
; AsmInvd function
;
; Notes:
;
;------------------------------------------------------------------------------
.486p
.model flat
.code
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; AsmInvd (
; VOID
; );
;------------------------------------------------------------------------------
_AsmInvd PROC
invd
ret
_AsmInvd ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# Invd.Asm
#
# Abstract:
#
# AsmInvd function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmInvd (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmInvd
_AsmInvd:
invd
ret

View File

@@ -0,0 +1,41 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; LRotU64.asm
;
; Abstract:
;
; 64-bit left rotation for Ia32
;
;------------------------------------------------------------------------------
.686
.model flat,C
.code
InternalMathLRotU64 PROC USES ebx
mov cl, [esp + 16]
mov edx, [esp + 12]
mov eax, [esp + 8]
shld ebx, edx, cl
shld edx, eax, cl
ror ebx, cl
shld eax, ebx, cl
test cl, 32
cmovnz ecx, eax
cmovnz eax, edx
cmovnz edx, ecx
ret
InternalMathLRotU64 ENDP
END

View File

@@ -0,0 +1,43 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# LRotU64.asm
#
# Abstract:
#
# 64-bit left rotation for Ia32
#
#------------------------------------------------------------------------------
.global _LRotU64
push %ebx
movb 16(%esp),%cl
movl 12(%esp),%edx
movl 8(%esp),%eax
shldl %cl,%edx,%ebx
shldl %cl,%eax,%edx
rorl %cl,%ebx
shldl %cl,%ebx,%eax
testb $32,%cl
cmovnz %eax, %ecx
cmovnz %edx, %eax
cmovnz %ecx, %edx
pop %ebx
ret

View File

@@ -0,0 +1,38 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; LShiftU64.asm
;
; Abstract:
;
; 64-bit left shift function for IA-32
;
;------------------------------------------------------------------------------
.686
.model flat,C
.code
InternalMathLShiftU64 PROC
mov cl, [esp + 12]
xor eax, eax
mov edx, [esp + 4]
test cl, 32
cmovz eax, edx
cmovz edx, [esp + 8]
shld edx, eax, cl
shl eax, cl
ret
InternalMathLShiftU64 ENDP
END

View File

@@ -0,0 +1,39 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# LShiftU64.asm
#
# Abstract:
#
# 64-bit left shift function for IA-32
#
#------------------------------------------------------------------------------
.global _LShiftU64
_LShiftU64:
movb 12(%esp),%cl
xorl %eax,%eax
movl 4(%esp),%edx
testb $32,%cl
cmovz %edx, %eax
cmovz 8(%esp), %edx
shldl %cl,%eax,%edx
shll %cl,%eax
ret

View File

@@ -0,0 +1,38 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; LongJump.Asm
;
; Abstract:
;
; Implementation of LongJump() on IA-32.
;
;------------------------------------------------------------------------------
.386
.model flat
.code
_LongJump PROC
pop eax
pop edx
pop eax
mov ebx, [edx]
mov esi, [edx + 4]
mov edi, [edx + 8]
mov ebp, [edx + 12]
mov esp, [edx + 16]
jmp dword ptr [edx + 20]
_LongJump ENDP
END

View File

@@ -0,0 +1,39 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# LongJump.Asm
#
# Abstract:
#
# Implementation of LongJump() on IA-32.
#
#------------------------------------------------------------------------------
.global _LongJump
_LongJump:
popl %eax
popl %edx
popl %eax
movl (%edx),%ebx
movl 4(%edx),%esi
movl 8(%edx),%edi
movl 12(%edx),%ebp
movl 16(%edx),%esp
jmpl *20(%edx)

View File

@@ -0,0 +1,37 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; DivU64x32.asm
;
; Abstract:
;
; Calculate the remainder of a 64-bit integer by a 32-bit integer
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
InternalMathModU64x32 PROC
mov eax, [esp + 8]
mov ecx, [esp + 12]
xor edx, edx
div ecx
mov eax, [esp + 4]
div ecx
mov eax, edx
ret
InternalMathModU64x32 ENDP
END

View File

@@ -0,0 +1,38 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# DivU64x32.asm
#
# Abstract:
#
# Calculate the remainder of a 64-bit integer by a 32-bit integer
#
#------------------------------------------------------------------------------
.global _ModU64x32
_ModU64x32:
movl 8(%esp),%eax
movl 12(%esp),%ecx
xorl %edx,%edx
divl %ecx
movl 4(%esp),%eax
divl %ecx
movl %edx,%eax
ret

View File

@@ -0,0 +1,45 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; Monitor.Asm
;
; Abstract:
;
; AsmMonitor function
;
; Notes:
;
;------------------------------------------------------------------------------
.686
.model flat
.code
;------------------------------------------------------------------------------
; UINT64
; EFIAPI
; AsmMonitor (
; IN UINTN Eax,
; IN UINTN Ecx,
; IN UINTN Edx
; );
;------------------------------------------------------------------------------
_AsmMonitor PROC
mov eax, [esp + 4]
mov ecx, [esp + 8]
mov edx, [esp + 12]
DB 0fh, 1, 0c8h
ret
_AsmMonitor ENDP
END

View File

@@ -0,0 +1,46 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# Monitor.Asm
#
# Abstract:
#
# AsmMonitor function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmMonitor (
# IN UINTN Eax,
# IN UINTN Ecx,
# IN UINTN Edx
# );
#------------------------------------------------------------------------------
.global _AsmMonitor
_AsmMonitor:
movl 4(%esp),%eax
movl 8(%esp),%ecx
movl 12(%esp),%edx
monitor %eax,%ecx,%edx
ret

View File

@@ -0,0 +1,35 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; MultU64x32.asm
;
; Abstract:
;
; Calculate the product of a 64-bit integer and a 32-bit integer
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
InternalMathMultU64x32 PROC
mov ecx, [esp + 12]
mov eax, ecx
imul ecx, [esp + 8]
mul dword ptr [esp + 4]
add edx, ecx
ret
InternalMathMultU64x32 ENDP
END

View File

@@ -0,0 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# MultU64x32.asm
#
# Abstract:
#
# Calculate the product of a 64-bit integer and a 32-bit integer
#
#------------------------------------------------------------------------------
.global _MultU64x32
_MultU64x32:
movl 12(%esp),%ecx
movl %ecx,%eax
imull 8(%esp),%ecx
mull 4(%esp)
addl %ecx,%edx
ret

View File

@@ -0,0 +1,39 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; MultU64x64.asm
;
; Abstract:
;
; Calculate the product of a 64-bit integer and another 64-bit integer
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
InternalMathMultU64x64 PROC USES ebx
mov ebx, [esp + 8]
mov edx, [esp + 16]
mov ecx, ebx
mov eax, edx
imul ebx, [esp + 20]
imul edx, [esp + 12]
add ebx, edx
mul ecx
add edx, ebx
ret
InternalMathMultU64x64 ENDP
END

View File

@@ -0,0 +1,49 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# MultU64x64.asm
#
# Abstract:
#
# Calculate the product of a 64-bit integer and another 64-bit integer
#
#------------------------------------------------------------------------------
.global _MultS64x64
_MultS64x64:
#
# MultS64x32 shares the same implementation with _MultU64x32, and thus no
# code inside this function.
#
.global _MultU64x64
push %ebx
movl 8(%esp),%ebx
movl 16(%esp),%edx
movl %ebx,%ecx
movl %edx,%eax
imull 20(%esp),%ebx
imull 12(%esp),%edx
addl %edx,%ebx
mull %ecx
addl %ebx,%edx
pop %ebx
ret

View File

@@ -0,0 +1,43 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; Mwait.Asm
;
; Abstract:
;
; AsmMwait function
;
; Notes:
;
;------------------------------------------------------------------------------
.686
.model flat
.code
;------------------------------------------------------------------------------
; UINT64
; EFIAPI
; AsmMwait (
; IN UINTN Eax,
; IN UINTN Ecx
; );
;------------------------------------------------------------------------------
_AsmMwait PROC
mov eax, [esp + 4]
mov ecx, [esp + 8]
DB 0fh, 1, 0c9h
ret
_AsmMwait ENDP
END

View File

@@ -0,0 +1,44 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# Mwait.Asm
#
# Abstract:
#
# AsmMwait function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmMwait (
# IN UINTN Eax,
# IN UINTN Ecx
# );
#------------------------------------------------------------------------------
.global _AsmMwait
_AsmMwait:
movl 4(%esp),%eax
movl 8(%esp),%ecx
mwait %eax,%ecx
ret

View File

@@ -0,0 +1,30 @@
/** @file
Non-existing BaseLib functions on Ia32
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: Non-existing.c
**/
#include "../BaseLibInternals.h"
VOID
EFIAPI
InternalX86DisablePaging64 (
IN UINT16 CodeSelector,
IN UINT32 EntryPoint,
IN UINT32 Context1, OPTIONAL
IN UINT32 Context2, OPTIONAL
IN UINT32 NewStack
)
{
ASSERT (FALSE);
}

View File

@@ -0,0 +1,41 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; RRotU64.asm
;
; Abstract:
;
; 64-bit right rotation for Ia32
;
;------------------------------------------------------------------------------
.686
.model flat,C
.code
InternalMathRRotU64 PROC USES ebx
mov cl, [esp + 16]
mov eax, [esp + 8]
mov edx, [esp + 12]
shrd ebx, eax, cl
shrd eax, edx, cl
rol ebx, cl
shrd edx, ebx, cl
test cl, 32
cmovnz ecx, eax
cmovnz eax, edx
cmovnz edx, ecx
ret
InternalMathRRotU64 ENDP
END

View File

@@ -0,0 +1,43 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# RRotU64.asm
#
# Abstract:
#
# 64-bit right rotation for Ia32
#
#------------------------------------------------------------------------------
.global _RRotU64
push %ebx
movb 16(%esp),%cl
movl 8(%esp),%eax
movl 12(%esp),%edx
shrdl %cl,%eax,%ebx
shrdl %cl,%edx,%eax
roll %cl,%ebx
shrdl %cl,%ebx,%edx
testb $32,%cl
cmovnz %eax, %ecx
cmovnz %edx, %eax
cmovnz %ecx, %edx
pop %ebx
ret

View File

@@ -0,0 +1,38 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; RShiftU64.asm
;
; Abstract:
;
; 64-bit logical right shift function for IA-32
;
;------------------------------------------------------------------------------
.686
.model flat,C
.code
InternalMathRShiftU64 PROC
mov cl, [esp + 12]
xor edx, edx
mov eax, [esp + 8]
test cl, 32
cmovz edx, eax
cmovz eax, [esp + 4]
shrd eax, edx, cl
shr edx, cl
ret
InternalMathRShiftU64 ENDP
END

View File

@@ -0,0 +1,39 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# RShiftU64.asm
#
# Abstract:
#
# 64-bit logical right shift function for IA-32
#
#------------------------------------------------------------------------------
.global _RShiftU64
_RShiftU64:
movb 12(%esp),%cl
xorl %edx,%edx
movl 8(%esp),%eax
testb $32,%cl
cmovz %eax, %edx
cmovz 4(%esp), %eax
shrdl %cl,%edx,%eax
shrl %cl,%edx
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadCr0.Asm
;
; Abstract:
;
; AsmReadCr0 function
;
; Notes:
;
;------------------------------------------------------------------------------
.386p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadCr0 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadCr0 PROC
mov eax, cr0
ret
_AsmReadCr0 ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadCr0.Asm
#
# Abstract:
#
# AsmReadCr0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr0 (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadCr0
_AsmReadCr0:
movl %cr0, %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadCr2.Asm
;
; Abstract:
;
; AsmReadCr2 function
;
; Notes:
;
;------------------------------------------------------------------------------
.386p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadCr2 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadCr2 PROC
mov eax, cr2
ret
_AsmReadCr2 ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadCr2.Asm
#
# Abstract:
#
# AsmReadCr2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr2 (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadCr2
_AsmReadCr2:
movl %cr2, %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadCr3.Asm
;
; Abstract:
;
; AsmReadCr3 function
;
; Notes:
;
;------------------------------------------------------------------------------
.386p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadCr3 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadCr3 PROC
mov eax, cr3
ret
_AsmReadCr3 ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadCr3.Asm
#
# Abstract:
#
# AsmReadCr3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr3 (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadCr3
_AsmReadCr3:
movl %cr3, %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadCr4.Asm
;
; Abstract:
;
; AsmReadCr4 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadCr4 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadCr4 PROC
mov eax, cr4
ret
_AsmReadCr4 ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadCr4.Asm
#
# Abstract:
#
# AsmReadCr4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr4 (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadCr4
_AsmReadCr4:
movl %cr4, %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadCs.Asm
;
; Abstract:
;
; AsmReadCs function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat
.code
;------------------------------------------------------------------------------
; UINT16
; EFIAPI
; AsmReadCs (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadCs PROC
mov ax, cs
ret
_AsmReadCs ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadCs.Asm
#
# Abstract:
#
# AsmReadCs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadCs (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadCs
_AsmReadCs:
movw %cs,%ax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadDr0.Asm
;
; Abstract:
;
; AsmReadDr0 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadDr0 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadDr0 PROC
mov eax, dr0
ret
_AsmReadDr0 ENDP
END

View File

@@ -0,0 +1,40 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadDr0.Asm
#
# Abstract:
#
# AsmReadDr0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr0 (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadDr0
_AsmReadDr0:
movl %dr0, %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadDr1.Asm
;
; Abstract:
;
; AsmReadDr1 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadDr1 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadDr1 PROC
mov eax, dr1
ret
_AsmReadDr1 ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadDr1.Asm
#
# Abstract:
#
# AsmReadDr1 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr1 (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadDr1
_AsmReadDr1:
movl %dr1, %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadDr2.Asm
;
; Abstract:
;
; AsmReadDr2 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadDr2 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadDr2 PROC
mov eax, dr2
ret
_AsmReadDr2 ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadDr2.Asm
#
# Abstract:
#
# AsmReadDr2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr2 (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadDr2
_AsmReadDr2:
movl %dr2, %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadDr3.Asm
;
; Abstract:
;
; AsmReadDr3 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadDr3 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadDr3 PROC
mov eax, dr3
ret
_AsmReadDr3 ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadDr3.Asm
#
# Abstract:
#
# AsmReadDr3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr3 (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadDr3
_AsmReadDr3:
movl %dr3, %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadDr4.Asm
;
; Abstract:
;
; AsmReadDr4 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadDr4 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadDr4 PROC
DB 0fh, 21h, 0e0h
ret
_AsmReadDr4 ENDP
END

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadDr5.Asm
;
; Abstract:
;
; AsmReadDr5 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadDr5 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadDr5 PROC
DB 0fh, 21h, 0e8h
ret
_AsmReadDr5 ENDP
END

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadDr6.Asm
;
; Abstract:
;
; AsmReadDr6 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadDr6 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadDr6 PROC
mov eax, dr6
ret
_AsmReadDr6 ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadDr6.Asm
#
# Abstract:
#
# AsmReadDr6 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr6 (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadDr6
_AsmReadDr6:
movl %dr6, %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadDr7.Asm
;
; Abstract:
;
; AsmReadDr7 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586p
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadDr7 (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadDr7 PROC
mov eax, dr7
ret
_AsmReadDr7 ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadDr7.Asm
#
# Abstract:
#
# AsmReadDr7 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr7 (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadDr7
_AsmReadDr7:
movl %dr7, %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadDs.Asm
;
; Abstract:
;
; AsmReadDs function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat
.code
;------------------------------------------------------------------------------
; UINT16
; EFIAPI
; AsmReadDs (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadDs PROC
mov ax, ds
ret
_AsmReadDs ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadDs.Asm
#
# Abstract:
#
# AsmReadDs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadDs (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadDs
_AsmReadDs:
movw %ds,%ax
ret

View File

@@ -0,0 +1,41 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadEflags.Asm
;
; Abstract:
;
; AsmReadEflags function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadEflags (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadEflags PROC
pushfd
pop eax
ret
_AsmReadEflags ENDP
END

View File

@@ -0,0 +1,42 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadEflags.Asm
#
# Abstract:
#
# AsmReadEflags function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadEflags (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadEflags
_AsmReadEflags:
pushfl
popl %eax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadEs.Asm
;
; Abstract:
;
; AsmReadEs function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat
.code
;------------------------------------------------------------------------------
; UINT16
; EFIAPI
; AsmReadEs (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadEs PROC
mov ax, es
ret
_AsmReadEs ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadEs.Asm
#
# Abstract:
#
# AsmReadEs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadEs (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadEs
_AsmReadEs:
movw %es,%ax
ret

View File

@@ -0,0 +1,40 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadFs.Asm
;
; Abstract:
;
; AsmReadFs function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat
.code
;------------------------------------------------------------------------------
; UINT16
; EFIAPI
; AsmReadFs (
; VOID
; );
;------------------------------------------------------------------------------
_AsmReadFs PROC
mov ax, fs
ret
_AsmReadFs ENDP
END

View File

@@ -0,0 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# ReadFs.Asm
#
# Abstract:
#
# AsmReadFs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadFs (
# VOID
# );
#------------------------------------------------------------------------------
.global _AsmReadFs
_AsmReadFs:
movw %fs,%ax
ret

Some files were not shown because too many files have changed in this diff Show More