Fixed issues compiling for Apple gcc on IA-32

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9310 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
AJFISH
2009-09-24 21:48:45 +00:00
parent fbf926add9
commit e8de46808a
99 changed files with 2216 additions and 2186 deletions

View File

@@ -1,26 +1,26 @@
#------------------------------------------------------------------------------
#
# 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
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
.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
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
.globl ASM_PFX(CpuBreakpoint)
ASM_PFX(CpuBreakpoint):
int $0x3
ret

View File

@@ -1,62 +1,62 @@
#------------------------------------------------------------------------------
#
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmCpuid (
# IN UINT32 RegisterInEax,
# OUT UINT32 *RegisterOutEax OPTIONAL,
# OUT UINT32 *RegisterOutEbx OPTIONAL,
# OUT UINT32 *RegisterOutEcx OPTIONAL,
# OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
.globl 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,63 +1,63 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# CpuIdEx.Asm
#
# Abstract:
#
# AsmCpuidEx function
#
# Notes:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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
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
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:
#
# CpuIdEx.Asm
#
# Abstract:
#
# AsmCpuidEx function
#
# Notes:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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
# )
#------------------------------------------------------------------------------
.globl ASM_PFX(AsmCpuidEx)
ASM_PFX(AsmCpuidEx):
push %rbx
movl %ecx,%eax
movl %edx,%ecx
push %rax
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
pop %rbx
ret

View File

@@ -28,7 +28,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(CpuPause)
.globl ASM_PFX(CpuPause)
ASM_PFX(CpuPause):
pause
ret

View File

@@ -28,7 +28,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(CpuSleep)
.globl ASM_PFX(CpuSleep)
ASM_PFX(CpuSleep):
hlt
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(DisableInterrupts)
.globl ASM_PFX(DisableInterrupts)
ASM_PFX(DisableInterrupts):
cli
ret

View File

@@ -1,66 +1,66 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# DisablePaging64.S
#
# Abstract:
#
# AsmDisablePaging64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86DisablePaging64 (
# IN UINT16 Cs, %rdi
# IN UINT64 EntryPoint, %rsi
# IN UINT64 Context1, OPTIONAL %rdx
# IN UINT32 Context2, OPTIONAL %rcx
# IN UINT64 NewStack %r8
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86DisablePaging64)
ASM_PFX(InternalX86DisablePaging64):
cli
shl $0x20,%rcx
lea (%rip), %eax
mov %eax,%ecx
push %rcx
mov %edx,%ebx
mov %r8d,%esi
mov %r9d,%edi
mov 0x28(%rsp),%eax
lret
L1:
mov %eax,%esp
mov %cr0,%rax
btr $0x1f,%eax
mov %rax,%cr0
mov $0xc0000080,%ecx
rdmsr
and $0xfe,%ah
wrmsr
mov %cr4,%rax
and $0xdf,%al
mov %rax,%cr4
push %rdi
push %rsi
callq *%rbx
jmp .
#------------------------------------------------------------------------------
#
# 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:
#
# DisablePaging64.S
#
# Abstract:
#
# AsmDisablePaging64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86DisablePaging64 (
# IN UINT16 Cs, %rdi
# IN UINT64 EntryPoint, %rsi
# IN UINT64 Context1, OPTIONAL %rdx
# IN UINT32 Context2, OPTIONAL %rcx
# IN UINT64 NewStack %r8
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalX86DisablePaging64)
ASM_PFX(InternalX86DisablePaging64):
cli
shl $0x20,%rcx
lea (%rip), %eax
mov %eax,%ecx
push %rcx
mov %edx,%ebx
mov %r8d,%esi
mov %r9d,%edi
mov 0x28(%rsp),%eax
lret
L1:
mov %eax,%esp
mov %cr0,%rax
btr $0x1f,%eax
mov %rax,%cr0
mov $0xc0000080,%ecx
rdmsr
and $0xfe,%ah
wrmsr
mov %cr4,%rax
and $0xdf,%al
mov %rax,%cr4
push %rdi
push %rsi
callq *%rbx
jmp .

View File

@@ -1,36 +1,36 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# EnableDisableInterrupts (
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(EnableDisableInterrupts)
ASM_PFX(EnableDisableInterrupts):
sti
cli
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# EnableDisableInterrupts (
# VOID
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(EnableDisableInterrupts)
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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# EnableInterrupts (
# VOID
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(EnableInterrupts)
ASM_PFX(EnableInterrupts):
sti
ret

View File

@@ -1,61 +1,61 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# EnablePaging64.S
#
# Abstract:
#
# AsmEnablePaging64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86EnablePaging64 (
# IN UINT16 Cs, %rdi
# IN UINT64 EntryPoint, %rsi
# IN UINT64 Context1, OPTIONAL %rdx
# IN UINT64 Context2, OPTIONAL %rcx
# IN UINT64 NewStack %r8
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86EnablePaging64)
ASM_PFX(InternalX86EnablePaging64):
cli
pop %rax
callq Base
Base:
addl $(L1-Base),(%rsp)
mov %cr4,%rax
or $0x20,%al
mov %rax,%cr4
mov $0xc0000080,%ecx
rdmsr
or $0x1,%ah
wrmsr
mov %cr0,%rax
bts $0x1f,%eax
mov %rax,%cr0
lret
L1:
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 .
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# EnablePaging64.S
#
# Abstract:
#
# AsmEnablePaging64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86EnablePaging64 (
# IN UINT16 Cs, %rdi
# IN UINT64 EntryPoint, %rsi
# IN UINT64 Context1, OPTIONAL %rdx
# IN UINT64 Context2, OPTIONAL %rcx
# IN UINT64 NewStack %r8
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalX86EnablePaging64)
ASM_PFX(InternalX86EnablePaging64):
cli
pop %rax
callq Base
Base:
addl $(L1-Base),(%rsp)
mov %cr4,%rax
or $0x20,%al
mov %rax,%cr4
mov $0xc0000080,%ecx
rdmsr
or $0x1,%ah
wrmsr
mov %cr0,%rax
bts $0x1f,%eax
mov %rax,%cr0
lret
L1:
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 .

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:
#
# FlushCacheLine.S
#
# Abstract:
#
# AsmFlushCacheLine function
#
# Notes:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID *
# EFIAPI
# AsmFlushCacheLine (
# IN VOID *LinearAddress
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmFlushCacheLine)
ASM_PFX(AsmFlushCacheLine):
clflush (%rdi)
mov %rdi, %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:
#
# FlushCacheLine.S
#
# Abstract:
#
# AsmFlushCacheLine function
#
# Notes:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID *
# EFIAPI
# AsmFlushCacheLine (
# IN VOID *LinearAddress
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(AsmFlushCacheLine)
ASM_PFX(AsmFlushCacheLine):
clflush (%rdi)
mov %rdi, %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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86FxRestore (
# IN CONST IA32_FX_BUFFER *Buffer
# )#
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86FxSave (
# OUT IA32_FX_BUFFER *Buffer
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalX86FxSave)
ASM_PFX(InternalX86FxSave):
fxsave (%rcx)
ret

View File

@@ -30,7 +30,7 @@
# IN UINT32 ExchangeValue
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSyncCompareExchange32)
.globl ASM_PFX(InternalSyncCompareExchange32)
ASM_PFX(InternalSyncCompareExchange32):
mov %edx, %eax
lock cmpxchg %r8d, (%rcx)

View File

@@ -1,38 +1,38 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InterlockedCompareExchange64 (
# IN UINT64 *Value,
# IN UINT64 CompareValue,
# IN UINT64 ExchangeValue
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSyncCompareExchange64)
ASM_PFX(InternalSyncCompareExchange64):
mov %rsi, %rax
lock cmpxchg %rdx,(%rdi)
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InterlockedCompareExchange64 (
# IN UINT64 *Value,
# IN UINT64 CompareValue,
# IN UINT64 ExchangeValue
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalSyncCompareExchange64)
ASM_PFX(InternalSyncCompareExchange64):
mov %rsi, %rax
lock cmpxchg %rdx,(%rdi)
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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# InterlockedDecrement (
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINT32
# EFIAPI
# InterlockedIncrement (
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmInvd (
# VOID
# )#
#------------------------------------------------------------------------------
.globl ASM_PFX(AsmInvd)
ASM_PFX(AsmInvd):
invd
ret

View File

@@ -27,7 +27,7 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalLongJump)
.globl ASM_PFX(InternalLongJump)
ASM_PFX(InternalLongJump):
mov (%rcx), %rbx
mov 0x8(%rcx), %rsp

View File

@@ -31,7 +31,7 @@
# IN UINTN Edx
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmMonitor)
.globl ASM_PFX(AsmMonitor)
ASM_PFX(AsmMonitor):
mov %ecx,%eax
mov %edx,%ecx

View File

@@ -30,7 +30,7 @@
# IN UINTN Ecx
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmMwait)
.globl ASM_PFX(AsmMwait)
ASM_PFX(AsmMwait):
mov %ecx,%eax
mov %edx,%ecx

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr0)
.globl ASM_PFX(AsmReadCr0)
ASM_PFX(AsmReadCr0):
mov %cr0, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr2)
.globl ASM_PFX(AsmReadCr2)
ASM_PFX(AsmReadCr2):
mov %cr2, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr3)
.globl ASM_PFX(AsmReadCr3)
ASM_PFX(AsmReadCr3):
mov %cr3, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCr4)
.globl ASM_PFX(AsmReadCr4)
ASM_PFX(AsmReadCr4):
mov %cr4, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadCs)
.globl ASM_PFX(AsmReadCs)
ASM_PFX(AsmReadCs):
mov %cs, %eax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr0)
.globl ASM_PFX(AsmReadDr0)
ASM_PFX(AsmReadDr0):
mov %dr0, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr1)
.globl ASM_PFX(AsmReadDr1)
ASM_PFX(AsmReadDr1):
mov %dr1, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr2)
.globl ASM_PFX(AsmReadDr2)
ASM_PFX(AsmReadDr2):
mov %dr2, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr3)
.globl ASM_PFX(AsmReadDr3)
ASM_PFX(AsmReadDr3):
mov %dr3, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr4)
.globl ASM_PFX(AsmReadDr4)
ASM_PFX(AsmReadDr4):
#DB 0fh, 21h, 0e0h
mov %dr4, %rax

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr5)
.globl ASM_PFX(AsmReadDr5)
ASM_PFX(AsmReadDr5):
mov %dr5, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr6)
.globl ASM_PFX(AsmReadDr6)
ASM_PFX(AsmReadDr6):
mov %dr6, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDr7)
.globl ASM_PFX(AsmReadDr7)
ASM_PFX(AsmReadDr7):
mov %dr7, %rax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadDs)
.globl ASM_PFX(AsmReadDs)
ASM_PFX(AsmReadDs):
movl %ds, %eax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadEflags)
.globl ASM_PFX(AsmReadEflags)
ASM_PFX(AsmReadEflags):
pushfq
pop %rax

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadEs)
.globl ASM_PFX(AsmReadEs)
ASM_PFX(AsmReadEs):
mov %es, %eax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadFs)
.globl ASM_PFX(AsmReadFs)
ASM_PFX(AsmReadFs):
mov %fs, %eax
ret

View File

@@ -29,7 +29,7 @@
# OUT IA32_DESCRIPTOR *Gdtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86ReadGdtr)
.globl ASM_PFX(InternalX86ReadGdtr)
ASM_PFX(InternalX86ReadGdtr):
sgdt (%rcx)
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadGs)
.globl ASM_PFX(AsmReadGs)
ASM_PFX(AsmReadGs):
mov %gs, %eax
ret

View File

@@ -29,7 +29,7 @@
# OUT IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86ReadIdtr)
.globl ASM_PFX(InternalX86ReadIdtr)
ASM_PFX(InternalX86ReadIdtr):
sidt (%rcx)
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadLdtr)
.globl ASM_PFX(AsmReadLdtr)
ASM_PFX(AsmReadLdtr):
sldt %eax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm0)
.globl ASM_PFX(AsmReadMm0)
ASM_PFX(AsmReadMm0):
#DB 48h, 0fh, 7eh, 0c0h
movd %mm0, %rax

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm1)
.globl ASM_PFX(AsmReadMm1)
ASM_PFX(AsmReadMm1):
#DB 48h, 0fh, 7eh, 0c8h
movd %mm1, %rax

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm2)
.globl ASM_PFX(AsmReadMm2)
ASM_PFX(AsmReadMm2):
#DB 48h, 0fh, 7eh, 0d0h
movd %mm2, %rax

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm3)
.globl ASM_PFX(AsmReadMm3)
ASM_PFX(AsmReadMm3):
#DB 48h, 0fh, 7eh, 0d8h
movd %mm3, %rax

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm4)
.globl ASM_PFX(AsmReadMm4)
ASM_PFX(AsmReadMm4):
#DB 48h, 0fh, 7eh, 0e0h
movd %mm4, %rax

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm5)
.globl ASM_PFX(AsmReadMm5)
ASM_PFX(AsmReadMm5):
#DB 48h, 0fh, 7eh, 0e8h
movd %mm5, %rax

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm6)
.globl ASM_PFX(AsmReadMm6)
ASM_PFX(AsmReadMm6):
#DB 48h, 0fh, 7eh, 0f0h
movd %mm6, %rax

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMm7)
.globl ASM_PFX(AsmReadMm7)
ASM_PFX(AsmReadMm7):
#DB 48h, 0fh, 7eh, 0f8h
movd %mm7, %rax

View File

@@ -29,7 +29,7 @@
# IN UINT32 Index
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadMsr64)
.globl ASM_PFX(AsmReadMsr64)
ASM_PFX(AsmReadMsr64):
rdmsr # edx & eax are zero extended
shl $0x20, %rdx

View File

@@ -29,7 +29,7 @@
# IN UINT32 PmcIndex
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadPmc)
.globl ASM_PFX(AsmReadPmc)
ASM_PFX(AsmReadPmc):
rdpmc
shl $0x20, %rdx

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadSs);
.globl ASM_PFX(AsmReadSs);
ASM_PFX(AsmReadSs):
movl %ss, %eax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadTr)
.globl ASM_PFX(AsmReadTr)
ASM_PFX(AsmReadTr):
str %eax
ret

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmReadTsc)
.globl ASM_PFX(AsmReadTsc)
ASM_PFX(AsmReadTsc):
rdtsc
shl $0x20, %rdx

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
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
.extern InternalAssertJumpBuffer;
.global ASM_PFX(SetJump)
ASM_PFX(SetJump):
push %rcx
add $0xffffffffffffffe0,%rsp
call _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
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
.extern InternalAssertJumpBuffer;
.globl ASM_PFX(SetJump)
ASM_PFX(SetJump):
push %rcx
add $0xffffffffffffffe0,%rsp
call _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,44 +1,44 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# SwitchStack.S
#
# Abstract:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# Routine Description:
#
# Routine for switching stacks with 1 parameter
#
# Arguments:
#
# (rdi) EntryPoint - Entry point with new stack.
# (rsi) Context1 - Parameter1 for entry point.
# (rdx) Context2 - Parameter2 for entry point.
# (rcx) NewStack - Pointer to new stack.
#
# Returns:
#
# None
#
#------------------------------------------------------------------------------
.global ASM_PFX(InternalSwitchStack)
ASM_PFX(InternalSwitchStack):
mov %rcx, %rax
mov %rdx, %rcx
mov %r8, %rdx
lea -0x20(%r9), %rsp
call *%rax
#------------------------------------------------------------------------------
#
# 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:
#
# SwitchStack.S
#
# Abstract:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# Routine Description:
#
# Routine for switching stacks with 1 parameter
#
# Arguments:
#
# (rdi) EntryPoint - Entry point with new stack.
# (rsi) Context1 - Parameter1 for entry point.
# (rdx) Context2 - Parameter2 for entry point.
# (rcx) NewStack - Pointer to new stack.
#
# Returns:
#
# None
#
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalSwitchStack)
ASM_PFX(InternalSwitchStack):
mov %rcx, %rax
mov %rdx, %rcx
mov %r8, %rdx
lea -0x20(%r9), %rsp
call *%rax

View File

@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWbinvd)
.globl ASM_PFX(AsmWbinvd)
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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr0 (
# UINTN Cr0
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr2 (
# UINTN Cr2
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr3 (
# UINTN Cr3
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteCr4 (
# UINTN Cr4
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(AsmWriteCr4)
ASM_PFX(AsmWriteCr4):
mov %rcx,%cr4
mov %rcx,%rax
ret

View File

@@ -29,7 +29,7 @@
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr0)
.globl ASM_PFX(AsmWriteDr0)
ASM_PFX(AsmWriteDr0):
mov %rcx, %dr0
mov %rcx, %rax

View File

@@ -29,7 +29,7 @@
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr1)
.globl ASM_PFX(AsmWriteDr1)
ASM_PFX(AsmWriteDr1):
mov %rcx, %dr1
mov %rcx, %rax

View File

@@ -29,7 +29,7 @@
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr2)
.globl ASM_PFX(AsmWriteDr2)
ASM_PFX(AsmWriteDr2):
mov %rcx, %dr2
mov %rcx, %rax

View File

@@ -29,7 +29,7 @@
# UINTN Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteDr3)
.globl ASM_PFX(AsmWriteDr3)
ASM_PFX(AsmWriteDr3):
mov %rcx, %dr3
mov %rcx, %rax

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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr4 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr5 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr6 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINTN
# EFIAPI
# AsmWriteDr7 (
# IN UINTN Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86WriteGdtr (
# IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalX86WriteGdtr)
ASM_PFX(InternalX86WriteGdtr):
lgdt (%rcx)
ret

View File

@@ -1,35 +1,35 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86WriteIdtr (
# IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(InternalX86WriteIdtr)
ASM_PFX(InternalX86WriteIdtr):
lidt (%rcx)
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86WriteIdtr (
# IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalX86WriteIdtr)
ASM_PFX(InternalX86WriteIdtr):
lidt (%rcx)
ret

View File

@@ -1,35 +1,35 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteLdtr (
# IN UINT16 Ldtr
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteLdtr);
ASM_PFX(AsmWriteLdtr):
lldt %cx
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteLdtr (
# IN UINT16 Ldtr
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(AsmWriteLdtr);
ASM_PFX(AsmWriteLdtr):
lldt %cx
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:
#
# WriteMm0.S
#
# Abstract:
#
# AsmWriteMm0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm0 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm0);
ASM_PFX(AsmWriteMm0):
movd %rcx, %xmm0
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:
#
# WriteMm0.S
#
# Abstract:
#
# AsmWriteMm0 function
#
# Notes:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm0 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(AsmWriteMm0);
ASM_PFX(AsmWriteMm0):
movd %rcx, %xmm0
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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm1 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm2 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm3 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm4 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm5 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm6 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# AsmWriteMm7 (
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(AsmWriteMm7)
ASM_PFX(AsmWriteMm7):
movd %rcx, %mm7
ret

View File

@@ -1,39 +1,39 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmWriteMsr64 (
# IN UINT32 Index,
# IN UINT64 Value
# );
# TODO:
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMsr64)
ASM_PFX(AsmWriteMsr64):
mov %rdx, %rax
shr $0x20, %rdx
wrmsr
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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:
#
#------------------------------------------------------------------------------
#include <EdkIIGlueBase.h>
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# AsmWriteMsr64 (
# IN UINT32 Index,
# IN UINT64 Value
# );
# TODO:
#------------------------------------------------------------------------------
.globl ASM_PFX(AsmWriteMsr64)
ASM_PFX(AsmWriteMsr64):
mov %rdx, %rax
shr $0x20, %rdx
wrmsr
ret