mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-22 05:04:24 +02:00
Initial port to x86_64 gnu assembly.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1959 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e2136826a3
commit
e29e52e7c0
25
MdePkg/Library/BaseLib/X64/CpuBreakpoint.S
Normal file
25
MdePkg/Library/BaseLib/X64/CpuBreakpoint.S
Normal file
@ -0,0 +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 _CpuBreakpoint
|
||||||
|
_CpuBreakpoint:
|
||||||
|
int $0x3
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/CpuFlushTlb.S
Normal file
35
MdePkg/Library/BaseLib/X64/CpuFlushTlb.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# CpuFlushTlb.Asm
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# CpuFlushTlb function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.global _CpuFlushTlb
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# CpuFlushTlb (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
_CpuFlushTlb:
|
||||||
|
mov %cr3, %rax
|
||||||
|
mov %rax, %cr3
|
||||||
|
ret
|
60
MdePkg/Library/BaseLib/X64/CpuId.S
Normal file
60
MdePkg/Library/BaseLib/X64/CpuId.S
Normal file
@ -0,0 +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 _AsmCpuid;
|
||||||
|
_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
|
62
MdePkg/Library/BaseLib/X64/CpuIdEx.S
Normal file
62
MdePkg/Library/BaseLib/X64/CpuIdEx.S
Normal file
@ -0,0 +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:
|
||||||
|
#
|
||||||
|
# CpuIdEx.Asm
|
||||||
|
#
|
||||||
|
# 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 _AsmCpuidEx
|
||||||
|
_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
|
34
MdePkg/Library/BaseLib/X64/CpuPause.S
Normal file
34
MdePkg/Library/BaseLib/X64/CpuPause.S
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#------------------------------------------------------------------------------ ;
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# CpuPause.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# CpuPause function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# CpuPause (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _CpuPause;
|
||||||
|
_CpuPause:
|
||||||
|
pause
|
||||||
|
ret
|
34
MdePkg/Library/BaseLib/X64/CpuSleep.S
Normal file
34
MdePkg/Library/BaseLib/X64/CpuSleep.S
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#------------------------------------------------------------------------------ ;
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# CpuSleep.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# CpuSleep function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# CpuSleep (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _CpuSleep;
|
||||||
|
_CpuSleep:
|
||||||
|
hlt
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/DisableInterrupts.S
Normal file
35
MdePkg/Library/BaseLib/X64/DisableInterrupts.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# DisableInterrupts.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# DisableInterrupts function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# DisableInterrupts (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _DisableInterrupts;
|
||||||
|
_DisableInterrupts:
|
||||||
|
cli
|
||||||
|
ret
|
66
MdePkg/Library/BaseLib/X64/DisablePaging64.S
Normal file
66
MdePkg/Library/BaseLib/X64/DisablePaging64.S
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# DisablePaging64.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmDisablePaging64 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# 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 _InternalX86DisablePaging64
|
||||||
|
_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 .
|
||||||
|
|
37
MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.S
Normal file
37
MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# EnableDisableInterrupts.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# EnableDisableInterrupts function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# EnableDisableInterrupts (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _EnableDisableInterrupts;
|
||||||
|
.align 16;
|
||||||
|
_EnableDisableInterrupts:
|
||||||
|
sti
|
||||||
|
cli
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/EnableInterrupts.S
Normal file
35
MdePkg/Library/BaseLib/X64/EnableInterrupts.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# EnableInterrupts.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# EnableInterrupts function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# EnableInterrupts (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _EnableInterrupts;
|
||||||
|
_EnableInterrupts:
|
||||||
|
sti
|
||||||
|
ret
|
61
MdePkg/Library/BaseLib/X64/EnablePaging64.S
Normal file
61
MdePkg/Library/BaseLib/X64/EnablePaging64.S
Normal file
@ -0,0 +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:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# 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 _InternalX86EnablePaging64;
|
||||||
|
_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 .
|
36
MdePkg/Library/BaseLib/X64/FlushCacheLine.S
Normal file
36
MdePkg/Library/BaseLib/X64/FlushCacheLine.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# FlushCacheLine.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmFlushCacheLine function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID *
|
||||||
|
# EFIAPI
|
||||||
|
# AsmFlushCacheLine (
|
||||||
|
# IN VOID *LinearAddress
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmFlushCacheLine;
|
||||||
|
_AsmFlushCacheLine:
|
||||||
|
clflush (%rdi)
|
||||||
|
mov %rdi, %rax
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/FxRestore.S
Normal file
35
MdePkg/Library/BaseLib/X64/FxRestore.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# FxRestore.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmFxRestore function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# InternalX86FxRestore (
|
||||||
|
# IN CONST IA32_FX_BUFFER *Buffer
|
||||||
|
# )#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalX86FxRestore;
|
||||||
|
_InternalX86FxRestore:
|
||||||
|
fxrstor (%rcx)
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/FxSave.S
Normal file
35
MdePkg/Library/BaseLib/X64/FxSave.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# FxSave.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmFxSave function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# InternalX86FxSave (
|
||||||
|
# OUT IA32_FX_BUFFER *Buffer
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalX86FxSave;
|
||||||
|
_InternalX86FxSave:
|
||||||
|
fxsave (%rcx)
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.S
Normal file
37
MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# InterlockedCompareExchange32.Asm
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# InterlockedCompareExchange32 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT32
|
||||||
|
# EFIAPI
|
||||||
|
# InterlockedCompareExchange32 (
|
||||||
|
# IN UINT32 *Value,
|
||||||
|
# IN UINT32 CompareValue,
|
||||||
|
# IN UINT32 ExchangeValue
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalSyncCompareExchange32;
|
||||||
|
_InternalSyncCompareExchange32:
|
||||||
|
mov %edx, %eax
|
||||||
|
lock cmpxchg %r8d, (%rcx)
|
||||||
|
ret
|
39
MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.S
Normal file
39
MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.S
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# InterlockedCompareExchange64.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# InterlockedCompareExchange64 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# InterlockedCompareExchange64 (
|
||||||
|
# IN UINT64 *Value,
|
||||||
|
# IN UINT64 CompareValue,
|
||||||
|
# IN UINT64 ExchangeValue
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalSyncCompareExchange64;
|
||||||
|
.align 16;
|
||||||
|
_InternalSyncCompareExchange64:
|
||||||
|
mov %rsi, %rax
|
||||||
|
lock cmpxchg %rdx,(%rdi)
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/InterlockedDecrement.S
Normal file
36
MdePkg/Library/BaseLib/X64/InterlockedDecrement.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# InterlockedDecrement.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# InterlockedDecrement function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT32
|
||||||
|
# EFIAPI
|
||||||
|
# InterlockedDecrement (
|
||||||
|
# IN UINT32 *Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalSyncDecrement;
|
||||||
|
_InternalSyncDecrement:
|
||||||
|
lock decl (%rcx)
|
||||||
|
mov (%rcx), %eax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/InterlockedIncrement.S
Normal file
36
MdePkg/Library/BaseLib/X64/InterlockedIncrement.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# InterlockedIncrement.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# InterlockedIncrement function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT32
|
||||||
|
# EFIAPI
|
||||||
|
# InterlockedIncrement (
|
||||||
|
# IN UINT32 *Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalSyncIncrement;
|
||||||
|
_InternalSyncIncrement:
|
||||||
|
lock incl (%rcx)
|
||||||
|
mov (%rcx), %eax
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/Invd.S
Normal file
35
MdePkg/Library/BaseLib/X64/Invd.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# Invd.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmInvd function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmInvd (
|
||||||
|
# VOID
|
||||||
|
# )#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmInvd;
|
||||||
|
_AsmInvd:
|
||||||
|
invd
|
||||||
|
ret
|
42
MdePkg/Library/BaseLib/X64/LongJump.S
Normal file
42
MdePkg/Library/BaseLib/X64/LongJump.S
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# LongJump.Asm
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# Implementation of _LongJump() on x64.
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# InternalLongJump (
|
||||||
|
# IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
|
||||||
|
# IN UINTN Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalLongJump
|
||||||
|
_InternalLongJump:
|
||||||
|
mov (%rcx), %rbx
|
||||||
|
mov 0x8(%rcx), %rsp
|
||||||
|
mov 0x10(%rcx), %rbp
|
||||||
|
mov 0x18(%rcx), %rdi
|
||||||
|
mov 0x20(%rcx), %rsi
|
||||||
|
mov 0x28(%rcx), %r12
|
||||||
|
mov 0x30(%rcx), %r13
|
||||||
|
mov 0x38(%rcx), %r14
|
||||||
|
mov 0x40(%rcx), %r15
|
||||||
|
mov %rdx, %rax
|
||||||
|
jmp *0x48(%rcx)
|
41
MdePkg/Library/BaseLib/X64/Monitor.S
Normal file
41
MdePkg/Library/BaseLib/X64/Monitor.S
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# Monitor.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmMonitor function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmMonitor (
|
||||||
|
# IN UINTN Eax,
|
||||||
|
# IN UINTN Ecx,
|
||||||
|
# IN UINTN Edx
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmMonitor;
|
||||||
|
.align 16;
|
||||||
|
_AsmMonitor:
|
||||||
|
mov %ecx,%eax
|
||||||
|
mov %edx,%ecx
|
||||||
|
mov %r8d,%edx
|
||||||
|
monitor
|
||||||
|
ret
|
39
MdePkg/Library/BaseLib/X64/Mwait.S
Normal file
39
MdePkg/Library/BaseLib/X64/Mwait.S
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# Mwait.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmMwait function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmMwait (
|
||||||
|
# IN UINTN Eax,
|
||||||
|
# IN UINTN Ecx
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmMwait;
|
||||||
|
.align 16;
|
||||||
|
_AsmMwait:
|
||||||
|
mov %ecx,%eax
|
||||||
|
mov %edx,%ecx
|
||||||
|
mwait %rax,%rcx
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadCr0.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadCr0.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadCr0.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadCr0 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadCr0 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadCr0;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadCr0:
|
||||||
|
mov %cr0, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadCr2.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadCr2.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadCr2.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadCr2 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadCr2 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadCr2;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadCr2:
|
||||||
|
mov %cr2, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadCr3.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadCr3.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadCr3.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadCr3 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadCr3 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadCr3;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadCr3:
|
||||||
|
mov %cr3, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadCr4.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadCr4.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadCr4.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadCr4 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadCr4 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadCr4;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadCr4:
|
||||||
|
mov %cr4, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadCs.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadCs.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadCs.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadCs function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT16
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadCs (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadCs;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadCs:
|
||||||
|
mov %cs, %eax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadDr0.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadDr0.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadDr0.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadDr0 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadDr0 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadDr0;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadDr0:
|
||||||
|
mov %dr0, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadDr1.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadDr1.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadDr1.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadDr1 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadDr1 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadDr1;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadDr1:
|
||||||
|
mov %dr1, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadDr2.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadDr2.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadDr2.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadDr2 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadDr2 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadDr2;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadDr2:
|
||||||
|
mov %dr2, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadDr3.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadDr3.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadDr3.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadDr3 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadDr3 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadDr3;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadDr3:
|
||||||
|
mov %dr3, %rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/ReadDr4.S
Normal file
37
MdePkg/Library/BaseLib/X64/ReadDr4.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadDr4.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadDr4 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadDr4 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadDr4;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadDr4:
|
||||||
|
#DB 0fh, 21h, 0e0h
|
||||||
|
mov %dr4, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadDr5.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadDr5.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadDr5.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadDr5 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadDr5 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadDr5;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadDr5:
|
||||||
|
mov %dr5, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadDr6.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadDr6.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadDr6.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadDr6 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadDr6 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadDr6;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadDr6:
|
||||||
|
mov %dr6, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadDr7.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadDr7.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadDr7.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadDr7 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadDr7 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadDr7;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadDr7:
|
||||||
|
mov %dr7, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadDs.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadDs.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadDs.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadDs function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT16
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadDs (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadDs;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadDs:
|
||||||
|
movl %ds, %eax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/ReadEflags.S
Normal file
37
MdePkg/Library/BaseLib/X64/ReadEflags.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadEflags.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadEflags function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadEflags (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadEflags;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadEflags:
|
||||||
|
pushfq
|
||||||
|
pop %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadEs.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadEs.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadEs.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadEs function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT16
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadEs (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadEs;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadEs:
|
||||||
|
mov %es, %eax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadFs.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadFs.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadFs.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadFs function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT16
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadFs (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadFs;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadFs:
|
||||||
|
mov %fs, %eax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadGdtr.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadGdtr.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadGdtr.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadGdtr function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# InternalX86ReadGdtr (
|
||||||
|
# OUT IA32_DESCRIPTOR *Gdtr
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalX86ReadGdtr;
|
||||||
|
.align 16;
|
||||||
|
_InternalX86ReadGdtr:
|
||||||
|
sgdt (%rcx)
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadGs.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadGs.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadGs.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadGs function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT16
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadGs (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadGs;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadGs:
|
||||||
|
mov %gs, %eax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadIdtr.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadIdtr.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadIdtr.AS
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadIdtr function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# InternalX86ReadIdtr (
|
||||||
|
# OUT IA32_DESCRIPTOR *Idtr
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalX86ReadIdtr;
|
||||||
|
.align 16;
|
||||||
|
_InternalX86ReadIdtr:
|
||||||
|
sidt (%rcx)
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadLdtr.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadLdtr.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadLdtr.AS
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadLdtr function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT16
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadLdtr (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadLdtr;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadLdtr:
|
||||||
|
sldt %eax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/ReadMm0.S
Normal file
37
MdePkg/Library/BaseLib/X64/ReadMm0.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadMm0.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadMm0 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadMm0 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadMm0;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadMm0:
|
||||||
|
#DB 48h, 0fh, 7eh, 0c0h
|
||||||
|
movd %mm0, %rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/ReadMm1.S
Normal file
37
MdePkg/Library/BaseLib/X64/ReadMm1.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadMm1.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadMm1 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadMm1 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadMm1;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadMm1:
|
||||||
|
#DB 48h, 0fh, 7eh, 0c8h
|
||||||
|
movd %mm1, %rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/ReadMm2.S
Normal file
37
MdePkg/Library/BaseLib/X64/ReadMm2.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadMm2.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadMm2 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadMm2 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadMm2;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadMm2:
|
||||||
|
#DB 48h, 0fh, 7eh, 0d0h
|
||||||
|
movd %mm2, %rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/ReadMm3.S
Normal file
37
MdePkg/Library/BaseLib/X64/ReadMm3.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadMm3.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadMm3 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadMm3 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadMm3;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadMm3:
|
||||||
|
#DB 48h, 0fh, 7eh, 0d8h
|
||||||
|
movd %mm3, %rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/ReadMm4.S
Normal file
37
MdePkg/Library/BaseLib/X64/ReadMm4.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadMm4.AS
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadMm4 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadMm4 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadMm4;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadMm4:
|
||||||
|
#DB 48h, 0fh, 7eh, 0e0h
|
||||||
|
movd %mm4, %rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/ReadMm5.S
Normal file
37
MdePkg/Library/BaseLib/X64/ReadMm5.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadMm5.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadMm5 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadMm5 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadMm5;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadMm5:
|
||||||
|
#DB 48h, 0fh, 7eh, 0e8h
|
||||||
|
movd %mm5, %rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/ReadMm6.S
Normal file
37
MdePkg/Library/BaseLib/X64/ReadMm6.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadMm6.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadMm6 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadMm6 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadMm6;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadMm6:
|
||||||
|
#DB 48h, 0fh, 7eh, 0f0h
|
||||||
|
movd %mm6, %rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/ReadMm7.S
Normal file
37
MdePkg/Library/BaseLib/X64/ReadMm7.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadMm7.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadMm7 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadMm7 (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadMm7;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadMm7:
|
||||||
|
#DB 48h, 0fh, 7eh, 0f8h
|
||||||
|
movd %mm7, %rax
|
||||||
|
ret
|
38
MdePkg/Library/BaseLib/X64/ReadMsr64.S
Normal file
38
MdePkg/Library/BaseLib/X64/ReadMsr64.S
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadMsr64.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadMsr64 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadMsr64 (
|
||||||
|
# IN UINT32 Index
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadMsr64;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadMsr64:
|
||||||
|
rdmsr # edx & eax are zero extended
|
||||||
|
shl $0x20, %rdx
|
||||||
|
or %rdx, %rax
|
||||||
|
ret
|
38
MdePkg/Library/BaseLib/X64/ReadPmc.S
Normal file
38
MdePkg/Library/BaseLib/X64/ReadPmc.S
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadPmc.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadPmc function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadPmc (
|
||||||
|
# IN UINT32 PmcIndex
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadPmc;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadPmc:
|
||||||
|
rdpmc
|
||||||
|
shl $0x20, %rdx
|
||||||
|
or %rdx, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadSs.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadSs.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadSs.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadSs function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT16
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadSs (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadSs;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadSs:
|
||||||
|
movl %ss, %eax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/ReadTr.S
Normal file
36
MdePkg/Library/BaseLib/X64/ReadTr.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadTr.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadTr function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT16
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadTr (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadTr;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadTr:
|
||||||
|
str %eax
|
||||||
|
ret
|
38
MdePkg/Library/BaseLib/X64/ReadTsc.S
Normal file
38
MdePkg/Library/BaseLib/X64/ReadTsc.S
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# ReadTsc.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmReadTsc function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmReadTsc (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmReadTsc;
|
||||||
|
.align 16;
|
||||||
|
_AsmReadTsc:
|
||||||
|
rdtsc
|
||||||
|
shl $0x20, %rdx
|
||||||
|
or %rdx, %rax
|
||||||
|
ret
|
42
MdePkg/Library/BaseLib/X64/SetJump.S
Normal file
42
MdePkg/Library/BaseLib/X64/SetJump.S
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# SetJump.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# Implementation of SetJump() on x86_64
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.extern InternalAssertJumpBuffer;
|
||||||
|
.global _SetJump;
|
||||||
|
_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
|
44
MdePkg/Library/BaseLib/X64/SwitchStack.S
Normal file
44
MdePkg/Library/BaseLib/X64/SwitchStack.S
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# SwitchStack.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# 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 _InternalSwitchStack;
|
||||||
|
_InternalSwitchStack:
|
||||||
|
mov %rcx, %rax
|
||||||
|
mov %rdx, %rcx
|
||||||
|
mov %r8, %rdx
|
||||||
|
lea -0x20(%r9), %rsp
|
||||||
|
call *%rax
|
36
MdePkg/Library/BaseLib/X64/Wbinvd.S
Normal file
36
MdePkg/Library/BaseLib/X64/Wbinvd.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# Wbinvd.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWbinvd function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWbinvd (
|
||||||
|
# VOID
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWbinvd;
|
||||||
|
.align 16;
|
||||||
|
_AsmWbinvd:
|
||||||
|
wbinvd
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/WriteCr0.S
Normal file
36
MdePkg/Library/BaseLib/X64/WriteCr0.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteCr0.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteCr0 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteCr0 (
|
||||||
|
# UINTN Cr0
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteCr0;
|
||||||
|
_AsmWriteCr0:
|
||||||
|
mov %rcx,%cr0
|
||||||
|
mov %rcx,%rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/WriteCr2.S
Normal file
36
MdePkg/Library/BaseLib/X64/WriteCr2.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteCr2.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteCr2 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteCr2 (
|
||||||
|
# UINTN Cr2
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteCr2;
|
||||||
|
_AsmWriteCr0:
|
||||||
|
mov %rcx,%cr2
|
||||||
|
mov %rcx,%rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/WriteCr3.S
Normal file
36
MdePkg/Library/BaseLib/X64/WriteCr3.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteCr3.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteCr3 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteCr3 (
|
||||||
|
# UINTN Cr3
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteCr3;
|
||||||
|
_AsmWriteCr3:
|
||||||
|
mov %rcx,%cr3
|
||||||
|
mov %rcx,%rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/WriteCr4.S
Normal file
36
MdePkg/Library/BaseLib/X64/WriteCr4.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteCr4.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteCr4 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteCr4 (
|
||||||
|
# UINTN Cr4
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteCr4;
|
||||||
|
_AsmWriteCr4:
|
||||||
|
mov %rcx,%cr4
|
||||||
|
mov %rcx,%rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/WriteDr0.S
Normal file
37
MdePkg/Library/BaseLib/X64/WriteDr0.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteDr0.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteDr0 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteDr0 (
|
||||||
|
# UINTN Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteDr0;
|
||||||
|
.align 16;
|
||||||
|
_AsmWriteDr0:
|
||||||
|
mov %rcx, %dr0
|
||||||
|
mov %rcx, %rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/WriteDr1.S
Normal file
37
MdePkg/Library/BaseLib/X64/WriteDr1.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteDr1.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteDr1 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteDr1 (
|
||||||
|
# UINTN Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteDr1;
|
||||||
|
.align 16;
|
||||||
|
_AsmWriteDr1:
|
||||||
|
mov %rcx, %dr1
|
||||||
|
mov %rcx, rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/WriteDr2.S
Normal file
37
MdePkg/Library/BaseLib/X64/WriteDr2.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteDr2.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteDr2 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteDr2 (
|
||||||
|
# UINTN Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteDr2;
|
||||||
|
.align 16;
|
||||||
|
_AsmWriteDr2:
|
||||||
|
mov %rcx, %dr2
|
||||||
|
mov %rcx, rax
|
||||||
|
ret
|
37
MdePkg/Library/BaseLib/X64/WriteDr3.S
Normal file
37
MdePkg/Library/BaseLib/X64/WriteDr3.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteDr3.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteDr3 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteDr3 (
|
||||||
|
# UINTN Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteDr3;
|
||||||
|
.align 16;
|
||||||
|
_AsmWriteDr3:
|
||||||
|
mov %rcx, %dr3
|
||||||
|
mov %rcx, rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/WriteDr4.S
Normal file
36
MdePkg/Library/BaseLib/X64/WriteDr4.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteDr4.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteDr4 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteDr4 (
|
||||||
|
# IN UINTN Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteDr4;
|
||||||
|
_AsmWriteDr4:
|
||||||
|
mov %rcx, %dr4
|
||||||
|
mov %rcx, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/WriteDr5.S
Normal file
36
MdePkg/Library/BaseLib/X64/WriteDr5.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteDr5.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteDr5 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteDr5 (
|
||||||
|
# IN UINTN Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteDr5;
|
||||||
|
_AsmWriteDr5:
|
||||||
|
mov %rcx, %dr5
|
||||||
|
mov %rcx, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/WriteDr6.S
Normal file
36
MdePkg/Library/BaseLib/X64/WriteDr6.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteDr6.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteDr6 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteDr6 (
|
||||||
|
# IN UINTN Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteDr6;
|
||||||
|
_AsmWriteDr6:
|
||||||
|
mov %rcx, %dr6
|
||||||
|
mov %rcx, %rax
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/WriteDr7.S
Normal file
36
MdePkg/Library/BaseLib/X64/WriteDr7.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteDr7.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteDr7 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINTN
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteDr7 (
|
||||||
|
# IN UINTN Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteDr7;
|
||||||
|
_AsmWriteDr7:
|
||||||
|
mov %rcx, %dr7
|
||||||
|
mov %rcx, %rax
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/WriteGdtr.S
Normal file
35
MdePkg/Library/BaseLib/X64/WriteGdtr.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteGdtr.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteGdtr function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# InternalX86WriteGdtr (
|
||||||
|
# IN CONST IA32_DESCRIPTOR *Idtr
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalX86WriteGdtr;
|
||||||
|
_InternalX86WriteGdtr:
|
||||||
|
lgdt (%rcx)
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/WriteIdtr.S
Normal file
36
MdePkg/Library/BaseLib/X64/WriteIdtr.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteIdtr.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteIdtr function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# InternalX86WriteIdtr (
|
||||||
|
# IN CONST IA32_DESCRIPTOR *Idtr
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _InternalX86WriteIdtr;
|
||||||
|
.align 16;
|
||||||
|
_InternalX86WriteIdtr:
|
||||||
|
lidt (%rcx)
|
||||||
|
ret
|
36
MdePkg/Library/BaseLib/X64/WriteLdtr.S
Normal file
36
MdePkg/Library/BaseLib/X64/WriteLdtr.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteLdtr.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteLdtr function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteLdtr (
|
||||||
|
# IN UINT16 Ldtr
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteLdtr;
|
||||||
|
.align 16;
|
||||||
|
_AsmWriteLdtr:
|
||||||
|
lldt %cx
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/WriteMm0.S
Normal file
35
MdePkg/Library/BaseLib/X64/WriteMm0.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteMm0.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteMm0 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteMm0 (
|
||||||
|
# IN UINT64 Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteMm0;
|
||||||
|
_AsmWriteMm0:
|
||||||
|
movd %rcx, %xmm0
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/WriteMm1.S
Normal file
35
MdePkg/Library/BaseLib/X64/WriteMm1.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteMm1.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteMm1 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteMm1 (
|
||||||
|
# IN UINT64 Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteMm1;
|
||||||
|
_AsmWriteMm1:
|
||||||
|
movd %rcx, %mm1
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/WriteMm2.S
Normal file
35
MdePkg/Library/BaseLib/X64/WriteMm2.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteMm2.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteMm2 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteMm2 (
|
||||||
|
# IN UINT64 Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteMm2;
|
||||||
|
_AsmWriteMm2:
|
||||||
|
movd %rcx, %mm2
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/WriteMm3.S
Normal file
35
MdePkg/Library/BaseLib/X64/WriteMm3.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteMm3.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteMm3 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteMm3 (
|
||||||
|
# IN UINT64 Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteMm3;
|
||||||
|
_AsmWriteMm3:
|
||||||
|
movd %rcx, %mm3
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/WriteMm4.S
Normal file
35
MdePkg/Library/BaseLib/X64/WriteMm4.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteMm4.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteMm4 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteMm4 (
|
||||||
|
# IN UINT64 Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteMm4;
|
||||||
|
_AsmWriteMm4:
|
||||||
|
movd %rcx, %mm4
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/WriteMm5.S
Normal file
35
MdePkg/Library/BaseLib/X64/WriteMm5.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteMm5.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteMm5 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteMm5 (
|
||||||
|
# IN UINT64 Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteMm5;
|
||||||
|
_AsmWriteMm5:
|
||||||
|
movd %rcx, %mm5
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/WriteMm6.S
Normal file
35
MdePkg/Library/BaseLib/X64/WriteMm6.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteMm6.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteMm6 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteMm6 (
|
||||||
|
# IN UINT64 Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteMm6;
|
||||||
|
_AsmWriteMm6:
|
||||||
|
movd %rcx, %mm6
|
||||||
|
ret
|
35
MdePkg/Library/BaseLib/X64/WriteMm7.S
Normal file
35
MdePkg/Library/BaseLib/X64/WriteMm7.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteMm7.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteMm7 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# VOID
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteMm7 (
|
||||||
|
# IN UINT64 Value
|
||||||
|
# );
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteMm7;
|
||||||
|
_AsmWriteMm7:
|
||||||
|
movd %rcx, %mm7
|
||||||
|
ret
|
40
MdePkg/Library/BaseLib/X64/WriteMsr64.S
Normal file
40
MdePkg/Library/BaseLib/X64/WriteMsr64.S
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Intel Corporation
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# WriteMsr64.S
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# AsmWriteMsr64 function
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# UINT64
|
||||||
|
# EFIAPI
|
||||||
|
# AsmWriteMsr64 (
|
||||||
|
# IN UINT32 Index,
|
||||||
|
# IN UINT64 Value
|
||||||
|
# );
|
||||||
|
# TODO:
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
.global _AsmWriteMsr64;
|
||||||
|
.align 16;
|
||||||
|
_AsmWriteMsr64:
|
||||||
|
mov %rdx, %rax
|
||||||
|
shr $0x20, %rdx
|
||||||
|
wrmsr
|
||||||
|
ret
|
Loading…
x
Reference in New Issue
Block a user