Update to use DOS format

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6360 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2008-11-03 09:25:10 +00:00
parent db835e01d3
commit b1ff428c96
182 changed files with 8928 additions and 8928 deletions

View File

@@ -1,25 +1,25 @@
#------------------------------------------------------------------------------
#
# 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:
#
# Implementation of CpuBreakpoint() on x86_64
#
#------------------------------------------------------------------------------
.global ASM_PFX(CpuBreakpoint)
ASM_PFX(CpuBreakpoint):
int $0x3
ret
#------------------------------------------------------------------------------
#
# 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:
#
# Implementation of CpuBreakpoint() on x86_64
#
#------------------------------------------------------------------------------
.global ASM_PFX(CpuBreakpoint)
ASM_PFX(CpuBreakpoint):
int $0x3
ret

View File

@@ -1,60 +1,60 @@
#------------------------------------------------------------------------------
#
# 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.S
#
# 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
# )
#------------------------------------------------------------------------------
.global ASM_PFX(AsmCpuid)
ASM_PFX(AsmCpuid):
push %rbx
mov %ecx, %eax
push %rax # save Index on stack
push %rdx
cpuid
test %r9, %r9
jz L1
mov %ecx, (%r9)
L1:
pop %rcx
jrcxz L2
mov %eax, (%rcx)
L2:
mov %r8, %rcx
jrcxz L3
mov %ebx, (%rcx)
L3:
mov 0x38(%rsp), %rcx
jrcxz L4
mov %edx, (%rcx)
L4:
pop %rax # restore Index to rax as return value
pop %rbx
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# 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
# )
#------------------------------------------------------------------------------
.global ASM_PFX(AsmCpuid)
ASM_PFX(AsmCpuid):
push %rbx
mov %ecx, %eax
push %rax # save Index on stack
push %rdx
cpuid
test %r9, %r9
jz L1
mov %ecx, (%r9)
L1:
pop %rcx
jrcxz L2
mov %eax, (%rcx)
L2:
mov %r8, %rcx
jrcxz L3
mov %ebx, (%rcx)
L3:
mov 0x38(%rsp), %rcx
jrcxz L4
mov %edx, (%rcx)
L4:
pop %rax # restore Index to rax as return value
pop %rbx
ret

View File

@@ -1,62 +1,62 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# CpuIdEx.S
#
# Abstract:
#
# AsmCpuidEx function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# AsmCpuidEx (
# IN UINT32 RegisterInEax,
# IN UINT32 RegisterInEcx,
# OUT UINT32 *RegisterOutEax OPTIONAL,
# OUT UINT32 *RegisterOutEbx OPTIONAL,
# OUT UINT32 *RegisterOutEcx OPTIONAL,
# OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
.global ASM_PFX(AsmCpuidEx)
ASM_PFX(AsmCpuidEx):
push %rbx
movl %ecx,%eax
movl %edx,%ecx
push %rax # save Index on stack
cpuid
mov 0x38(%rsp), %r10
test %r10, %r10
jz L1
mov %ecx,(%r10)
L1:
mov %r8, %rcx
jrcxz L2
movl %eax,(%rcx)
L2:
mov %r9, %rcx
jrcxz L3
mov %ebx, (%rcx)
L3:
mov 0x40(%rsp), %rcx
jrcxz L4
mov %edx, (%rcx)
L4:
pop %rax # restore Index to rax as return value
pop %rbx
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# CpuIdEx.S
#
# Abstract:
#
# AsmCpuidEx function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# AsmCpuidEx (
# IN UINT32 RegisterInEax,
# IN UINT32 RegisterInEcx,
# OUT UINT32 *RegisterOutEax OPTIONAL,
# OUT UINT32 *RegisterOutEbx OPTIONAL,
# OUT UINT32 *RegisterOutEcx OPTIONAL,
# OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
.global ASM_PFX(AsmCpuidEx)
ASM_PFX(AsmCpuidEx):
push %rbx
movl %ecx,%eax
movl %edx,%ecx
push %rax # save Index on stack
cpuid
mov 0x38(%rsp), %r10
test %r10, %r10
jz L1
mov %ecx,(%r10)
L1:
mov %r8, %rcx
jrcxz L2
movl %eax,(%rcx)
L2:
mov %r9, %rcx
jrcxz L3
mov %ebx, (%rcx)
L3:
mov 0x40(%rsp), %rcx
jrcxz L4
mov %edx, (%rcx)
L4:
pop %rax # restore Index to rax as return value
pop %rbx
ret

View File

@@ -1,65 +1,65 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# DisablePaging64.S
#
# Abstract:
#
# AsmDisablePaging64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86DisablePaging64 (
# IN UINT16 Cs,
# IN UINT64 EntryPoint,
# IN UINT64 Context1, OPTIONAL
# IN UINT32 Context2, OPTIONAL
# IN UINT64 NewStack
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86DisablePaging64)
ASM_PFX(InternalX86DisablePaging64):
cli
shl $0x20,%rcx # rcx[32..47] <- Cs
lea L1, %eax
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# DisablePaging64.S
#
# Abstract:
#
# AsmDisablePaging64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86DisablePaging64 (
# IN UINT16 Cs,
# IN UINT64 EntryPoint,
# IN UINT64 Context1, OPTIONAL
# IN UINT32 Context2, OPTIONAL
# IN UINT64 NewStack
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86DisablePaging64)
ASM_PFX(InternalX86DisablePaging64):
cli
shl $0x20,%rcx # rcx[32..47] <- Cs
lea L1, %eax
mov %r8d, %esi
or %rax, %rcx # rcx[0..47] <- Cs:@F
mov %r9d, %edi
mov 0x28(%rsp), %eax # eax <- New Stack
push %rcx
ret # switch to compatibility mode
L1:
mov %eax,%esp # set up new stack
mov %cr0,%rax
btr $0x1f,%eax
mov %rax,%cr0 # disable paging
mov $0xc0000080,%ecx
rdmsr
and $0xfe,%ah # clear LME
wrmsr
mov %cr4,%rax
and $0xdf,%al # clear PAE
mov %rax,%cr4
push %rdi # push Context2
push %rsi # push Context1
callq *%rdx # transfer control to EntryPoint
jmp . # no one should get here
L1:
mov %eax,%esp # set up new stack
mov %cr0,%rax
btr $0x1f,%eax
mov %rax,%cr0 # disable paging
mov $0xc0000080,%ecx
rdmsr
and $0xfe,%ah # clear LME
wrmsr
mov %cr4,%rax
and $0xdf,%al # clear PAE
mov %rax,%cr4
push %rdi # push Context2
push %rsi # push Context1
callq *%rdx # transfer control to EntryPoint
jmp . # no one should get here

View File

@@ -1,37 +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:
#
# EnableDisableInterrupts.S
#
# Abstract:
#
# EnableDisableInterrupts function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# EnableDisableInterrupts (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(EnableDisableInterrupts)
.align 16
ASM_PFX(EnableDisableInterrupts):
sti
cli
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# EnableDisableInterrupts function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# EnableDisableInterrupts (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(EnableDisableInterrupts)
.align 16
ASM_PFX(EnableDisableInterrupts):
sti
cli
ret

View File

@@ -1,35 +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:
#
# EnableInterrupts.S
#
# Abstract:
#
# EnableInterrupts function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# EnableInterrupts (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(EnableInterrupts)
ASM_PFX(EnableInterrupts):
sti
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# EnableInterrupts function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# EnableInterrupts (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(EnableInterrupts)
ASM_PFX(EnableInterrupts):
sti
ret

View File

@@ -1,61 +1,61 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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.S
#
# Abstract:
#
# AsmEnablePaging64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86EnablePaging64 (
# IN UINT16 Cs,
# IN UINT64 EntryPoint,
# IN UINT64 Context1, OPTIONAL
# IN UINT64 Context2, OPTIONAL
# IN UINT64 NewStack
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86EnablePaging64)
ASM_PFX(InternalX86EnablePaging64):
cli
pop %rax # skip the return address
callq Base
Base:
addl $(L1-Base),(%rsp) # offset for ret, seg is the 1st arg
mov %cr4,%rax
or $0x20,%al
mov %rax,%cr4 # enable PAE
mov $0xc0000080,%ecx
rdmsr
or $0x1,%ah # set LME
wrmsr
mov %cr0,%rax
bts $0x1f,%eax
mov %rax,%cr0 # enable paging
lret
L1: # long mode starts here
addr32 mov (%esp),%rbx
addr32 mov 0x8(%esp),%rcx
addr32 mov 0x10(%esp),%rdx
addr32 mov 0x18(%esp),%rsp
add $-0x20,%rsp
callq *%rbx
jmp . # dead loop if EntryPoint() returned
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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.S
#
# Abstract:
#
# AsmEnablePaging64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86EnablePaging64 (
# IN UINT16 Cs,
# IN UINT64 EntryPoint,
# IN UINT64 Context1, OPTIONAL
# IN UINT64 Context2, OPTIONAL
# IN UINT64 NewStack
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86EnablePaging64)
ASM_PFX(InternalX86EnablePaging64):
cli
pop %rax # skip the return address
callq Base
Base:
addl $(L1-Base),(%rsp) # offset for ret, seg is the 1st arg
mov %cr4,%rax
or $0x20,%al
mov %rax,%cr4 # enable PAE
mov $0xc0000080,%ecx
rdmsr
or $0x1,%ah # set LME
wrmsr
mov %cr0,%rax
bts $0x1f,%eax
mov %rax,%cr0 # enable paging
lret
L1: # long mode starts here
addr32 mov (%esp),%rbx
addr32 mov 0x8(%esp),%rcx
addr32 mov 0x10(%esp),%rdx
addr32 mov 0x18(%esp),%rsp
add $-0x20,%rsp
callq *%rbx
jmp . # dead loop if EntryPoint() returned

View File

@@ -1,36 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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.S
#
# Abstract:
#
# AsmFlushCacheLine function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID *
# EFIAPI
# AsmFlushCacheLine (
# IN VOID *LinearAddress
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmFlushCacheLine)
ASM_PFX(AsmFlushCacheLine):
clflush (%rcx)
mov %rcx, %rax
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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.S
#
# Abstract:
#
# AsmFlushCacheLine function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID *
# EFIAPI
# AsmFlushCacheLine (
# IN VOID *LinearAddress
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmFlushCacheLine)
ASM_PFX(AsmFlushCacheLine):
clflush (%rcx)
mov %rcx, %rax
ret

View File

@@ -1,35 +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:
#
# FxRestore.S
#
# Abstract:
#
# AsmFxRestore function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86FxRestore (
# IN CONST IA32_FX_BUFFER *Buffer
# )#
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86FxRestore)
ASM_PFX(InternalX86FxRestore):
fxrstor (%rcx)
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmFxRestore function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86FxRestore (
# IN CONST IA32_FX_BUFFER *Buffer
# )#
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86FxRestore)
ASM_PFX(InternalX86FxRestore):
fxrstor (%rcx)
ret

View File

@@ -1,35 +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:
#
# FxSave.S
#
# Abstract:
#
# AsmFxSave function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86FxSave (
# OUT IA32_FX_BUFFER *Buffer
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86FxSave)
ASM_PFX(InternalX86FxSave):
fxsave (%rcx)
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmFxSave function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86FxSave (
# OUT IA32_FX_BUFFER *Buffer
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86FxSave)
ASM_PFX(InternalX86FxSave):
fxsave (%rcx)
ret

View File

@@ -1,39 +1,39 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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.S
#
# Abstract:
#
# InterlockedCompareExchange64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InterlockedCompareExchange64 (
# IN UINT64 *Value,
# IN UINT64 CompareValue,
# IN UINT64 ExchangeValue
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSyncCompareExchange64)
.align 16
ASM_PFX(InternalSyncCompareExchange64):
mov %rdx, %rax
lock cmpxchg %r8,(%rcx)
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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.S
#
# Abstract:
#
# InterlockedCompareExchange64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InterlockedCompareExchange64 (
# IN UINT64 *Value,
# IN UINT64 CompareValue,
# IN UINT64 ExchangeValue
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSyncCompareExchange64)
.align 16
ASM_PFX(InternalSyncCompareExchange64):
mov %rdx, %rax
lock cmpxchg %r8,(%rcx)
ret

View File

@@ -1,36 +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:
#
# InterlockedDecrement.S
#
# Abstract:
#
# InterlockedDecrement function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# InterlockedDecrement (
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSyncDecrement)
ASM_PFX(InternalSyncDecrement):
lock decl (%rcx)
mov (%rcx), %eax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# InterlockedDecrement function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# InterlockedDecrement (
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSyncDecrement)
ASM_PFX(InternalSyncDecrement):
lock decl (%rcx)
mov (%rcx), %eax
ret

View File

@@ -1,36 +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:
#
# InterlockedIncrement.S
#
# Abstract:
#
# InterlockedIncrement function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# InterlockedIncrement (
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSyncIncrement)
ASM_PFX(InternalSyncIncrement):
lock incl (%rcx)
mov (%rcx), %eax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# InterlockedIncrement function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# InterlockedIncrement (
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSyncIncrement)
ASM_PFX(InternalSyncIncrement):
lock incl (%rcx)
mov (%rcx), %eax
ret

View File

@@ -1,35 +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:
#
# Invd.S
#
# Abstract:
#
# AsmInvd function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmInvd (
# VOID
# )#
#------------------------------------------------------------------------------
.global ASM_PFX(AsmInvd)
ASM_PFX(AsmInvd):
invd
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmInvd function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmInvd (
# VOID
# )#
#------------------------------------------------------------------------------
.global ASM_PFX(AsmInvd)
ASM_PFX(AsmInvd):
invd
ret

View File

@@ -1,41 +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:
#
# Monitor.S
#
# Abstract:
#
# AsmMonitor function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmMonitor (
# IN UINTN Eax,
# IN UINTN Ecx,
# IN UINTN Edx
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmMonitor)
.align 16
ASM_PFX(AsmMonitor):
mov %ecx,%eax
mov %edx,%ecx
mov %r8d,%edx
monitor
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmMonitor function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmMonitor (
# IN UINTN Eax,
# IN UINTN Ecx,
# IN UINTN Edx
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmMonitor)
.align 16
ASM_PFX(AsmMonitor):
mov %ecx,%eax
mov %edx,%ecx
mov %r8d,%edx
monitor
ret

View File

@@ -1,39 +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:
#
# Mwait.S
#
# Abstract:
#
# AsmMwait function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmMwait (
# IN UINTN Eax,
# IN UINTN Ecx
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmMwait)
.align 16
ASM_PFX(AsmMwait):
mov %ecx,%eax
mov %edx,%ecx
mwait %rax,%rcx
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmMwait function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmMwait (
# IN UINTN Eax,
# IN UINTN Ecx
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmMwait)
.align 16
ASM_PFX(AsmMwait):
mov %ecx,%eax
mov %edx,%ecx
mwait %rax,%rcx
ret

View File

@@ -1,36 +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:
#
# ReadCr0.S
#
# Abstract:
#
# AsmReadCr0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr0 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr0)
.align 16
ASM_PFX(AsmReadCr0):
mov %cr0, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadCr0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr0 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr0)
.align 16
ASM_PFX(AsmReadCr0):
mov %cr0, %rax
ret

View File

@@ -1,36 +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:
#
# ReadCr2.S
#
# Abstract:
#
# AsmReadCr2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr2 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr2)
.align 16
ASM_PFX(AsmReadCr2):
mov %cr2, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadCr2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr2 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr2)
.align 16
ASM_PFX(AsmReadCr2):
mov %cr2, %rax
ret

View File

@@ -1,36 +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:
#
# ReadCr3.S
#
# Abstract:
#
# AsmReadCr3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr3 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr3)
.align 16
ASM_PFX(AsmReadCr3):
mov %cr3, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadCr3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr3 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr3)
.align 16
ASM_PFX(AsmReadCr3):
mov %cr3, %rax
ret

View File

@@ -1,36 +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:
#
# ReadCr4.S
#
# Abstract:
#
# AsmReadCr4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr4 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr4)
.align 16
ASM_PFX(AsmReadCr4):
mov %cr4, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadCr4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadCr4 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr4)
.align 16
ASM_PFX(AsmReadCr4):
mov %cr4, %rax
ret

View File

@@ -1,36 +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:
#
# ReadCs.S
#
# Abstract:
#
# AsmReadCs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadCs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCs)
.align 16
ASM_PFX(AsmReadCs):
mov %cs, %eax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadCs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadCs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCs)
.align 16
ASM_PFX(AsmReadCs):
mov %cs, %eax
ret

View File

@@ -1,36 +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:
#
# ReadDr0.S
#
# Abstract:
#
# AsmReadDr0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr0 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr0)
.align 16
ASM_PFX(AsmReadDr0):
mov %dr0, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadDr0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr0 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr0)
.align 16
ASM_PFX(AsmReadDr0):
mov %dr0, %rax
ret

View File

@@ -1,36 +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:
#
# ReadDr1.S
#
# Abstract:
#
# AsmReadDr1 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr1 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr1)
.align 16
ASM_PFX(AsmReadDr1):
mov %dr1, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadDr1 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr1 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr1)
.align 16
ASM_PFX(AsmReadDr1):
mov %dr1, %rax
ret

View File

@@ -1,36 +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:
#
# ReadDr2.S
#
# Abstract:
#
# AsmReadDr2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr2 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr2)
.align 16
ASM_PFX(AsmReadDr2):
mov %dr2, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadDr2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr2 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr2)
.align 16
ASM_PFX(AsmReadDr2):
mov %dr2, %rax
ret

View File

@@ -1,36 +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:
#
# ReadDr3.S
#
# Abstract:
#
# AsmReadDr3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr3 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr3)
.align 16
ASM_PFX(AsmReadDr3):
mov %dr3, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadDr3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr3 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr3)
.align 16
ASM_PFX(AsmReadDr3):
mov %dr3, %rax
ret

View File

@@ -1,37 +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:
#
# ReadDr4.S
#
# Abstract:
#
# AsmReadDr4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr4 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr4)
.align 16
ASM_PFX(AsmReadDr4):
#DB 0fh, 21h, 0e0h
mov %dr4, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadDr4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr4 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr4)
.align 16
ASM_PFX(AsmReadDr4):
#DB 0fh, 21h, 0e0h
mov %dr4, %rax
ret

View File

@@ -1,36 +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:
#
# ReadDr5.S
#
# Abstract:
#
# AsmReadDr5 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr5 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr5)
.align 16
ASM_PFX(AsmReadDr5):
mov %dr5, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadDr5 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr5 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr5)
.align 16
ASM_PFX(AsmReadDr5):
mov %dr5, %rax
ret

View File

@@ -1,36 +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:
#
# ReadDr6.S
#
# Abstract:
#
# AsmReadDr6 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr6 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr6)
.align 16
ASM_PFX(AsmReadDr6):
mov %dr6, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadDr6 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr6 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr6)
.align 16
ASM_PFX(AsmReadDr6):
mov %dr6, %rax
ret

View File

@@ -1,36 +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:
#
# ReadDr7.S
#
# Abstract:
#
# AsmReadDr7 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr7 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr7)
.align 16
ASM_PFX(AsmReadDr7):
mov %dr7, %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadDr7 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadDr7 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr7)
.align 16
ASM_PFX(AsmReadDr7):
mov %dr7, %rax
ret

View File

@@ -1,36 +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:
#
# ReadDs.S
#
# Abstract:
#
# AsmReadDs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadDs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDs)
.align 16
ASM_PFX(AsmReadDs):
movl %ds, %eax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadDs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadDs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDs)
.align 16
ASM_PFX(AsmReadDs):
movl %ds, %eax
ret

View File

@@ -1,37 +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:
#
# ReadEflags.S
#
# Abstract:
#
# AsmReadEflags function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadEflags (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadEflags)
.align 16
ASM_PFX(AsmReadEflags):
pushfq
pop %rax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadEflags function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmReadEflags (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadEflags)
.align 16
ASM_PFX(AsmReadEflags):
pushfq
pop %rax
ret

View File

@@ -1,36 +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:
#
# ReadEs.S
#
# Abstract:
#
# AsmReadEs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadEs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadEs)
.align 16
ASM_PFX(AsmReadEs):
mov %es, %eax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadEs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadEs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadEs)
.align 16
ASM_PFX(AsmReadEs):
mov %es, %eax
ret

View File

@@ -1,36 +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:
#
# ReadFs.S
#
# Abstract:
#
# AsmReadFs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadFs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadFs)
.align 16
ASM_PFX(AsmReadFs):
mov %fs, %eax
ret
#------------------------------------------------------------------------------
#
# 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.S
#
# Abstract:
#
# AsmReadFs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadFs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadFs)
.align 16
ASM_PFX(AsmReadFs):
mov %fs, %eax
ret

View File

@@ -1,36 +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:
#
# ReadGdtr.S
#
# Abstract:
#
# AsmReadGdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86ReadGdtr (
# OUT IA32_DESCRIPTOR *Gdtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86ReadGdtr)
.align 16
ASM_PFX(InternalX86ReadGdtr):
sgdt (%rcx)
ret
#------------------------------------------------------------------------------
#
# 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:
#
# ReadGdtr.S
#
# Abstract:
#
# AsmReadGdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86ReadGdtr (
# OUT IA32_DESCRIPTOR *Gdtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86ReadGdtr)
.align 16
ASM_PFX(InternalX86ReadGdtr):
sgdt (%rcx)
ret

View File

@@ -1,36 +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:
#
# ReadGs.S
#
# Abstract:
#
# AsmReadGs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadGs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadGs)
.align 16
ASM_PFX(AsmReadGs):
mov %gs, %eax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# ReadGs.S
#
# Abstract:
#
# AsmReadGs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadGs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadGs)
.align 16
ASM_PFX(AsmReadGs):
mov %gs, %eax
ret

View File

@@ -1,36 +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:
#
# ReadIdtr.AS
#
# Abstract:
#
# AsmReadIdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86ReadIdtr (
# OUT IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86ReadIdtr)
.align 16
ASM_PFX(InternalX86ReadIdtr):
sidt (%rcx)
ret
#------------------------------------------------------------------------------
#
# 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:
#
# ReadIdtr.AS
#
# Abstract:
#
# AsmReadIdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86ReadIdtr (
# OUT IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86ReadIdtr)
.align 16
ASM_PFX(InternalX86ReadIdtr):
sidt (%rcx)
ret

View File

@@ -1,36 +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:
#
# ReadLdtr.AS
#
# Abstract:
#
# AsmReadLdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadLdtr (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadLdtr)
.align 16
ASM_PFX(AsmReadLdtr):
sldt %eax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# ReadLdtr.AS
#
# Abstract:
#
# AsmReadLdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadLdtr (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadLdtr)
.align 16
ASM_PFX(AsmReadLdtr):
sldt %eax
ret

View File

@@ -1,36 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm0.S
#
# Abstract:
#
# AsmReadMm0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm0 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm0)
.align 16
ASM_PFX(AsmReadMm0):
movd %mm0, %rax
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm0.S
#
# Abstract:
#
# AsmReadMm0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm0 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm0)
.align 16
ASM_PFX(AsmReadMm0):
movd %mm0, %rax
ret

View File

@@ -1,36 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm1.S
#
# Abstract:
#
# AsmReadMm1 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm1 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm1)
.align 16
ASM_PFX(AsmReadMm1):
movd %mm1, %rax
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm1.S
#
# Abstract:
#
# AsmReadMm1 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm1 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm1)
.align 16
ASM_PFX(AsmReadMm1):
movd %mm1, %rax
ret

View File

@@ -1,36 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm2.S
#
# Abstract:
#
# AsmReadMm2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm2 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm2)
.align 16
ASM_PFX(AsmReadMm2):
movd %mm2, %rax
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm2.S
#
# Abstract:
#
# AsmReadMm2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm2 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm2)
.align 16
ASM_PFX(AsmReadMm2):
movd %mm2, %rax
ret

View File

@@ -1,36 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm3.S
#
# Abstract:
#
# AsmReadMm3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm3 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm3)
.align 16
ASM_PFX(AsmReadMm3):
movd %mm3, %rax
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm3.S
#
# Abstract:
#
# AsmReadMm3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm3 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm3)
.align 16
ASM_PFX(AsmReadMm3):
movd %mm3, %rax
ret

View File

@@ -1,36 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm4.AS
#
# Abstract:
#
# AsmReadMm4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm4 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm4)
.align 16
ASM_PFX(AsmReadMm4):
movd %mm4, %rax
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm4.AS
#
# Abstract:
#
# AsmReadMm4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm4 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm4)
.align 16
ASM_PFX(AsmReadMm4):
movd %mm4, %rax
ret

View File

@@ -1,36 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm5.S
#
# Abstract:
#
# AsmReadMm5 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm5 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm5)
.align 16
ASM_PFX(AsmReadMm5):
movd %mm5, %rax
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm5.S
#
# Abstract:
#
# AsmReadMm5 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm5 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm5)
.align 16
ASM_PFX(AsmReadMm5):
movd %mm5, %rax
ret

View File

@@ -1,36 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm6.S
#
# Abstract:
#
# AsmReadMm6 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm6 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm6)
.align 16
ASM_PFX(AsmReadMm6):
movd %mm6, %rax
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm6.S
#
# Abstract:
#
# AsmReadMm6 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm6 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm6)
.align 16
ASM_PFX(AsmReadMm6):
movd %mm6, %rax
ret

View File

@@ -1,36 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm7.S
#
# Abstract:
#
# AsmReadMm7 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm7 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm7)
.align 16
ASM_PFX(AsmReadMm7):
movd %mm7, %rax
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# ReadMm7.S
#
# Abstract:
#
# AsmReadMm7 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMm7 (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm7)
.align 16
ASM_PFX(AsmReadMm7):
movd %mm7, %rax
ret

View File

@@ -1,38 +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:
#
# ReadMsr64.S
#
# Abstract:
#
# AsmReadMsr64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMsr64 (
# IN UINT32 Index
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMsr64)
.align 16
ASM_PFX(AsmReadMsr64):
rdmsr # edx & eax are zero extended
shl $0x20, %rdx
or %rdx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# ReadMsr64.S
#
# Abstract:
#
# AsmReadMsr64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadMsr64 (
# IN UINT32 Index
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMsr64)
.align 16
ASM_PFX(AsmReadMsr64):
rdmsr # edx & eax are zero extended
shl $0x20, %rdx
or %rdx, %rax
ret

View File

@@ -1,38 +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:
#
# ReadPmc.S
#
# Abstract:
#
# AsmReadPmc function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadPmc (
# IN UINT32 PmcIndex
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadPmc)
.align 16
ASM_PFX(AsmReadPmc):
rdpmc
shl $0x20, %rdx
or %rdx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# ReadPmc.S
#
# Abstract:
#
# AsmReadPmc function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadPmc (
# IN UINT32 PmcIndex
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadPmc)
.align 16
ASM_PFX(AsmReadPmc):
rdpmc
shl $0x20, %rdx
or %rdx, %rax
ret

View File

@@ -1,36 +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:
#
# ReadSs.S
#
# Abstract:
#
# AsmReadSs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadSs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadSs)
.align 16
ASM_PFX(AsmReadSs):
movl %ss, %eax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# ReadSs.S
#
# Abstract:
#
# AsmReadSs function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadSs (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadSs)
.align 16
ASM_PFX(AsmReadSs):
movl %ss, %eax
ret

View File

@@ -1,36 +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:
#
# ReadTr.S
#
# Abstract:
#
# AsmReadTr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadTr (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadTr)
.align 16
ASM_PFX(AsmReadTr):
str %eax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# ReadTr.S
#
# Abstract:
#
# AsmReadTr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT16
# EFIAPI
# AsmReadTr (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadTr)
.align 16
ASM_PFX(AsmReadTr):
str %eax
ret

View File

@@ -1,38 +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:
#
# ReadTsc.S
#
# Abstract:
#
# AsmReadTsc function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadTsc (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadTsc)
.align 16
ASM_PFX(AsmReadTsc):
rdtsc
shl $0x20, %rdx
or %rdx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# ReadTsc.S
#
# Abstract:
#
# AsmReadTsc function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmReadTsc (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadTsc)
.align 16
ASM_PFX(AsmReadTsc):
rdtsc
shl $0x20, %rdx
or %rdx, %rax
ret

View File

@@ -1,42 +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:
#
# SetJump.S
#
# Abstract:
#
# Implementation of SetJump() on x86_64
#
#------------------------------------------------------------------------------
.extern ASM_PFX(InternalAssertJumpBuffer)
.global ASM_PFX(SetJump)
ASM_PFX(SetJump):
push %rcx
add $0xffffffffffffffe0,%rsp
call ASM_PFX(InternalAssertJumpBuffer)
add $0x20,%rsp
pop %rcx
pop %rdx
mov %rbx,(%rcx)
mov %rsp,0x8(%rcx)
mov %rbp,0x10(%rcx)
mov %rdi,0x18(%rcx)
mov %rsi,0x20(%rcx)
mov %r12,0x28(%rcx)
mov %r13,0x30(%rcx)
mov %r14,0x38(%rcx)
mov %r15,0x40(%rcx)
mov %rdx,0x48(%rcx)
xor %rax,%rax
jmpq *%rdx
#------------------------------------------------------------------------------
#
# 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:
#
# SetJump.S
#
# Abstract:
#
# Implementation of SetJump() on x86_64
#
#------------------------------------------------------------------------------
.extern ASM_PFX(InternalAssertJumpBuffer)
.global ASM_PFX(SetJump)
ASM_PFX(SetJump):
push %rcx
add $0xffffffffffffffe0,%rsp
call ASM_PFX(InternalAssertJumpBuffer)
add $0x20,%rsp
pop %rcx
pop %rdx
mov %rbx,(%rcx)
mov %rsp,0x8(%rcx)
mov %rbp,0x10(%rcx)
mov %rdi,0x18(%rcx)
mov %rsi,0x20(%rcx)
mov %r12,0x28(%rcx)
mov %r13,0x30(%rcx)
mov %r14,0x38(%rcx)
mov %r15,0x40(%rcx)
mov %rdx,0x48(%rcx)
xor %rax,%rax
jmpq *%rdx

View File

@@ -1,48 +1,48 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# SwitchStack.S
#
# Abstract:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Routine Description:
#
# Routine for switching stacks with 2 parameters
#
# Arguments:
#
# (rcx) EntryPoint - Entry point with new stack.
# (rdx) Context1 - Parameter1 for entry point.
# (r8) Context2 - Parameter2 for entry point.
# (r9) NewStack - Pointer to new stack.
#
# Returns:
#
# None
#
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSwitchStack)
ASM_PFX(InternalSwitchStack):
mov %rcx, %rax
mov %rdx, %rcx
mov %r8, %rdx
#
# Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack,
# in case the callee wishes to spill them.
#
lea -0x20(%r9), %rsp
call *%rax
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# SwitchStack.S
#
# Abstract:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Routine Description:
#
# Routine for switching stacks with 2 parameters
#
# Arguments:
#
# (rcx) EntryPoint - Entry point with new stack.
# (rdx) Context1 - Parameter1 for entry point.
# (r8) Context2 - Parameter2 for entry point.
# (r9) NewStack - Pointer to new stack.
#
# Returns:
#
# None
#
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSwitchStack)
ASM_PFX(InternalSwitchStack):
mov %rcx, %rax
mov %rdx, %rcx
mov %r8, %rdx
#
# Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack,
# in case the callee wishes to spill them.
#
lea -0x20(%r9), %rsp
call *%rax

View File

@@ -1,298 +1,298 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# Thunk16.S
#
# Abstract:
#
# Real mode thunk
#
#------------------------------------------------------------------------------
#include <Library/BaseLib.h>
.globl ASM_PFX(m16Start)
.globl ASM_PFX(m16Size)
.globl ASM_PFX(mThunk16Attr)
.globl ASM_PFX(m16Gdt)
.globl ASM_PFX(m16GdtrBase)
.globl ASM_PFX(mTransition)
.globl ASM_PFX(InternalAsmThunk16)
# define the structure of IA32_REGS
.equ _EDI, 0 #size 4
.equ _ESI, 4 #size 4
.equ _EBP, 8 #size 4
.equ _ESP, 12 #size 4
.equ _EBX, 16 #size 4
.equ _EDX, 20 #size 4
.equ _ECX, 24 #size 4
.equ _EAX, 28 #size 4
.equ _DS, 32 #size 2
.equ _ES, 34 #size 2
.equ _FS, 36 #size 2
.equ _GS, 38 #size 2
.equ _EFLAGS, 40 #size 8
.equ _EIP, 48 #size 4
.equ _CS, 52 #size 2
.equ _SS, 54 #size 2
.equ IA32_REGS_SIZE, 56
.data
ASM_PFX(m16Size): .word ASM_PFX(InternalAsmThunk16) - ASM_PFX(m16Start)
ASM_PFX(mThunk16Attr): .word _ThunkAttr - ASM_PFX(m16Start)
ASM_PFX(m16Gdt): .word _NullSeg - ASM_PFX(m16Start)
ASM_PFX(m16GdtrBase): .word _16GdtrBase - ASM_PFX(m16Start)
ASM_PFX(mTransition): .word _EntryPoint - ASM_PFX(m16Start)
.text
ASM_PFX(m16Start):
SavedGdt: .space 10
#------------------------------------------------------------------------------
# _BackFromUserCode() takes control in real mode after 'retf' has been executed
# by user code. It will be shadowed to somewhere in memory below 1MB.
#------------------------------------------------------------------------------
.globl ASM_PFX(BackFromUserCode)
ASM_PFX(BackFromUserCode):
#
# The order of saved registers on the stack matches the order they appears
# in IA32_REGS structure. This facilitates wrapper function to extract them
# into that structure.
#
# Some instructions for manipulation of segment registers have to be written
# in opcode since 64-bit MASM prevents accesses to those registers.
#
.byte 0x16 # push ss
.byte 0xe # push cs
.byte 0x66
call L_Base # push eip
L_Base:
.byte 0x66
pushq $0 # reserved high order 32 bits of EFlags
.byte 0x66, 0x9c # pushfd actually
cli # disable interrupts
push %gs
push %fs
.byte 6 # push es
.byte 0x1e # push ds
.byte 0x66,0x60 # pushad
.byte 0x66,0xba # mov edx, imm32
_ThunkAttr: .space 4
testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15, %dl
jz L_1
movl $0x15cd2401,%eax # mov ax, 2401h & int 15h
cli # disable interrupts
jnc L_2
L_1:
testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL, %dl
jz L_2
inb $0x92,%al
orb $2,%al
outb %al, $0x92 # deactivate A20M#
L_2:
movl %ss,%eax
lea IA32_REGS_SIZE(%esp), %bp
#
# rsi in the following 2 instructions is indeed bp in 16-bit code
#
movw %bp, (_ESP - IA32_REGS_SIZE)(%rsi)
.byte 0x66
movl (_EIP - IA32_REGS_SIZE)(%rsi), %ebx
shlw $4,%ax # shl eax, 4
addw %ax,%bp # add ebp, eax
movw %cs,%ax
shlw $4,%ax
lea (L_64BitCode - L_Base)(%ebx, %eax), %ax
.byte 0x66,0x2e,0x89,0x87 # mov cs:[bx + (L_64Eip - L_Base)], eax
.word L_64Eip - L_Base
.byte 0x66,0xb8 # mov eax, imm32
SavedCr4: .space 4
movq %rax, %cr4
#
# rdi in the instruction below is indeed bx in 16-bit code
#
.byte 0x66,0x2e # 2eh is "cs:" segment override
lgdt (SavedGdt - L_Base)(%rdi)
.byte 0x66
movl $0xc0000080,%ecx
rdmsr
orb $1,%ah
wrmsr
.byte 0x66,0xb8 # mov eax, imm32
SavedCr0: .space 4
movq %rax, %cr0
.byte 0x66,0xea # jmp far cs:L_64Bit
L_64Eip: .space 4
SavedCs: .space 2
L_64BitCode:
movq %r8, %rsp
ret
_EntryPoint: .long ASM_PFX(ToUserCode) - ASM_PFX(m16Start)
.word CODE16
_16Gdtr: .word GDT_SIZE - 1
_16GdtrBase: .quad _NullSeg
_16Idtr: .word 0x3ff
.long 0
#------------------------------------------------------------------------------
# _ToUserCode() takes control in real mode before passing control to user code.
# It will be shadowed to somewhere in memory below 1MB.
#------------------------------------------------------------------------------
.globl ASM_PFX(ToUserCode)
ASM_PFX(ToUserCode):
movl %edx,%ss # set new segment selectors
movl %edx,%ds
movl %edx,%es
movl %edx,%fs
movl %edx,%gs
.byte 0x66
movl $0xc0000080,%ecx
movq %rax, %cr0
rdmsr
andb $0b11111110, %ah
wrmsr
movq %rbp, %cr4
movl %esi,%ss # set up 16-bit stack segment
movw %bx,%sp # set up 16-bit stack pointer
.byte 0x66 # make the following call 32-bit
call L_Base1 # push eip
L_Base1:
popw %bp # ebp <- address of L_Base1
pushq (IA32_REGS_SIZE + 2)(%esp)
lea 0x0c(%rsi), %eax
pushq %rax
lret # execution begins at next instruction
L_RealMode:
.byte 0x66,0x2e # CS and operand size override
lidt (_16Idtr - L_Base1)(%rsi)
.byte 0x66,0x61 # popad
.byte 0x1f # pop ds
.byte 0x7 # pop es
.byte 0x0f, 0xa1 # pop fs
.byte 0x0f, 0xa9 # pop gs
.byte 0x66, 0x9d # popfd
leaw 4(%esp),%sp # skip high order 32 bits of EFlags
.byte 0x66 # make the following retf 32-bit
lret # transfer control to user code
.equ CODE16, ASM_PFX(16Code) - .
.equ DATA16, ASM_PFX(16Data) - .
.equ DATA32, ASM_PFX(32Data) - .
_NullSeg: .quad 0
ASM_PFX(16Code):
.word -1
.word 0
.byte 0
.byte 0x9b
.byte 0x8f # 16-bit segment, 4GB limit
.byte 0
ASM_PFX(16Data):
.word -1
.word 0
.byte 0
.byte 0x93
.byte 0x8f # 16-bit segment, 4GB limit
.byte 0
ASM_PFX(32Data):
.word -1
.word 0
.byte 0
.byte 0x93
.byte 0xcf # 16-bit segment, 4GB limit
.byte 0
.equ GDT_SIZE, . - ASM_PFX(NullSeg)
#------------------------------------------------------------------------------
# IA32_REGISTER_SET *
# EFIAPI
# InternalAsmThunk16 (
# IN IA32_REGISTER_SET *RegisterSet,
# IN OUT VOID *Transition
# );
#------------------------------------------------------------------------------
# MISMATCH: "InternalAsmThunk16 PROC USES rbp rbx rsi rdi"
.globl ASM_PFX(InternalAsmThunk16)
ASM_PFX(InternalAsmThunk16):
pushq %rbp
pushq %rbx
pushq %rsi
pushq %rdi
movl %ds, %r10d # r9 ~ r11 are not accessible in 16-bit
movl %es, %r11d # so use them for saving seg registers
movl %ss, %r9d
.byte 0x0f, 0xa0 #push fs
.byte 0x0f, 0xa8 #push gs
movq %rcx, %rsi
movzwl _SS(%rsi), %r8d
movl _ESP(%rsi), %edi
lea -(IA32_REGS_SIZE + 4)(%edi), %rdi
imul $16, %r8d, %eax
movl %edi,%ebx # ebx <- stack for 16-bit code
pushq $(IA32_REGS_SIZE / 4)
addl %eax,%edi # edi <- linear address of 16-bit stack
popq %rcx
rep
movsl # copy RegSet
lea (SavedCr4 - ASM_PFX(m16Start))(%rdx), %ecx
movl %edx,%eax # eax <- transition code address
andl $0xf,%edx
shll $12,%eax # segment address in high order 16 bits
lea (_BackFromUserCode - ASM_PFX(m16Start))(%rdx), %ax
stosl # [edi] <- return address of user code
sgdt (SavedGdt - SavedCr4)(%rcx)
sidt 0x38(%rsp)
movq %cr0, %rax
movl %eax, (SavedCr0 - SavedCr4)(%rcx)
andl $0x7ffffffe,%eax # clear PE, PG bits
movq %cr4, %rbp
movl %ebp, (%rcx) # save CR4 in SavedCr4
andl $0x300,%ebp # clear all but PCE and OSFXSR bits
movl %r8d, %esi # esi <- 16-bit stack segment
.byte 0x6a, DATA32
popq %rdx
lgdt (_16Gdtr - SavedCr4)(%rcx)
movl %edx,%ss
pushfq
lea -8(%rdx), %edx
lea L_RetFromRealMode, %r8
pushq %r8
movl %cs, %r8d
movw %r8w, (SavedCs - SavedCr4)(%rcx)
movq %rsp, %r8
.byte 0xff, 0x69 # jmp (_EntryPoint - SavedCr4)(%rcx)
.byte _EntryPoint - SavedCr4
L_RetFromRealMode:
popfq
lidt 0x38(%rsp)
lea -IA32_REGS_SIZE(%rbp), %eax
.byte 0x0f, 0xa9 # pop gs
.byte 0x0f, 0xa1 # pop fs
movl %r9d, %ss
movl %r11d, %es
movl %r10d, %ds
popq %rdi
popq %rsi
popq %rbx
popq %rbp
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# Thunk16.S
#
# Abstract:
#
# Real mode thunk
#
#------------------------------------------------------------------------------
#include <Library/BaseLib.h>
.globl ASM_PFX(m16Start)
.globl ASM_PFX(m16Size)
.globl ASM_PFX(mThunk16Attr)
.globl ASM_PFX(m16Gdt)
.globl ASM_PFX(m16GdtrBase)
.globl ASM_PFX(mTransition)
.globl ASM_PFX(InternalAsmThunk16)
# define the structure of IA32_REGS
.equ _EDI, 0 #size 4
.equ _ESI, 4 #size 4
.equ _EBP, 8 #size 4
.equ _ESP, 12 #size 4
.equ _EBX, 16 #size 4
.equ _EDX, 20 #size 4
.equ _ECX, 24 #size 4
.equ _EAX, 28 #size 4
.equ _DS, 32 #size 2
.equ _ES, 34 #size 2
.equ _FS, 36 #size 2
.equ _GS, 38 #size 2
.equ _EFLAGS, 40 #size 8
.equ _EIP, 48 #size 4
.equ _CS, 52 #size 2
.equ _SS, 54 #size 2
.equ IA32_REGS_SIZE, 56
.data
ASM_PFX(m16Size): .word ASM_PFX(InternalAsmThunk16) - ASM_PFX(m16Start)
ASM_PFX(mThunk16Attr): .word _ThunkAttr - ASM_PFX(m16Start)
ASM_PFX(m16Gdt): .word _NullSeg - ASM_PFX(m16Start)
ASM_PFX(m16GdtrBase): .word _16GdtrBase - ASM_PFX(m16Start)
ASM_PFX(mTransition): .word _EntryPoint - ASM_PFX(m16Start)
.text
ASM_PFX(m16Start):
SavedGdt: .space 10
#------------------------------------------------------------------------------
# _BackFromUserCode() takes control in real mode after 'retf' has been executed
# by user code. It will be shadowed to somewhere in memory below 1MB.
#------------------------------------------------------------------------------
.globl ASM_PFX(BackFromUserCode)
ASM_PFX(BackFromUserCode):
#
# The order of saved registers on the stack matches the order they appears
# in IA32_REGS structure. This facilitates wrapper function to extract them
# into that structure.
#
# Some instructions for manipulation of segment registers have to be written
# in opcode since 64-bit MASM prevents accesses to those registers.
#
.byte 0x16 # push ss
.byte 0xe # push cs
.byte 0x66
call L_Base # push eip
L_Base:
.byte 0x66
pushq $0 # reserved high order 32 bits of EFlags
.byte 0x66, 0x9c # pushfd actually
cli # disable interrupts
push %gs
push %fs
.byte 6 # push es
.byte 0x1e # push ds
.byte 0x66,0x60 # pushad
.byte 0x66,0xba # mov edx, imm32
_ThunkAttr: .space 4
testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15, %dl
jz L_1
movl $0x15cd2401,%eax # mov ax, 2401h & int 15h
cli # disable interrupts
jnc L_2
L_1:
testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL, %dl
jz L_2
inb $0x92,%al
orb $2,%al
outb %al, $0x92 # deactivate A20M#
L_2:
movl %ss,%eax
lea IA32_REGS_SIZE(%esp), %bp
#
# rsi in the following 2 instructions is indeed bp in 16-bit code
#
movw %bp, (_ESP - IA32_REGS_SIZE)(%rsi)
.byte 0x66
movl (_EIP - IA32_REGS_SIZE)(%rsi), %ebx
shlw $4,%ax # shl eax, 4
addw %ax,%bp # add ebp, eax
movw %cs,%ax
shlw $4,%ax
lea (L_64BitCode - L_Base)(%ebx, %eax), %ax
.byte 0x66,0x2e,0x89,0x87 # mov cs:[bx + (L_64Eip - L_Base)], eax
.word L_64Eip - L_Base
.byte 0x66,0xb8 # mov eax, imm32
SavedCr4: .space 4
movq %rax, %cr4
#
# rdi in the instruction below is indeed bx in 16-bit code
#
.byte 0x66,0x2e # 2eh is "cs:" segment override
lgdt (SavedGdt - L_Base)(%rdi)
.byte 0x66
movl $0xc0000080,%ecx
rdmsr
orb $1,%ah
wrmsr
.byte 0x66,0xb8 # mov eax, imm32
SavedCr0: .space 4
movq %rax, %cr0
.byte 0x66,0xea # jmp far cs:L_64Bit
L_64Eip: .space 4
SavedCs: .space 2
L_64BitCode:
movq %r8, %rsp
ret
_EntryPoint: .long ASM_PFX(ToUserCode) - ASM_PFX(m16Start)
.word CODE16
_16Gdtr: .word GDT_SIZE - 1
_16GdtrBase: .quad _NullSeg
_16Idtr: .word 0x3ff
.long 0
#------------------------------------------------------------------------------
# _ToUserCode() takes control in real mode before passing control to user code.
# It will be shadowed to somewhere in memory below 1MB.
#------------------------------------------------------------------------------
.globl ASM_PFX(ToUserCode)
ASM_PFX(ToUserCode):
movl %edx,%ss # set new segment selectors
movl %edx,%ds
movl %edx,%es
movl %edx,%fs
movl %edx,%gs
.byte 0x66
movl $0xc0000080,%ecx
movq %rax, %cr0
rdmsr
andb $0b11111110, %ah
wrmsr
movq %rbp, %cr4
movl %esi,%ss # set up 16-bit stack segment
movw %bx,%sp # set up 16-bit stack pointer
.byte 0x66 # make the following call 32-bit
call L_Base1 # push eip
L_Base1:
popw %bp # ebp <- address of L_Base1
pushq (IA32_REGS_SIZE + 2)(%esp)
lea 0x0c(%rsi), %eax
pushq %rax
lret # execution begins at next instruction
L_RealMode:
.byte 0x66,0x2e # CS and operand size override
lidt (_16Idtr - L_Base1)(%rsi)
.byte 0x66,0x61 # popad
.byte 0x1f # pop ds
.byte 0x7 # pop es
.byte 0x0f, 0xa1 # pop fs
.byte 0x0f, 0xa9 # pop gs
.byte 0x66, 0x9d # popfd
leaw 4(%esp),%sp # skip high order 32 bits of EFlags
.byte 0x66 # make the following retf 32-bit
lret # transfer control to user code
.equ CODE16, ASM_PFX(16Code) - .
.equ DATA16, ASM_PFX(16Data) - .
.equ DATA32, ASM_PFX(32Data) - .
_NullSeg: .quad 0
ASM_PFX(16Code):
.word -1
.word 0
.byte 0
.byte 0x9b
.byte 0x8f # 16-bit segment, 4GB limit
.byte 0
ASM_PFX(16Data):
.word -1
.word 0
.byte 0
.byte 0x93
.byte 0x8f # 16-bit segment, 4GB limit
.byte 0
ASM_PFX(32Data):
.word -1
.word 0
.byte 0
.byte 0x93
.byte 0xcf # 16-bit segment, 4GB limit
.byte 0
.equ GDT_SIZE, . - ASM_PFX(NullSeg)
#------------------------------------------------------------------------------
# IA32_REGISTER_SET *
# EFIAPI
# InternalAsmThunk16 (
# IN IA32_REGISTER_SET *RegisterSet,
# IN OUT VOID *Transition
# );
#------------------------------------------------------------------------------
# MISMATCH: "InternalAsmThunk16 PROC USES rbp rbx rsi rdi"
.globl ASM_PFX(InternalAsmThunk16)
ASM_PFX(InternalAsmThunk16):
pushq %rbp
pushq %rbx
pushq %rsi
pushq %rdi
movl %ds, %r10d # r9 ~ r11 are not accessible in 16-bit
movl %es, %r11d # so use them for saving seg registers
movl %ss, %r9d
.byte 0x0f, 0xa0 #push fs
.byte 0x0f, 0xa8 #push gs
movq %rcx, %rsi
movzwl _SS(%rsi), %r8d
movl _ESP(%rsi), %edi
lea -(IA32_REGS_SIZE + 4)(%edi), %rdi
imul $16, %r8d, %eax
movl %edi,%ebx # ebx <- stack for 16-bit code
pushq $(IA32_REGS_SIZE / 4)
addl %eax,%edi # edi <- linear address of 16-bit stack
popq %rcx
rep
movsl # copy RegSet
lea (SavedCr4 - ASM_PFX(m16Start))(%rdx), %ecx
movl %edx,%eax # eax <- transition code address
andl $0xf,%edx
shll $12,%eax # segment address in high order 16 bits
lea (_BackFromUserCode - ASM_PFX(m16Start))(%rdx), %ax
stosl # [edi] <- return address of user code
sgdt (SavedGdt - SavedCr4)(%rcx)
sidt 0x38(%rsp)
movq %cr0, %rax
movl %eax, (SavedCr0 - SavedCr4)(%rcx)
andl $0x7ffffffe,%eax # clear PE, PG bits
movq %cr4, %rbp
movl %ebp, (%rcx) # save CR4 in SavedCr4
andl $0x300,%ebp # clear all but PCE and OSFXSR bits
movl %r8d, %esi # esi <- 16-bit stack segment
.byte 0x6a, DATA32
popq %rdx
lgdt (_16Gdtr - SavedCr4)(%rcx)
movl %edx,%ss
pushfq
lea -8(%rdx), %edx
lea L_RetFromRealMode, %r8
pushq %r8
movl %cs, %r8d
movw %r8w, (SavedCs - SavedCr4)(%rcx)
movq %rsp, %r8
.byte 0xff, 0x69 # jmp (_EntryPoint - SavedCr4)(%rcx)
.byte _EntryPoint - SavedCr4
L_RetFromRealMode:
popfq
lidt 0x38(%rsp)
lea -IA32_REGS_SIZE(%rbp), %eax
.byte 0x0f, 0xa9 # pop gs
.byte 0x0f, 0xa1 # pop fs
movl %r9d, %ss
movl %r11d, %es
movl %r10d, %ds
popq %rdi
popq %rsi
popq %rbx
popq %rbp
ret

View File

@@ -1,36 +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:
#
# Wbinvd.S
#
# Abstract:
#
# AsmWbinvd function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWbinvd (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWbinvd)
.align 16
ASM_PFX(AsmWbinvd):
wbinvd
ret
#------------------------------------------------------------------------------
#
# 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:
#
# Wbinvd.S
#
# Abstract:
#
# AsmWbinvd function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWbinvd (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWbinvd)
.align 16
ASM_PFX(AsmWbinvd):
wbinvd
ret

View File

@@ -1,36 +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:
#
# WriteCr0.S
#
# Abstract:
#
# AsmWriteCr0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr0 (
# UINTN Cr0
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteCr0)
ASM_PFX(AsmWriteCr0):
mov %rcx,%cr0
mov %rcx,%rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteCr0.S
#
# Abstract:
#
# AsmWriteCr0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr0 (
# UINTN Cr0
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteCr0)
ASM_PFX(AsmWriteCr0):
mov %rcx,%cr0
mov %rcx,%rax
ret

View File

@@ -1,36 +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:
#
# WriteCr2.S
#
# Abstract:
#
# AsmWriteCr2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr2 (
# UINTN Cr2
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteCr2)
ASM_PFX(AsmWriteCr2):
mov %rcx,%cr2
mov %rcx,%rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteCr2.S
#
# Abstract:
#
# AsmWriteCr2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr2 (
# UINTN Cr2
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteCr2)
ASM_PFX(AsmWriteCr2):
mov %rcx,%cr2
mov %rcx,%rax
ret

View File

@@ -1,36 +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:
#
# WriteCr3.S
#
# Abstract:
#
# AsmWriteCr3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr3 (
# UINTN Cr3
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteCr3)
ASM_PFX(AsmWriteCr3):
mov %rcx,%cr3
mov %rcx,%rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteCr3.S
#
# Abstract:
#
# AsmWriteCr3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr3 (
# UINTN Cr3
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteCr3)
ASM_PFX(AsmWriteCr3):
mov %rcx,%cr3
mov %rcx,%rax
ret

View File

@@ -1,36 +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:
#
# WriteCr4.S
#
# Abstract:
#
# AsmWriteCr4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr4 (
# UINTN Cr4
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteCr4)
ASM_PFX(AsmWriteCr4):
mov %rcx,%cr4
mov %rcx,%rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteCr4.S
#
# Abstract:
#
# AsmWriteCr4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr4 (
# UINTN Cr4
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteCr4)
ASM_PFX(AsmWriteCr4):
mov %rcx,%cr4
mov %rcx,%rax
ret

View File

@@ -1,37 +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:
#
# WriteDr0.S
#
# Abstract:
#
# AsmWriteDr0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr0 (
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr0)
.align 16
ASM_PFX(AsmWriteDr0):
mov %rcx, %dr0
mov %rcx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteDr0.S
#
# Abstract:
#
# AsmWriteDr0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr0 (
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr0)
.align 16
ASM_PFX(AsmWriteDr0):
mov %rcx, %dr0
mov %rcx, %rax
ret

View File

@@ -1,37 +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:
#
# WriteDr1.S
#
# Abstract:
#
# AsmWriteDr1 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr1 (
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr1)
.align 16
ASM_PFX(AsmWriteDr1):
mov %rcx, %dr1
mov %rcx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteDr1.S
#
# Abstract:
#
# AsmWriteDr1 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr1 (
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr1)
.align 16
ASM_PFX(AsmWriteDr1):
mov %rcx, %dr1
mov %rcx, %rax
ret

View File

@@ -1,37 +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:
#
# WriteDr2.S
#
# Abstract:
#
# AsmWriteDr2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr2 (
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr2)
.align 16
ASM_PFX(AsmWriteDr2):
mov %rcx, %dr2
mov %rcx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteDr2.S
#
# Abstract:
#
# AsmWriteDr2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr2 (
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr2)
.align 16
ASM_PFX(AsmWriteDr2):
mov %rcx, %dr2
mov %rcx, %rax
ret

View File

@@ -1,37 +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:
#
# WriteDr3.S
#
# Abstract:
#
# AsmWriteDr3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr3 (
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr3)
.align 16
ASM_PFX(AsmWriteDr3):
mov %rcx, %dr3
mov %rcx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteDr3.S
#
# Abstract:
#
# AsmWriteDr3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr3 (
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr3)
.align 16
ASM_PFX(AsmWriteDr3):
mov %rcx, %dr3
mov %rcx, %rax
ret

View File

@@ -1,36 +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:
#
# WriteDr4.S
#
# Abstract:
#
# AsmWriteDr4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr4 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr4)
ASM_PFX(AsmWriteDr4):
mov %rcx, %dr4
mov %rcx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteDr4.S
#
# Abstract:
#
# AsmWriteDr4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr4 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr4)
ASM_PFX(AsmWriteDr4):
mov %rcx, %dr4
mov %rcx, %rax
ret

View File

@@ -1,36 +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:
#
# WriteDr5.S
#
# Abstract:
#
# AsmWriteDr5 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr5 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr5)
ASM_PFX(AsmWriteDr5):
mov %rcx, %dr5
mov %rcx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteDr5.S
#
# Abstract:
#
# AsmWriteDr5 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr5 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr5)
ASM_PFX(AsmWriteDr5):
mov %rcx, %dr5
mov %rcx, %rax
ret

View File

@@ -1,36 +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:
#
# WriteDr6.S
#
# Abstract:
#
# AsmWriteDr6 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr6 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr6)
ASM_PFX(AsmWriteDr6):
mov %rcx, %dr6
mov %rcx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteDr6.S
#
# Abstract:
#
# AsmWriteDr6 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr6 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr6)
ASM_PFX(AsmWriteDr6):
mov %rcx, %dr6
mov %rcx, %rax
ret

View File

@@ -1,36 +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:
#
# WriteDr7.S
#
# Abstract:
#
# AsmWriteDr7 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr7 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr7)
ASM_PFX(AsmWriteDr7):
mov %rcx, %dr7
mov %rcx, %rax
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteDr7.S
#
# Abstract:
#
# AsmWriteDr7 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr7 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr7)
ASM_PFX(AsmWriteDr7):
mov %rcx, %dr7
mov %rcx, %rax
ret

View File

@@ -1,35 +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:
#
# WriteGdtr.S
#
# Abstract:
#
# AsmWriteGdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86WriteGdtr (
# IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86WriteGdtr)
ASM_PFX(InternalX86WriteGdtr):
lgdt (%rcx)
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteGdtr.S
#
# Abstract:
#
# AsmWriteGdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86WriteGdtr (
# IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86WriteGdtr)
ASM_PFX(InternalX86WriteGdtr):
lgdt (%rcx)
ret

View File

@@ -1,36 +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:
#
# WriteIdtr.S
#
# Abstract:
#
# AsmWriteIdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86WriteIdtr (
# IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86WriteIdtr)
.align 16
ASM_PFX(InternalX86WriteIdtr):
lidt (%rcx)
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteIdtr.S
#
# Abstract:
#
# AsmWriteIdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86WriteIdtr (
# IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86WriteIdtr)
.align 16
ASM_PFX(InternalX86WriteIdtr):
lidt (%rcx)
ret

View File

@@ -1,36 +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:
#
# WriteLdtr.S
#
# Abstract:
#
# AsmWriteLdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteLdtr (
# IN UINT16 Ldtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteLdtr)
.align 16
ASM_PFX(AsmWriteLdtr):
lldt %cx
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteLdtr.S
#
# Abstract:
#
# AsmWriteLdtr function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteLdtr (
# IN UINT16 Ldtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteLdtr)
.align 16
ASM_PFX(AsmWriteLdtr):
lldt %cx
ret

View File

@@ -1,35 +1,35 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# WriteMm0.S
#
# Abstract:
#
# AsmWriteMm0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm0 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm0)
ASM_PFX(AsmWriteMm0):
movd %rcx, %mm0
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# WriteMm0.S
#
# Abstract:
#
# AsmWriteMm0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm0 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm0)
ASM_PFX(AsmWriteMm0):
movd %rcx, %mm0
ret

View File

@@ -1,35 +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:
#
# WriteMm1.S
#
# Abstract:
#
# AsmWriteMm1 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm1 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm1)
ASM_PFX(AsmWriteMm1):
movd %rcx, %mm1
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteMm1.S
#
# Abstract:
#
# AsmWriteMm1 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm1 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm1)
ASM_PFX(AsmWriteMm1):
movd %rcx, %mm1
ret

View File

@@ -1,35 +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:
#
# WriteMm2.S
#
# Abstract:
#
# AsmWriteMm2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm2 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm2)
ASM_PFX(AsmWriteMm2):
movd %rcx, %mm2
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteMm2.S
#
# Abstract:
#
# AsmWriteMm2 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm2 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm2)
ASM_PFX(AsmWriteMm2):
movd %rcx, %mm2
ret

View File

@@ -1,35 +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:
#
# WriteMm3.S
#
# Abstract:
#
# AsmWriteMm3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm3 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm3)
ASM_PFX(AsmWriteMm3):
movd %rcx, %mm3
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteMm3.S
#
# Abstract:
#
# AsmWriteMm3 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm3 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm3)
ASM_PFX(AsmWriteMm3):
movd %rcx, %mm3
ret

View File

@@ -1,35 +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:
#
# WriteMm4.S
#
# Abstract:
#
# AsmWriteMm4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm4 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm4)
ASM_PFX(AsmWriteMm4):
movd %rcx, %mm4
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteMm4.S
#
# Abstract:
#
# AsmWriteMm4 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm4 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm4)
ASM_PFX(AsmWriteMm4):
movd %rcx, %mm4
ret

View File

@@ -1,35 +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:
#
# WriteMm5.S
#
# Abstract:
#
# AsmWriteMm5 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm5 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm5)
ASM_PFX(AsmWriteMm5):
movd %rcx, %mm5
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteMm5.S
#
# Abstract:
#
# AsmWriteMm5 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm5 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm5)
ASM_PFX(AsmWriteMm5):
movd %rcx, %mm5
ret

View File

@@ -1,35 +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:
#
# WriteMm6.S
#
# Abstract:
#
# AsmWriteMm6 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm6 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm6)
ASM_PFX(AsmWriteMm6):
movd %rcx, %mm6
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteMm6.S
#
# Abstract:
#
# AsmWriteMm6 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm6 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm6)
ASM_PFX(AsmWriteMm6):
movd %rcx, %mm6
ret

View File

@@ -1,35 +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:
#
# WriteMm7.S
#
# Abstract:
#
# AsmWriteMm7 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm7 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm7)
ASM_PFX(AsmWriteMm7):
movd %rcx, %mm7
ret
#------------------------------------------------------------------------------
#
# 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:
#
# WriteMm7.S
#
# Abstract:
#
# AsmWriteMm7 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm7 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm7)
ASM_PFX(AsmWriteMm7):
movd %rcx, %mm7
ret

View File

@@ -1,39 +1,39 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# WriteMsr64.S
#
# Abstract:
#
# AsmWriteMsr64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmWriteMsr64 (
# IN UINT32 Index,
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMsr64)
.align 16
ASM_PFX(AsmWriteMsr64):
mov %rdx, %rax # meanwhile, rax <- return value
shr $0x20, %rdx # edx:eax contains the value to write
wrmsr
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, 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:
#
# WriteMsr64.S
#
# Abstract:
#
# AsmWriteMsr64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmWriteMsr64 (
# IN UINT32 Index,
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMsr64)
.align 16
ASM_PFX(AsmWriteMsr64):
mov %rdx, %rax # meanwhile, rax <- return value
shr $0x20, %rdx # edx:eax contains the value to write
wrmsr
ret