mirror of https://github.com/acidanthera/audk.git
Fixed issues compiling for Apple gcc on IA-32
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9310 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
fbf926add9
commit
e8de46808a
|
@ -110,7 +110,7 @@ EFI_STATUS
|
||||||
//
|
//
|
||||||
#define EFI_FILE_MODE_READ 0x0000000000000001
|
#define EFI_FILE_MODE_READ 0x0000000000000001
|
||||||
#define EFI_FILE_MODE_WRITE 0x0000000000000002
|
#define EFI_FILE_MODE_WRITE 0x0000000000000002
|
||||||
#define EFI_FILE_MODE_CREATE 0x8000000000000000
|
#define EFI_FILE_MODE_CREATE 0x8000000000000000ULL
|
||||||
|
|
||||||
//
|
//
|
||||||
// File attributes
|
// File attributes
|
||||||
|
|
|
@ -60,6 +60,25 @@ Abstract:
|
||||||
|
|
||||||
#define _EFI_INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) - 1))
|
#define _EFI_INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) - 1))
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
//
|
||||||
|
// Use GCC built-in macros for variable argument lists.
|
||||||
|
//
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Variable used to traverse the list of arguments. This type can vary by
|
||||||
|
/// implementation and could be an array or structure.
|
||||||
|
///
|
||||||
|
typedef __builtin_va_list VA_LIST;
|
||||||
|
|
||||||
|
#define VA_START(Marker, Parameter) __builtin_va_start (Marker, Parameter)
|
||||||
|
|
||||||
|
#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE)))
|
||||||
|
|
||||||
|
#define VA_END(Marker) __builtin_va_end (Marker)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
//
|
//
|
||||||
// Also support coding convention rules for var arg macros
|
// Also support coding convention rules for var arg macros
|
||||||
//
|
//
|
||||||
|
@ -70,6 +89,9 @@ typedef CHAR8 *VA_LIST;
|
||||||
#define VA_ARG(ap, t) (*(t *) ((ap += _EFI_INT_SIZE_OF (t)) - _EFI_INT_SIZE_OF (t)))
|
#define VA_ARG(ap, t) (*(t *) ((ap += _EFI_INT_SIZE_OF (t)) - _EFI_INT_SIZE_OF (t)))
|
||||||
#define VA_END(ap) (ap = (VA_LIST) 0)
|
#define VA_END(ap) (ap = (VA_LIST) 0)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -83,7 +83,9 @@ Abstract:
|
||||||
//
|
//
|
||||||
// Make sure we are useing the correct packing rules per EFI specification
|
// Make sure we are useing the correct packing rules per EFI specification
|
||||||
//
|
//
|
||||||
|
#ifndef __GNUC__
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __INTEL_COMPILER
|
#if __INTEL_COMPILER
|
||||||
//
|
//
|
||||||
|
|
|
@ -35,7 +35,9 @@ Abstract:
|
||||||
//
|
//
|
||||||
// Make sure we are useing the correct packing rules per EFI specification
|
// Make sure we are useing the correct packing rules per EFI specification
|
||||||
//
|
//
|
||||||
|
#ifndef __GNUC__
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __INTEL_COMPILER
|
#if __INTEL_COMPILER
|
||||||
//
|
//
|
||||||
|
|
|
@ -26,16 +26,20 @@ COMPONENT_TYPE = LIBRARY
|
||||||
[sources.common]
|
[sources.common]
|
||||||
|
|
||||||
[sources.ia32]
|
[sources.ia32]
|
||||||
Ia32\memcpyRep1.asm
|
Ia32/memcpyRep1.asm | MSFT
|
||||||
Ia32\memsetRep4.asm
|
Ia32/memcpyRep1.asm | INTEL
|
||||||
# Ia32\memcpy.asm
|
Ia32/memsetRep4.asm | MSFT
|
||||||
# Ia32\memset.asm
|
Ia32/memsetRep4.asm | INTEL
|
||||||
|
memcpy.c | GCC
|
||||||
|
memset.c | GCC
|
||||||
|
|
||||||
[sources.x64]
|
[sources.x64]
|
||||||
x64\memcpyRep1.asm
|
x64/memcpyRep1.asm | MSFT
|
||||||
x64\memsetRep4.asm
|
x64/memcpyRep1.asm | INTEL
|
||||||
# x64\memcpy.asm
|
x64/memsetRep4.asm | MSFT
|
||||||
# x64\memset.asm
|
x64/memsetRep4.asm | INTEL
|
||||||
|
memcpy.c | GCC
|
||||||
|
memset.c | GCC
|
||||||
|
|
||||||
[sources.Ipf]
|
[sources.Ipf]
|
||||||
memcpy.c
|
memcpy.c
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#include <EdkIIGlueBase.h>
|
#include <EdkIIGlueBase.h>
|
||||||
|
|
||||||
.global ASM_PFX(CpuBreakpoint)
|
.globl ASM_PFX(CpuBreakpoint)
|
||||||
ASM_PFX(CpuBreakpoint):
|
ASM_PFX(CpuBreakpoint):
|
||||||
int $0x3
|
int $0x3
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
# OUT UINT32 *RegisterOutEdx OPTIONAL
|
# OUT UINT32 *RegisterOutEdx OPTIONAL
|
||||||
# )
|
# )
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmCpuid)
|
.globl ASM_PFX(AsmCpuid)
|
||||||
ASM_PFX(AsmCpuid):
|
ASM_PFX(AsmCpuid):
|
||||||
push %rbx
|
push %rbx
|
||||||
mov %ecx, %eax
|
mov %ecx, %eax
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
# OUT UINT32 *RegisterOutEdx OPTIONAL
|
# OUT UINT32 *RegisterOutEdx OPTIONAL
|
||||||
# )
|
# )
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmCpuidEx)
|
.globl ASM_PFX(AsmCpuidEx)
|
||||||
ASM_PFX(AsmCpuidEx):
|
ASM_PFX(AsmCpuidEx):
|
||||||
push %rbx
|
push %rbx
|
||||||
movl %ecx,%eax
|
movl %ecx,%eax
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(CpuPause)
|
.globl ASM_PFX(CpuPause)
|
||||||
ASM_PFX(CpuPause):
|
ASM_PFX(CpuPause):
|
||||||
pause
|
pause
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(CpuSleep)
|
.globl ASM_PFX(CpuSleep)
|
||||||
ASM_PFX(CpuSleep):
|
ASM_PFX(CpuSleep):
|
||||||
hlt
|
hlt
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(DisableInterrupts)
|
.globl ASM_PFX(DisableInterrupts)
|
||||||
ASM_PFX(DisableInterrupts):
|
ASM_PFX(DisableInterrupts):
|
||||||
cli
|
cli
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
.global ASM_PFX(InternalX86DisablePaging64)
|
.globl ASM_PFX(InternalX86DisablePaging64)
|
||||||
ASM_PFX(InternalX86DisablePaging64):
|
ASM_PFX(InternalX86DisablePaging64):
|
||||||
cli
|
cli
|
||||||
shl $0x20,%rcx
|
shl $0x20,%rcx
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(EnableDisableInterrupts)
|
.globl ASM_PFX(EnableDisableInterrupts)
|
||||||
ASM_PFX(EnableDisableInterrupts):
|
ASM_PFX(EnableDisableInterrupts):
|
||||||
sti
|
sti
|
||||||
cli
|
cli
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(EnableInterrupts)
|
.globl ASM_PFX(EnableInterrupts)
|
||||||
ASM_PFX(EnableInterrupts):
|
ASM_PFX(EnableInterrupts):
|
||||||
sti
|
sti
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
# IN UINT64 NewStack %r8
|
# IN UINT64 NewStack %r8
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86EnablePaging64)
|
.globl ASM_PFX(InternalX86EnablePaging64)
|
||||||
ASM_PFX(InternalX86EnablePaging64):
|
ASM_PFX(InternalX86EnablePaging64):
|
||||||
cli
|
cli
|
||||||
pop %rax
|
pop %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN VOID *LinearAddress
|
# IN VOID *LinearAddress
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmFlushCacheLine)
|
.globl ASM_PFX(AsmFlushCacheLine)
|
||||||
ASM_PFX(AsmFlushCacheLine):
|
ASM_PFX(AsmFlushCacheLine):
|
||||||
clflush (%rdi)
|
clflush (%rdi)
|
||||||
mov %rdi, %rax
|
mov %rdi, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN CONST IA32_FX_BUFFER *Buffer
|
# IN CONST IA32_FX_BUFFER *Buffer
|
||||||
# )#
|
# )#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86FxRestore)
|
.globl ASM_PFX(InternalX86FxRestore)
|
||||||
ASM_PFX(InternalX86FxRestore):
|
ASM_PFX(InternalX86FxRestore):
|
||||||
fxrstor (%rcx)
|
fxrstor (%rcx)
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# OUT IA32_FX_BUFFER *Buffer
|
# OUT IA32_FX_BUFFER *Buffer
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86FxSave)
|
.globl ASM_PFX(InternalX86FxSave)
|
||||||
ASM_PFX(InternalX86FxSave):
|
ASM_PFX(InternalX86FxSave):
|
||||||
fxsave (%rcx)
|
fxsave (%rcx)
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
# IN UINT32 ExchangeValue
|
# IN UINT32 ExchangeValue
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalSyncCompareExchange32)
|
.globl ASM_PFX(InternalSyncCompareExchange32)
|
||||||
ASM_PFX(InternalSyncCompareExchange32):
|
ASM_PFX(InternalSyncCompareExchange32):
|
||||||
mov %edx, %eax
|
mov %edx, %eax
|
||||||
lock cmpxchg %r8d, (%rcx)
|
lock cmpxchg %r8d, (%rcx)
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
# IN UINT64 ExchangeValue
|
# IN UINT64 ExchangeValue
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalSyncCompareExchange64)
|
.globl ASM_PFX(InternalSyncCompareExchange64)
|
||||||
ASM_PFX(InternalSyncCompareExchange64):
|
ASM_PFX(InternalSyncCompareExchange64):
|
||||||
mov %rsi, %rax
|
mov %rsi, %rax
|
||||||
lock cmpxchg %rdx,(%rdi)
|
lock cmpxchg %rdx,(%rdi)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT32 *Value
|
# IN UINT32 *Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalSyncDecrement)
|
.globl ASM_PFX(InternalSyncDecrement)
|
||||||
ASM_PFX(InternalSyncDecrement):
|
ASM_PFX(InternalSyncDecrement):
|
||||||
lock decl (%rcx)
|
lock decl (%rcx)
|
||||||
mov (%rcx), %eax
|
mov (%rcx), %eax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT32 *Value
|
# IN UINT32 *Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalSyncIncrement)
|
.globl ASM_PFX(InternalSyncIncrement)
|
||||||
ASM_PFX(InternalSyncIncrement):
|
ASM_PFX(InternalSyncIncrement):
|
||||||
lock incl (%rcx)
|
lock incl (%rcx)
|
||||||
mov (%rcx), %eax
|
mov (%rcx), %eax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# )#
|
# )#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmInvd)
|
.globl ASM_PFX(AsmInvd)
|
||||||
ASM_PFX(AsmInvd):
|
ASM_PFX(AsmInvd):
|
||||||
invd
|
invd
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
# IN UINTN Value
|
# IN UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalLongJump)
|
.globl ASM_PFX(InternalLongJump)
|
||||||
ASM_PFX(InternalLongJump):
|
ASM_PFX(InternalLongJump):
|
||||||
mov (%rcx), %rbx
|
mov (%rcx), %rbx
|
||||||
mov 0x8(%rcx), %rsp
|
mov 0x8(%rcx), %rsp
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
# IN UINTN Edx
|
# IN UINTN Edx
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmMonitor)
|
.globl ASM_PFX(AsmMonitor)
|
||||||
ASM_PFX(AsmMonitor):
|
ASM_PFX(AsmMonitor):
|
||||||
mov %ecx,%eax
|
mov %ecx,%eax
|
||||||
mov %edx,%ecx
|
mov %edx,%ecx
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
# IN UINTN Ecx
|
# IN UINTN Ecx
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmMwait)
|
.globl ASM_PFX(AsmMwait)
|
||||||
ASM_PFX(AsmMwait):
|
ASM_PFX(AsmMwait):
|
||||||
mov %ecx,%eax
|
mov %ecx,%eax
|
||||||
mov %edx,%ecx
|
mov %edx,%ecx
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadCr0)
|
.globl ASM_PFX(AsmReadCr0)
|
||||||
ASM_PFX(AsmReadCr0):
|
ASM_PFX(AsmReadCr0):
|
||||||
mov %cr0, %rax
|
mov %cr0, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadCr2)
|
.globl ASM_PFX(AsmReadCr2)
|
||||||
ASM_PFX(AsmReadCr2):
|
ASM_PFX(AsmReadCr2):
|
||||||
mov %cr2, %rax
|
mov %cr2, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadCr3)
|
.globl ASM_PFX(AsmReadCr3)
|
||||||
ASM_PFX(AsmReadCr3):
|
ASM_PFX(AsmReadCr3):
|
||||||
mov %cr3, %rax
|
mov %cr3, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadCr4)
|
.globl ASM_PFX(AsmReadCr4)
|
||||||
ASM_PFX(AsmReadCr4):
|
ASM_PFX(AsmReadCr4):
|
||||||
mov %cr4, %rax
|
mov %cr4, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadCs)
|
.globl ASM_PFX(AsmReadCs)
|
||||||
ASM_PFX(AsmReadCs):
|
ASM_PFX(AsmReadCs):
|
||||||
mov %cs, %eax
|
mov %cs, %eax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr0)
|
.globl ASM_PFX(AsmReadDr0)
|
||||||
ASM_PFX(AsmReadDr0):
|
ASM_PFX(AsmReadDr0):
|
||||||
mov %dr0, %rax
|
mov %dr0, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr1)
|
.globl ASM_PFX(AsmReadDr1)
|
||||||
ASM_PFX(AsmReadDr1):
|
ASM_PFX(AsmReadDr1):
|
||||||
mov %dr1, %rax
|
mov %dr1, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr2)
|
.globl ASM_PFX(AsmReadDr2)
|
||||||
ASM_PFX(AsmReadDr2):
|
ASM_PFX(AsmReadDr2):
|
||||||
mov %dr2, %rax
|
mov %dr2, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr3)
|
.globl ASM_PFX(AsmReadDr3)
|
||||||
ASM_PFX(AsmReadDr3):
|
ASM_PFX(AsmReadDr3):
|
||||||
mov %dr3, %rax
|
mov %dr3, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr4)
|
.globl ASM_PFX(AsmReadDr4)
|
||||||
ASM_PFX(AsmReadDr4):
|
ASM_PFX(AsmReadDr4):
|
||||||
#DB 0fh, 21h, 0e0h
|
#DB 0fh, 21h, 0e0h
|
||||||
mov %dr4, %rax
|
mov %dr4, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr5)
|
.globl ASM_PFX(AsmReadDr5)
|
||||||
ASM_PFX(AsmReadDr5):
|
ASM_PFX(AsmReadDr5):
|
||||||
mov %dr5, %rax
|
mov %dr5, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr6)
|
.globl ASM_PFX(AsmReadDr6)
|
||||||
ASM_PFX(AsmReadDr6):
|
ASM_PFX(AsmReadDr6):
|
||||||
mov %dr6, %rax
|
mov %dr6, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr7)
|
.globl ASM_PFX(AsmReadDr7)
|
||||||
ASM_PFX(AsmReadDr7):
|
ASM_PFX(AsmReadDr7):
|
||||||
mov %dr7, %rax
|
mov %dr7, %rax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDs)
|
.globl ASM_PFX(AsmReadDs)
|
||||||
ASM_PFX(AsmReadDs):
|
ASM_PFX(AsmReadDs):
|
||||||
movl %ds, %eax
|
movl %ds, %eax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadEflags)
|
.globl ASM_PFX(AsmReadEflags)
|
||||||
ASM_PFX(AsmReadEflags):
|
ASM_PFX(AsmReadEflags):
|
||||||
pushfq
|
pushfq
|
||||||
pop %rax
|
pop %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadEs)
|
.globl ASM_PFX(AsmReadEs)
|
||||||
ASM_PFX(AsmReadEs):
|
ASM_PFX(AsmReadEs):
|
||||||
mov %es, %eax
|
mov %es, %eax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadFs)
|
.globl ASM_PFX(AsmReadFs)
|
||||||
ASM_PFX(AsmReadFs):
|
ASM_PFX(AsmReadFs):
|
||||||
mov %fs, %eax
|
mov %fs, %eax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# OUT IA32_DESCRIPTOR *Gdtr
|
# OUT IA32_DESCRIPTOR *Gdtr
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86ReadGdtr)
|
.globl ASM_PFX(InternalX86ReadGdtr)
|
||||||
ASM_PFX(InternalX86ReadGdtr):
|
ASM_PFX(InternalX86ReadGdtr):
|
||||||
sgdt (%rcx)
|
sgdt (%rcx)
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadGs)
|
.globl ASM_PFX(AsmReadGs)
|
||||||
ASM_PFX(AsmReadGs):
|
ASM_PFX(AsmReadGs):
|
||||||
mov %gs, %eax
|
mov %gs, %eax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# OUT IA32_DESCRIPTOR *Idtr
|
# OUT IA32_DESCRIPTOR *Idtr
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86ReadIdtr)
|
.globl ASM_PFX(InternalX86ReadIdtr)
|
||||||
ASM_PFX(InternalX86ReadIdtr):
|
ASM_PFX(InternalX86ReadIdtr):
|
||||||
sidt (%rcx)
|
sidt (%rcx)
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadLdtr)
|
.globl ASM_PFX(AsmReadLdtr)
|
||||||
ASM_PFX(AsmReadLdtr):
|
ASM_PFX(AsmReadLdtr):
|
||||||
sldt %eax
|
sldt %eax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm0)
|
.globl ASM_PFX(AsmReadMm0)
|
||||||
ASM_PFX(AsmReadMm0):
|
ASM_PFX(AsmReadMm0):
|
||||||
#DB 48h, 0fh, 7eh, 0c0h
|
#DB 48h, 0fh, 7eh, 0c0h
|
||||||
movd %mm0, %rax
|
movd %mm0, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm1)
|
.globl ASM_PFX(AsmReadMm1)
|
||||||
ASM_PFX(AsmReadMm1):
|
ASM_PFX(AsmReadMm1):
|
||||||
#DB 48h, 0fh, 7eh, 0c8h
|
#DB 48h, 0fh, 7eh, 0c8h
|
||||||
movd %mm1, %rax
|
movd %mm1, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm2)
|
.globl ASM_PFX(AsmReadMm2)
|
||||||
ASM_PFX(AsmReadMm2):
|
ASM_PFX(AsmReadMm2):
|
||||||
#DB 48h, 0fh, 7eh, 0d0h
|
#DB 48h, 0fh, 7eh, 0d0h
|
||||||
movd %mm2, %rax
|
movd %mm2, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm3)
|
.globl ASM_PFX(AsmReadMm3)
|
||||||
ASM_PFX(AsmReadMm3):
|
ASM_PFX(AsmReadMm3):
|
||||||
#DB 48h, 0fh, 7eh, 0d8h
|
#DB 48h, 0fh, 7eh, 0d8h
|
||||||
movd %mm3, %rax
|
movd %mm3, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm4)
|
.globl ASM_PFX(AsmReadMm4)
|
||||||
ASM_PFX(AsmReadMm4):
|
ASM_PFX(AsmReadMm4):
|
||||||
#DB 48h, 0fh, 7eh, 0e0h
|
#DB 48h, 0fh, 7eh, 0e0h
|
||||||
movd %mm4, %rax
|
movd %mm4, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm5)
|
.globl ASM_PFX(AsmReadMm5)
|
||||||
ASM_PFX(AsmReadMm5):
|
ASM_PFX(AsmReadMm5):
|
||||||
#DB 48h, 0fh, 7eh, 0e8h
|
#DB 48h, 0fh, 7eh, 0e8h
|
||||||
movd %mm5, %rax
|
movd %mm5, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm6)
|
.globl ASM_PFX(AsmReadMm6)
|
||||||
ASM_PFX(AsmReadMm6):
|
ASM_PFX(AsmReadMm6):
|
||||||
#DB 48h, 0fh, 7eh, 0f0h
|
#DB 48h, 0fh, 7eh, 0f0h
|
||||||
movd %mm6, %rax
|
movd %mm6, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm7)
|
.globl ASM_PFX(AsmReadMm7)
|
||||||
ASM_PFX(AsmReadMm7):
|
ASM_PFX(AsmReadMm7):
|
||||||
#DB 48h, 0fh, 7eh, 0f8h
|
#DB 48h, 0fh, 7eh, 0f8h
|
||||||
movd %mm7, %rax
|
movd %mm7, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT32 Index
|
# IN UINT32 Index
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMsr64)
|
.globl ASM_PFX(AsmReadMsr64)
|
||||||
ASM_PFX(AsmReadMsr64):
|
ASM_PFX(AsmReadMsr64):
|
||||||
rdmsr # edx & eax are zero extended
|
rdmsr # edx & eax are zero extended
|
||||||
shl $0x20, %rdx
|
shl $0x20, %rdx
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT32 PmcIndex
|
# IN UINT32 PmcIndex
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadPmc)
|
.globl ASM_PFX(AsmReadPmc)
|
||||||
ASM_PFX(AsmReadPmc):
|
ASM_PFX(AsmReadPmc):
|
||||||
rdpmc
|
rdpmc
|
||||||
shl $0x20, %rdx
|
shl $0x20, %rdx
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadSs);
|
.globl ASM_PFX(AsmReadSs);
|
||||||
ASM_PFX(AsmReadSs):
|
ASM_PFX(AsmReadSs):
|
||||||
movl %ss, %eax
|
movl %ss, %eax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadTr)
|
.globl ASM_PFX(AsmReadTr)
|
||||||
ASM_PFX(AsmReadTr):
|
ASM_PFX(AsmReadTr):
|
||||||
str %eax
|
str %eax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadTsc)
|
.globl ASM_PFX(AsmReadTsc)
|
||||||
ASM_PFX(AsmReadTsc):
|
ASM_PFX(AsmReadTsc):
|
||||||
rdtsc
|
rdtsc
|
||||||
shl $0x20, %rdx
|
shl $0x20, %rdx
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#include <EdkIIGlueBase.h>
|
#include <EdkIIGlueBase.h>
|
||||||
.extern InternalAssertJumpBuffer;
|
.extern InternalAssertJumpBuffer;
|
||||||
.global ASM_PFX(SetJump)
|
.globl ASM_PFX(SetJump)
|
||||||
ASM_PFX(SetJump):
|
ASM_PFX(SetJump):
|
||||||
push %rcx
|
push %rcx
|
||||||
add $0xffffffffffffffe0,%rsp
|
add $0xffffffffffffffe0,%rsp
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
# None
|
# None
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalSwitchStack)
|
.globl ASM_PFX(InternalSwitchStack)
|
||||||
ASM_PFX(InternalSwitchStack):
|
ASM_PFX(InternalSwitchStack):
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
mov %rdx, %rcx
|
mov %rdx, %rcx
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWbinvd)
|
.globl ASM_PFX(AsmWbinvd)
|
||||||
ASM_PFX(AsmWbinvd):
|
ASM_PFX(AsmWbinvd):
|
||||||
wbinvd
|
wbinvd
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# UINTN Cr0
|
# UINTN Cr0
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteCr0)
|
.globl ASM_PFX(AsmWriteCr0)
|
||||||
ASM_PFX(AsmWriteCr0):
|
ASM_PFX(AsmWriteCr0):
|
||||||
mov %rcx,%cr0
|
mov %rcx,%cr0
|
||||||
mov %rcx,%rax
|
mov %rcx,%rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# UINTN Cr2
|
# UINTN Cr2
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteCr2)
|
.globl ASM_PFX(AsmWriteCr2)
|
||||||
ASM_PFX(AsmWriteCr2):
|
ASM_PFX(AsmWriteCr2):
|
||||||
mov %rcx,%cr2
|
mov %rcx,%cr2
|
||||||
mov %rcx,%rax
|
mov %rcx,%rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# UINTN Cr3
|
# UINTN Cr3
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteCr3)
|
.globl ASM_PFX(AsmWriteCr3)
|
||||||
ASM_PFX(AsmWriteCr3):
|
ASM_PFX(AsmWriteCr3):
|
||||||
mov %rcx,%cr3
|
mov %rcx,%cr3
|
||||||
mov %rcx,%rax
|
mov %rcx,%rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# UINTN Cr4
|
# UINTN Cr4
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteCr4)
|
.globl ASM_PFX(AsmWriteCr4)
|
||||||
ASM_PFX(AsmWriteCr4):
|
ASM_PFX(AsmWriteCr4):
|
||||||
mov %rcx,%cr4
|
mov %rcx,%cr4
|
||||||
mov %rcx,%rax
|
mov %rcx,%rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# UINTN Value
|
# UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr0)
|
.globl ASM_PFX(AsmWriteDr0)
|
||||||
ASM_PFX(AsmWriteDr0):
|
ASM_PFX(AsmWriteDr0):
|
||||||
mov %rcx, %dr0
|
mov %rcx, %dr0
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# UINTN Value
|
# UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr1)
|
.globl ASM_PFX(AsmWriteDr1)
|
||||||
ASM_PFX(AsmWriteDr1):
|
ASM_PFX(AsmWriteDr1):
|
||||||
mov %rcx, %dr1
|
mov %rcx, %dr1
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# UINTN Value
|
# UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr2)
|
.globl ASM_PFX(AsmWriteDr2)
|
||||||
ASM_PFX(AsmWriteDr2):
|
ASM_PFX(AsmWriteDr2):
|
||||||
mov %rcx, %dr2
|
mov %rcx, %dr2
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# UINTN Value
|
# UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr3)
|
.globl ASM_PFX(AsmWriteDr3)
|
||||||
ASM_PFX(AsmWriteDr3):
|
ASM_PFX(AsmWriteDr3):
|
||||||
mov %rcx, %dr3
|
mov %rcx, %dr3
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINTN Value
|
# IN UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr4)
|
.globl ASM_PFX(AsmWriteDr4)
|
||||||
ASM_PFX(AsmWriteDr4):
|
ASM_PFX(AsmWriteDr4):
|
||||||
mov %rcx, %dr4
|
mov %rcx, %dr4
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINTN Value
|
# IN UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr5)
|
.globl ASM_PFX(AsmWriteDr5)
|
||||||
ASM_PFX(AsmWriteDr5):
|
ASM_PFX(AsmWriteDr5):
|
||||||
mov %rcx, %dr5
|
mov %rcx, %dr5
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINTN Value
|
# IN UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr6)
|
.globl ASM_PFX(AsmWriteDr6)
|
||||||
ASM_PFX(AsmWriteDr6):
|
ASM_PFX(AsmWriteDr6):
|
||||||
mov %rcx, %dr6
|
mov %rcx, %dr6
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINTN Value
|
# IN UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr7)
|
.globl ASM_PFX(AsmWriteDr7)
|
||||||
ASM_PFX(AsmWriteDr7):
|
ASM_PFX(AsmWriteDr7):
|
||||||
mov %rcx, %dr7
|
mov %rcx, %dr7
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN CONST IA32_DESCRIPTOR *Idtr
|
# IN CONST IA32_DESCRIPTOR *Idtr
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86WriteGdtr)
|
.globl ASM_PFX(InternalX86WriteGdtr)
|
||||||
ASM_PFX(InternalX86WriteGdtr):
|
ASM_PFX(InternalX86WriteGdtr):
|
||||||
lgdt (%rcx)
|
lgdt (%rcx)
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN CONST IA32_DESCRIPTOR *Idtr
|
# IN CONST IA32_DESCRIPTOR *Idtr
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86WriteIdtr)
|
.globl ASM_PFX(InternalX86WriteIdtr)
|
||||||
ASM_PFX(InternalX86WriteIdtr):
|
ASM_PFX(InternalX86WriteIdtr):
|
||||||
lidt (%rcx)
|
lidt (%rcx)
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT16 Ldtr
|
# IN UINT16 Ldtr
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteLdtr);
|
.globl ASM_PFX(AsmWriteLdtr);
|
||||||
ASM_PFX(AsmWriteLdtr):
|
ASM_PFX(AsmWriteLdtr):
|
||||||
lldt %cx
|
lldt %cx
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm0);
|
.globl ASM_PFX(AsmWriteMm0);
|
||||||
ASM_PFX(AsmWriteMm0):
|
ASM_PFX(AsmWriteMm0):
|
||||||
movd %rcx, %xmm0
|
movd %rcx, %xmm0
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm1);
|
.globl ASM_PFX(AsmWriteMm1);
|
||||||
ASM_PFX(AsmWriteMm1):
|
ASM_PFX(AsmWriteMm1):
|
||||||
movd %rcx, %mm1
|
movd %rcx, %mm1
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm2)
|
.globl ASM_PFX(AsmWriteMm2)
|
||||||
ASM_PFX(AsmWriteMm2):
|
ASM_PFX(AsmWriteMm2):
|
||||||
movd %rcx, %mm2
|
movd %rcx, %mm2
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm3)
|
.globl ASM_PFX(AsmWriteMm3)
|
||||||
ASM_PFX(AsmWriteMm3):
|
ASM_PFX(AsmWriteMm3):
|
||||||
movd %rcx, %mm3
|
movd %rcx, %mm3
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm4)
|
.globl ASM_PFX(AsmWriteMm4)
|
||||||
ASM_PFX(AsmWriteMm4):
|
ASM_PFX(AsmWriteMm4):
|
||||||
movd %rcx, %mm4
|
movd %rcx, %mm4
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm5)
|
.globl ASM_PFX(AsmWriteMm5)
|
||||||
ASM_PFX(AsmWriteMm5):
|
ASM_PFX(AsmWriteMm5):
|
||||||
movd %rcx, %mm5
|
movd %rcx, %mm5
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm6)
|
.globl ASM_PFX(AsmWriteMm6)
|
||||||
ASM_PFX(AsmWriteMm6):
|
ASM_PFX(AsmWriteMm6):
|
||||||
movd %rcx, %mm6
|
movd %rcx, %mm6
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm7)
|
.globl ASM_PFX(AsmWriteMm7)
|
||||||
ASM_PFX(AsmWriteMm7):
|
ASM_PFX(AsmWriteMm7):
|
||||||
movd %rcx, %mm7
|
movd %rcx, %mm7
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
# );
|
# );
|
||||||
# TODO:
|
# TODO:
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMsr64)
|
.globl ASM_PFX(AsmWriteMsr64)
|
||||||
ASM_PFX(AsmWriteMsr64):
|
ASM_PFX(AsmWriteMsr64):
|
||||||
mov %rdx, %rax
|
mov %rdx, %rax
|
||||||
shr $0x20, %rdx
|
shr $0x20, %rdx
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
.code:
|
.code:
|
||||||
|
|
||||||
.global ASM_PFX(EfiCommonLibCopyMem)
|
.globl ASM_PFX(EfiCommonLibCopyMem)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# VOID
|
# VOID
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
.code:
|
.code:
|
||||||
|
|
||||||
.global ASM_PFX(EfiCommonLibCopyMem)
|
.globl ASM_PFX(EfiCommonLibCopyMem)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# VOID
|
# VOID
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
.code:
|
.code:
|
||||||
|
|
||||||
.global ASM_PFX(EfiCommonLibZeroMem)
|
.globl ASM_PFX(EfiCommonLibZeroMem)
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# VOID
|
# VOID
|
||||||
# EfiCommonLibZeroMem (
|
# EfiCommonLibZeroMem (
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
.globl ASM_PFX(SwitchStacks)
|
.globl ASM_PFX(SwitchStacks)
|
||||||
.globl ASM_PFX(SwitchIplStacks)
|
.globl ASM_PFX(SwitchIplStacks)
|
||||||
|
|
||||||
.equ EFI_SUCCESS, 0
|
#define EFI_SUCCESS 0
|
||||||
.equ EFI_WARN_RETURN_FROM_LONG_JUMP, 5
|
#define EFI_WARN_RETURN_FROM_LONG_JUMP 5
|
||||||
|
|
||||||
#
|
#
|
||||||
# typedef struct {
|
# typedef struct {
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
.section .rtcode, "ax", "progbits"
|
.section .rtcode, "ax", "progbits"
|
||||||
.align 32
|
.align 32
|
||||||
.type RtPioICacheFlush# ,@function
|
.type RtPioICacheFlush# ,@function
|
||||||
.global RtPioICacheFlush#
|
.globl RtPioICacheFlush#
|
||||||
// Function compile flags: /Ogsy
|
// Function compile flags: /Ogsy
|
||||||
.section .rtcode
|
.section .rtcode
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
.global ASM_PFX(SwitchStacks)
|
.globl ASM_PFX(SwitchStacks)
|
||||||
.global ASM_PFX(TransferControlSetJump)
|
.globl ASM_PFX(TransferControlSetJump)
|
||||||
.global ASM_PFX(TransferControlLongJump)
|
.globl ASM_PFX(TransferControlLongJump)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Routine Description:
|
# Routine Description:
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
.global ASM_PFX(AsmEfiSetBreakSupport)
|
.globl ASM_PFX(AsmEfiSetBreakSupport)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# VOID
|
# VOID
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
.code:
|
.code:
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
.global ASM_PFX(EfiCpuFlushCache)
|
.globl ASM_PFX(EfiCpuFlushCache)
|
||||||
|
|
||||||
#
|
#
|
||||||
#//
|
#//
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
//
|
//
|
||||||
// Exports
|
// Exports
|
||||||
//
|
//
|
||||||
.global GetEsalEntryPoint
|
.globl GetEsalEntryPoint
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
.global ASM_PFX(EfiCpuFlushCache)
|
.globl ASM_PFX(EfiCpuFlushCache)
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#EFI_STATUS
|
#EFI_STATUS
|
||||||
#EfiCpuFlushCache (
|
#EfiCpuFlushCache (
|
||||||
|
|
|
@ -73,7 +73,7 @@ ASM_PFX(Thunk16):
|
||||||
pop %ecx
|
pop %ecx
|
||||||
rep movsl %ds:(%esi),%es:(%edi) #; copy context to 16-bit stack
|
rep movsl %ds:(%esi),%es:(%edi) #; copy context to 16-bit stack
|
||||||
pop %ebx #; ebx <- 16-bit stack offset
|
pop %ebx #; ebx <- 16-bit stack offset
|
||||||
mov $L_Label1,%eax
|
mov $L_Lable1,%eax
|
||||||
stos %eax,%es:(%edi)
|
stos %eax,%es:(%edi)
|
||||||
movl %cs,%eax
|
movl %cs,%eax
|
||||||
stos %ax,%es:(%edi)
|
stos %ax,%es:(%edi)
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#include <EfiBind.h>
|
#include <EfiBind.h>
|
||||||
|
|
||||||
.global ASM_PFX(AsmFxSave)
|
.globl ASM_PFX(AsmFxSave)
|
||||||
.global ASM_PFX(AsmFxRestore)
|
.globl ASM_PFX(AsmFxRestore)
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue