mirror of https://github.com/acidanthera/audk.git
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/*:
Merge from edk2/MdePkg/Library/BaseLib to achieve better support for additional compilers. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5278 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e2955fba07
commit
3f8f7fa5ba
|
@ -23,264 +23,544 @@
|
|||
BASE_NAME = EdkIIGlueBaseLib
|
||||
COMPONENT_TYPE = LIBRARY
|
||||
|
||||
[sources.common]
|
||||
String.c
|
||||
LinkedList.c
|
||||
Cpu.c
|
||||
CpuDeadLoop.c
|
||||
BitField.c
|
||||
ARShiftU64.c
|
||||
DivS64x64Remainder.c
|
||||
DivU64x32.c
|
||||
DivU64x32Remainder.c
|
||||
DivU64x64Remainder.c
|
||||
GetPowerOfTwo32.c
|
||||
GetPowerOfTwo64.c
|
||||
HighBitSet32.c
|
||||
HighBitSet64.c
|
||||
LowBitSet32.c
|
||||
LowBitSet64.c
|
||||
LRotU32.c
|
||||
LRotU64.c
|
||||
LShiftU64.c
|
||||
ModU64x32.c
|
||||
MultS64x64.c
|
||||
MultU64x32.c
|
||||
MultU64x64.c
|
||||
RRotU32.c
|
||||
RRotU64.c
|
||||
RShiftU64.c
|
||||
SetJump.c
|
||||
LongJump.c
|
||||
SwapBytes16.c
|
||||
SwapBytes32.c
|
||||
SwapBytes64.c
|
||||
SwitchStack.c
|
||||
[Sources.common]
|
||||
CheckSum.c
|
||||
SwitchStack.c
|
||||
SwapBytes64.c
|
||||
SwapBytes32.c
|
||||
SwapBytes16.c
|
||||
LongJump.c
|
||||
SetJump.c
|
||||
RShiftU64.c
|
||||
RRotU64.c
|
||||
RRotU32.c
|
||||
MultU64x64.c
|
||||
MultU64x32.c
|
||||
MultS64x64.c
|
||||
ModU64x32.c
|
||||
LShiftU64.c
|
||||
LRotU64.c
|
||||
LRotU32.c
|
||||
LowBitSet64.c
|
||||
LowBitSet32.c
|
||||
HighBitSet64.c
|
||||
HighBitSet32.c
|
||||
GetPowerOfTwo64.c
|
||||
GetPowerOfTwo32.c
|
||||
DivU64x64Remainder.c
|
||||
DivU64x32Remainder.c
|
||||
DivU64x32.c
|
||||
DivS64x64Remainder.c
|
||||
ARShiftU64.c
|
||||
BitField.c
|
||||
CpuDeadLoop.c
|
||||
Cpu.c
|
||||
LinkedList.c
|
||||
String.c
|
||||
|
||||
[Sources.Ia32]
|
||||
Ia32/Wbinvd.c | MSFT
|
||||
Ia32/WriteMm7.c | MSFT
|
||||
Ia32/WriteMm6.c | MSFT
|
||||
Ia32/WriteMm5.c | MSFT
|
||||
Ia32/WriteMm4.c | MSFT
|
||||
Ia32/WriteMm3.c | MSFT
|
||||
Ia32/WriteMm2.c | MSFT
|
||||
Ia32/WriteMm1.c | MSFT
|
||||
Ia32/WriteMm0.c | MSFT
|
||||
Ia32/WriteLdtr.c | MSFT
|
||||
Ia32/WriteIdtr.c | MSFT
|
||||
Ia32/WriteGdtr.c | MSFT
|
||||
Ia32/WriteDr7.c | MSFT
|
||||
Ia32/WriteDr6.c | MSFT
|
||||
Ia32/WriteDr5.c | MSFT
|
||||
Ia32/WriteDr4.c | MSFT
|
||||
Ia32/WriteDr3.c | MSFT
|
||||
Ia32/WriteDr2.c | MSFT
|
||||
Ia32/WriteDr1.c | MSFT
|
||||
Ia32/WriteDr0.c | MSFT
|
||||
Ia32/WriteCr4.c | MSFT
|
||||
Ia32/WriteCr3.c | MSFT
|
||||
Ia32/WriteCr2.c | MSFT
|
||||
Ia32/WriteCr0.c | MSFT
|
||||
Ia32/WriteMsr64.c | MSFT
|
||||
Ia32/SwapBytes64.c | MSFT
|
||||
Ia32/SetJump.c | MSFT
|
||||
Ia32/RRotU64.c | MSFT
|
||||
Ia32/RShiftU64.c | MSFT
|
||||
Ia32/ReadPmc.c | MSFT
|
||||
Ia32/ReadTsc.c | MSFT
|
||||
Ia32/ReadLdtr.c | MSFT
|
||||
Ia32/ReadIdtr.c | MSFT
|
||||
Ia32/ReadGdtr.c | MSFT
|
||||
Ia32/ReadTr.c | MSFT
|
||||
Ia32/ReadSs.c | MSFT
|
||||
Ia32/ReadGs.c | MSFT
|
||||
Ia32/ReadFs.c | MSFT
|
||||
Ia32/ReadEs.c | MSFT
|
||||
Ia32/ReadDs.c | MSFT
|
||||
Ia32/ReadCs.c | MSFT
|
||||
Ia32/ReadMsr64.c | MSFT
|
||||
Ia32/ReadMm7.c | MSFT
|
||||
Ia32/ReadMm6.c | MSFT
|
||||
Ia32/ReadMm5.c | MSFT
|
||||
Ia32/ReadMm4.c | MSFT
|
||||
Ia32/ReadMm3.c | MSFT
|
||||
Ia32/ReadMm2.c | MSFT
|
||||
Ia32/ReadMm1.c | MSFT
|
||||
Ia32/ReadMm0.c | MSFT
|
||||
Ia32/ReadEflags.c | MSFT
|
||||
Ia32/ReadDr7.c | MSFT
|
||||
Ia32/ReadDr6.c | MSFT
|
||||
Ia32/ReadDr5.c | MSFT
|
||||
Ia32/ReadDr4.c | MSFT
|
||||
Ia32/ReadDr3.c | MSFT
|
||||
Ia32/ReadDr2.c | MSFT
|
||||
Ia32/ReadDr1.c | MSFT
|
||||
Ia32/ReadDr0.c | MSFT
|
||||
Ia32/ReadCr4.c | MSFT
|
||||
Ia32/ReadCr3.c | MSFT
|
||||
Ia32/ReadCr2.c | MSFT
|
||||
Ia32/ReadCr0.c | MSFT
|
||||
Ia32/Mwait.c | MSFT
|
||||
Ia32/Monitor.c | MSFT
|
||||
Ia32/ModU64x32.c | MSFT
|
||||
Ia32/MultU64x64.c | MSFT
|
||||
Ia32/MultU64x32.c | MSFT
|
||||
Ia32/LShiftU64.c | MSFT
|
||||
Ia32/LRotU64.c | MSFT
|
||||
Ia32/LongJump.c | MSFT
|
||||
Ia32/Invd.c | MSFT
|
||||
Ia32/InterlockedCompareExchange64.c | MSFT
|
||||
Ia32/InterlockedCompareExchange32.c | MSFT
|
||||
Ia32/InterlockedDecrement.c | MSFT
|
||||
Ia32/InterlockedIncrement.c | MSFT
|
||||
Ia32/FxRestore.c | MSFT
|
||||
Ia32/FxSave.c | MSFT
|
||||
Ia32/FlushCacheLine.c | MSFT
|
||||
Ia32/EnablePaging32.c | MSFT
|
||||
Ia32/EnableInterrupts.c | MSFT
|
||||
Ia32/EnableDisableInterrupts.c | MSFT
|
||||
Ia32/DivU64x64Remainder.asm | MSFT
|
||||
Ia32/DivU64x32Remainder.c | MSFT
|
||||
Ia32/DivU64x32.c | MSFT
|
||||
Ia32/DisablePaging32.c | MSFT
|
||||
Ia32/DisableInterrupts.c | MSFT
|
||||
Ia32/CpuPause.c | MSFT
|
||||
Ia32/CpuIdEx.c | MSFT
|
||||
Ia32/CpuId.c | MSFT
|
||||
Ia32/CpuBreakpoint.c | MSFT
|
||||
Ia32/ARShiftU64.c | MSFT
|
||||
SynchronizationMsc.c | MSFT
|
||||
|
||||
Ia32/Wbinvd.asm | INTEL
|
||||
Ia32/WriteMm7.asm | INTEL
|
||||
Ia32/WriteMm6.asm | INTEL
|
||||
Ia32/WriteMm5.asm | INTEL
|
||||
Ia32/WriteMm4.asm | INTEL
|
||||
Ia32/WriteMm3.asm | INTEL
|
||||
Ia32/WriteMm2.asm | INTEL
|
||||
Ia32/WriteMm1.asm | INTEL
|
||||
Ia32/WriteMm0.asm | INTEL
|
||||
Ia32/WriteLdtr.asm | INTEL
|
||||
Ia32/WriteIdtr.asm | INTEL
|
||||
Ia32/WriteGdtr.asm | INTEL
|
||||
Ia32/WriteDr7.asm | INTEL
|
||||
Ia32/WriteDr6.asm | INTEL
|
||||
Ia32/WriteDr5.asm | INTEL
|
||||
Ia32/WriteDr4.asm | INTEL
|
||||
Ia32/WriteDr3.asm | INTEL
|
||||
Ia32/WriteDr2.asm | INTEL
|
||||
Ia32/WriteDr1.asm | INTEL
|
||||
Ia32/WriteDr0.asm | INTEL
|
||||
Ia32/WriteCr4.asm | INTEL
|
||||
Ia32/WriteCr3.asm | INTEL
|
||||
Ia32/WriteCr2.asm | INTEL
|
||||
Ia32/WriteCr0.asm | INTEL
|
||||
Ia32/WriteMsr64.asm | INTEL
|
||||
Ia32/SwapBytes64.asm | INTEL
|
||||
Ia32/SetJump.asm | INTEL
|
||||
Ia32/RRotU64.asm | INTEL
|
||||
Ia32/RShiftU64.asm | INTEL
|
||||
Ia32/ReadPmc.asm | INTEL
|
||||
Ia32/ReadTsc.asm | INTEL
|
||||
Ia32/ReadLdtr.asm | INTEL
|
||||
Ia32/ReadIdtr.asm | INTEL
|
||||
Ia32/ReadGdtr.asm | INTEL
|
||||
Ia32/ReadTr.asm | INTEL
|
||||
Ia32/ReadSs.asm | INTEL
|
||||
Ia32/ReadGs.asm | INTEL
|
||||
Ia32/ReadFs.asm | INTEL
|
||||
Ia32/ReadEs.asm | INTEL
|
||||
Ia32/ReadDs.asm | INTEL
|
||||
Ia32/ReadCs.asm | INTEL
|
||||
Ia32/ReadMsr64.asm | INTEL
|
||||
Ia32/ReadMm7.asm | INTEL
|
||||
Ia32/ReadMm6.asm | INTEL
|
||||
Ia32/ReadMm5.asm | INTEL
|
||||
Ia32/ReadMm4.asm | INTEL
|
||||
Ia32/ReadMm3.asm | INTEL
|
||||
Ia32/ReadMm2.asm | INTEL
|
||||
Ia32/ReadMm1.asm | INTEL
|
||||
Ia32/ReadMm0.asm | INTEL
|
||||
Ia32/ReadEflags.asm | INTEL
|
||||
Ia32/ReadDr7.asm | INTEL
|
||||
Ia32/ReadDr6.asm | INTEL
|
||||
Ia32/ReadDr5.asm | INTEL
|
||||
Ia32/ReadDr4.asm | INTEL
|
||||
Ia32/ReadDr3.asm | INTEL
|
||||
Ia32/ReadDr2.asm | INTEL
|
||||
Ia32/ReadDr1.asm | INTEL
|
||||
Ia32/ReadDr0.asm | INTEL
|
||||
Ia32/ReadCr4.asm | INTEL
|
||||
Ia32/ReadCr3.asm | INTEL
|
||||
Ia32/ReadCr2.asm | INTEL
|
||||
Ia32/ReadCr0.asm | INTEL
|
||||
Ia32/Mwait.asm | INTEL
|
||||
Ia32/Monitor.asm | INTEL
|
||||
Ia32/ModU64x32.asm | INTEL
|
||||
Ia32/MultU64x64.asm | INTEL
|
||||
Ia32/MultU64x32.asm | INTEL
|
||||
Ia32/LShiftU64.asm | INTEL
|
||||
Ia32/LRotU64.asm | INTEL
|
||||
Ia32/LongJump.asm | INTEL
|
||||
Ia32/Invd.asm | INTEL
|
||||
Ia32/InterlockedCompareExchange64.asm | INTEL
|
||||
Ia32/InterlockedCompareExchange32.asm | INTEL
|
||||
Ia32/InterlockedDecrement.asm | INTEL
|
||||
Ia32/InterlockedIncrement.asm | INTEL
|
||||
Ia32/FxRestore.asm | INTEL
|
||||
Ia32/FxSave.asm | INTEL
|
||||
Ia32/FlushCacheLine.asm | INTEL
|
||||
Ia32/EnablePaging32.asm | INTEL
|
||||
Ia32/EnableInterrupts.asm | INTEL
|
||||
Ia32/EnableDisableInterrupts.asm | INTEL
|
||||
Ia32/DivU64x64Remainder.asm | INTEL
|
||||
Ia32/DivU64x32Remainder.asm | INTEL
|
||||
Ia32/DivU64x32.asm | INTEL
|
||||
Ia32/DisablePaging32.asm | INTEL
|
||||
Ia32/DisableInterrupts.asm | INTEL
|
||||
Ia32/CpuPause.asm | INTEL
|
||||
Ia32/CpuIdEx.asm | INTEL
|
||||
Ia32/CpuId.asm | INTEL
|
||||
Ia32/CpuBreakpoint.asm | INTEL
|
||||
Ia32/ARShiftU64.asm | INTEL
|
||||
Synchronization.c | INTEL
|
||||
|
||||
[sources.ia32]
|
||||
SynchronizationMsc.c
|
||||
x86DisablePaging32.c
|
||||
x86DisablePaging64.c
|
||||
x86EnablePaging32.c
|
||||
x86EnablePaging64.c
|
||||
x86FxRestore.c
|
||||
x86FxSave.c
|
||||
x86GetInterruptState.c
|
||||
x86MemoryFence.c
|
||||
x86Msr.c
|
||||
x86ReadGdtr.c
|
||||
x86ReadIdtr.c
|
||||
x86Thunk.c
|
||||
x86WriteGdtr.c
|
||||
x86WriteIdtr.c
|
||||
Unaligned.c
|
||||
Ia32/Non-existing.c
|
||||
Ia32/InternalSwitchStack.c
|
||||
Ia32/DivS64x64Remainder.c
|
||||
Ia32/ARShiftU64.c
|
||||
Ia32/CpuBreakpoint.c
|
||||
Ia32/CpuFlushTlb.c
|
||||
Ia32/CpuSleep.c
|
||||
Ia32/CpuId.c
|
||||
Ia32/CpuIdEx.c
|
||||
Ia32/CpuPause.c
|
||||
Ia32/DisableInterrupts.c
|
||||
Ia32/DisablePaging32.c
|
||||
Ia32/DivU64x32.c
|
||||
Ia32/DivU64x32Remainder.c
|
||||
Ia32/DivU64x64Remainder.c
|
||||
Ia32/EnableDisableInterrupts.c
|
||||
Ia32/EnableInterrupts.c
|
||||
Ia32/EnablePaging32.c
|
||||
Ia32/EnablePaging64.asm
|
||||
Ia32/FlushCacheLine.c
|
||||
Ia32/FxSave.c
|
||||
Ia32/FxRestore.c
|
||||
Ia32/InterlockedIncrement.c
|
||||
Ia32/InterlockedDecrement.c
|
||||
Ia32/InterlockedCompareExchange32.c
|
||||
Ia32/InterlockedCompareExchange64.c
|
||||
Ia32/Invd.c
|
||||
Ia32/LongJump.c
|
||||
Ia32/LRotU64.c
|
||||
Ia32/LShiftU64.c
|
||||
Ia32/MultU64x32.c
|
||||
Ia32/MultU64x64.c
|
||||
Ia32/ModU64x32.c
|
||||
Ia32/Monitor.c
|
||||
Ia32/Mwait.c
|
||||
Ia32/ReadCr0.c
|
||||
Ia32/ReadCr2.c
|
||||
Ia32/ReadCr3.c
|
||||
Ia32/ReadCr4.c
|
||||
Ia32/ReadDr0.c
|
||||
Ia32/ReadDr1.c
|
||||
Ia32/ReadDr2.c
|
||||
Ia32/ReadDr3.c
|
||||
Ia32/ReadDr4.c
|
||||
Ia32/ReadDr5.c
|
||||
Ia32/ReadDr6.c
|
||||
Ia32/ReadDr7.c
|
||||
Ia32/ReadEflags.c
|
||||
Ia32/ReadMm0.c
|
||||
Ia32/ReadMm1.c
|
||||
Ia32/ReadMm2.c
|
||||
Ia32/ReadMm3.c
|
||||
Ia32/ReadMm4.c
|
||||
Ia32/ReadMm5.c
|
||||
Ia32/ReadMm6.c
|
||||
Ia32/ReadMm7.c
|
||||
Ia32/ReadMsr64.c
|
||||
Ia32/ReadCs.c
|
||||
Ia32/ReadDs.c
|
||||
Ia32/ReadEs.c
|
||||
Ia32/ReadFs.c
|
||||
Ia32/ReadGs.c
|
||||
Ia32/ReadSs.c
|
||||
Ia32/ReadTr.c
|
||||
Ia32/ReadGdtr.c
|
||||
Ia32/ReadIdtr.c
|
||||
Ia32/ReadLdtr.c
|
||||
Ia32/ReadTsc.c
|
||||
Ia32/ReadPmc.c
|
||||
Ia32/RShiftU64.c
|
||||
Ia32/RRotU64.c
|
||||
Ia32/SetJump.c
|
||||
Ia32/SwapBytes64.c
|
||||
Ia32/Thunk16.asm
|
||||
Ia32/WriteMsr64.c
|
||||
Ia32/WriteCr0.c
|
||||
Ia32/WriteCr2.c
|
||||
Ia32/WriteCr3.c
|
||||
Ia32/WriteCr4.c
|
||||
Ia32/WriteDr0.c
|
||||
Ia32/WriteDr1.c
|
||||
Ia32/WriteDr2.c
|
||||
Ia32/WriteDr3.c
|
||||
Ia32/WriteDr4.c
|
||||
Ia32/WriteDr5.c
|
||||
Ia32/WriteDr6.c
|
||||
Ia32/WriteDr7.c
|
||||
Ia32/WriteGdtr.c
|
||||
Ia32/WriteIdtr.c
|
||||
Ia32/WriteLdtr.c
|
||||
Ia32/WriteMm0.c
|
||||
Ia32/WriteMm1.c
|
||||
Ia32/WriteMm2.c
|
||||
Ia32/WriteMm3.c
|
||||
Ia32/WriteMm4.c
|
||||
Ia32/WriteMm5.c
|
||||
Ia32/WriteMm6.c
|
||||
Ia32/WriteMm7.c
|
||||
Ia32/Wbinvd.c
|
||||
Ia32/EnablePaging64.asm
|
||||
|
||||
Ia32/Thunk16.S | GCC
|
||||
Ia32/CpuBreakpoint.S | GCC
|
||||
Ia32/CpuPause.S | GCC
|
||||
Ia32/EnableDisableInterrupts.S | GCC
|
||||
Ia32/DisableInterrupts.S | GCC
|
||||
Ia32/EnableInterrupts.S | GCC
|
||||
Ia32/InterlockedCompareExchange64.S | GCC
|
||||
Ia32/InterlockedCompareExchange32.S | GCC
|
||||
Ia32/InterlockedDecrement.S | GCC
|
||||
Ia32/InterlockedIncrement.S | GCC
|
||||
Ia32/FlushCacheLine.S | GCC
|
||||
Ia32/Invd.S | GCC
|
||||
Ia32/Wbinvd.S | GCC
|
||||
Ia32/EnablePaging64.S | GCC
|
||||
Ia32/DisablePaging32.S | GCC
|
||||
Ia32/EnablePaging32.S | GCC
|
||||
Ia32/Mwait.S | GCC
|
||||
Ia32/Monitor.S | GCC
|
||||
Ia32/ReadPmc.S | GCC
|
||||
Ia32/ReadTsc.S | GCC
|
||||
Ia32/WriteMm7.S | GCC
|
||||
Ia32/WriteMm6.S | GCC
|
||||
Ia32/WriteMm5.S | GCC
|
||||
Ia32/WriteMm4.S | GCC
|
||||
Ia32/WriteMm3.S | GCC
|
||||
Ia32/WriteMm2.S | GCC
|
||||
Ia32/WriteMm1.S | GCC
|
||||
Ia32/WriteMm0.S | GCC
|
||||
Ia32/ReadMm7.S | GCC
|
||||
Ia32/ReadMm6.S | GCC
|
||||
Ia32/ReadMm5.S | GCC
|
||||
Ia32/ReadMm4.S | GCC
|
||||
Ia32/ReadMm3.S | GCC
|
||||
Ia32/ReadMm2.S | GCC
|
||||
Ia32/ReadMm1.S | GCC
|
||||
Ia32/ReadMm0.S | GCC
|
||||
Ia32/FxRestore.S | GCC
|
||||
Ia32/FxSave.S | GCC
|
||||
Ia32/WriteLdtr.S | GCC
|
||||
Ia32/ReadLdtr.S | GCC
|
||||
Ia32/WriteIdtr.S | GCC
|
||||
Ia32/ReadIdtr.S | GCC
|
||||
Ia32/WriteGdtr.S | GCC
|
||||
Ia32/ReadGdtr.S | GCC
|
||||
Ia32/ReadTr.S | GCC
|
||||
Ia32/ReadSs.S | GCC
|
||||
Ia32/ReadGs.S | GCC
|
||||
Ia32/ReadFs.S | GCC
|
||||
Ia32/ReadEs.S | GCC
|
||||
Ia32/ReadDs.S | GCC
|
||||
Ia32/ReadCs.S | GCC
|
||||
Ia32/WriteDr7.S | GCC
|
||||
Ia32/WriteDr6.S | GCC
|
||||
Ia32/WriteDr5.S | GCC
|
||||
Ia32/WriteDr4.S | GCC
|
||||
Ia32/WriteDr3.S | GCC
|
||||
Ia32/WriteDr2.S | GCC
|
||||
Ia32/WriteDr1.S | GCC
|
||||
Ia32/WriteDr0.S | GCC
|
||||
Ia32/ReadDr7.S | GCC
|
||||
Ia32/ReadDr6.S | GCC
|
||||
Ia32/ReadDr5.S | GCC
|
||||
Ia32/ReadDr4.S | GCC
|
||||
Ia32/ReadDr3.S | GCC
|
||||
Ia32/ReadDr2.S | GCC
|
||||
Ia32/ReadDr1.S | GCC
|
||||
Ia32/ReadDr0.S | GCC
|
||||
Ia32/WriteCr4.S | GCC
|
||||
Ia32/WriteCr3.S | GCC
|
||||
Ia32/WriteCr2.S | GCC
|
||||
Ia32/WriteCr0.S | GCC
|
||||
Ia32/ReadCr4.S | GCC
|
||||
Ia32/ReadCr3.S | GCC
|
||||
Ia32/ReadCr2.S | GCC
|
||||
Ia32/ReadCr0.S | GCC
|
||||
Ia32/WriteMsr64.S | GCC
|
||||
Ia32/ReadMsr64.S | GCC
|
||||
Ia32/ReadEflags.S | GCC
|
||||
Ia32/CpuIdEx.S | GCC
|
||||
Ia32/CpuId.S | GCC
|
||||
Ia32/LongJump.S | GCC
|
||||
Ia32/SetJump.S | GCC
|
||||
Ia32/SwapBytes64.S | GCC
|
||||
Ia32/DivU64x64Remainder.S | GCC
|
||||
Ia32/DivU64x32Remainder.S | GCC
|
||||
Ia32/ModU64x32.S | GCC
|
||||
Ia32/DivU64x32.S | GCC
|
||||
Ia32/MultU64x64.S | GCC
|
||||
Ia32/MultU64x32.S | GCC
|
||||
Ia32/RRotU64.S | GCC
|
||||
Ia32/LRotU64.S | GCC
|
||||
Ia32/ARShiftU64.S | GCC
|
||||
Ia32/RShiftU64.S | GCC
|
||||
Ia32/LShiftU64.S | GCC
|
||||
SynchronizationGcc.c | GCC
|
||||
|
||||
[sources.x64]
|
||||
SynchronizationMsc.c
|
||||
x86DisablePaging32.c
|
||||
x86DisablePaging64.c
|
||||
x86EnablePaging32.c
|
||||
x86EnablePaging64.c
|
||||
x86FxRestore.c
|
||||
x86FxSave.c
|
||||
x86GetInterruptState.c
|
||||
x86MemoryFence.c
|
||||
x86Msr.c
|
||||
x86ReadGdtr.c
|
||||
x86ReadIdtr.c
|
||||
x86Thunk.c
|
||||
x86WriteGdtr.c
|
||||
x86WriteIdtr.c
|
||||
Ia32/DivS64x64Remainder.c
|
||||
Ia32/InternalSwitchStack.c
|
||||
Ia32/Non-existing.c
|
||||
Unaligned.c
|
||||
Math64.c
|
||||
X64/Non-existing.c
|
||||
X64/SwitchStack.asm
|
||||
X64/SetJump.asm
|
||||
X64/LongJump.asm
|
||||
X64/CpuId.asm
|
||||
X64/CpuIdEx.asm
|
||||
X64/ReadEflags.asm
|
||||
X64/ReadMsr64.c
|
||||
X64/WriteMsr64.c
|
||||
X64/ReadCr0.asm
|
||||
X64/ReadCr2.asm
|
||||
X64/ReadCr3.asm
|
||||
X64/ReadCr4.asm
|
||||
X64/WriteCr0.asm
|
||||
X64/WriteCr2.asm
|
||||
X64/WriteCr3.asm
|
||||
X64/WriteCr4.asm
|
||||
X64/ReadDr0.asm
|
||||
X64/ReadDr1.asm
|
||||
X64/ReadDr2.asm
|
||||
X64/ReadDr3.asm
|
||||
X64/ReadDr4.asm
|
||||
X64/ReadDr5.asm
|
||||
X64/ReadDr6.asm
|
||||
X64/ReadDr7.asm
|
||||
X64/WriteDr0.asm
|
||||
X64/WriteDr1.asm
|
||||
X64/WriteDr2.asm
|
||||
X64/WriteDr3.asm
|
||||
X64/WriteDr4.asm
|
||||
X64/WriteDr5.asm
|
||||
X64/WriteDr6.asm
|
||||
X64/WriteDr7.asm
|
||||
X64/ReadCs.asm
|
||||
X64/ReadDs.asm
|
||||
X64/ReadEs.asm
|
||||
X64/ReadFs.asm
|
||||
X64/ReadGs.asm
|
||||
X64/ReadSs.asm
|
||||
X64/ReadTr.asm
|
||||
X64/ReadGdtr.asm
|
||||
X64/WriteGdtr.asm
|
||||
X64/ReadIdtr.asm
|
||||
X64/WriteIdtr.asm
|
||||
X64/ReadLdtr.asm
|
||||
X64/WriteLdtr.asm
|
||||
X64/FxSave.asm
|
||||
X64/FxRestore.asm
|
||||
X64/ReadMm0.asm
|
||||
X64/ReadMm1.asm
|
||||
X64/ReadMm2.asm
|
||||
X64/ReadMm3.asm
|
||||
X64/ReadMm4.asm
|
||||
X64/ReadMm5.asm
|
||||
X64/ReadMm6.asm
|
||||
X64/ReadMm7.asm
|
||||
X64/WriteMm0.asm
|
||||
X64/WriteMm1.asm
|
||||
X64/WriteMm2.asm
|
||||
X64/WriteMm3.asm
|
||||
X64/WriteMm4.asm
|
||||
X64/WriteMm5.asm
|
||||
X64/WriteMm6.asm
|
||||
X64/WriteMm7.asm
|
||||
X64/ReadTsc.asm
|
||||
X64/ReadPmc.asm
|
||||
X64/Monitor.asm
|
||||
X64/Mwait.asm
|
||||
X64/EnablePaging64.asm
|
||||
X64/DisablePaging64.asm
|
||||
X64/Wbinvd.asm
|
||||
X64/Invd.asm
|
||||
X64/FlushCacheLine.asm
|
||||
X64/InterlockedIncrement.c
|
||||
X64/InterlockedDecrement.c
|
||||
X64/InterlockedCompareExchange32.asm
|
||||
X64/InterlockedCompareExchange64.asm
|
||||
X64/EnableInterrupts.asm
|
||||
X64/DisableInterrupts.asm
|
||||
X64/EnableDisableInterrupts.asm
|
||||
X64/CpuSleep.asm
|
||||
X64/CpuPause.asm
|
||||
X64/CpuBreakpoint.c
|
||||
X64/CpuFlushTlb.asm
|
||||
X64/Thunk16.asm
|
||||
x86WriteIdtr.c
|
||||
x86WriteGdtr.c
|
||||
x86Thunk.c
|
||||
x86ReadIdtr.c
|
||||
x86ReadGdtr.c
|
||||
x86Msr.c
|
||||
x86MemoryFence.c
|
||||
x86GetInterruptState.c
|
||||
x86FxSave.c
|
||||
x86FxRestore.c
|
||||
x86EnablePaging64.c
|
||||
x86EnablePaging32.c
|
||||
x86DisablePaging64.c
|
||||
x86DisablePaging32.c
|
||||
|
||||
[sources.ipf]
|
||||
[Sources.X64]
|
||||
X64/Thunk16.asm
|
||||
X64/CpuPause.asm
|
||||
X64/EnableDisableInterrupts.asm
|
||||
X64/DisableInterrupts.asm
|
||||
X64/EnableInterrupts.asm
|
||||
X64/FlushCacheLine.asm
|
||||
X64/Invd.asm
|
||||
X64/Wbinvd.asm
|
||||
X64/DisablePaging64.asm
|
||||
X64/EnablePaging64.asm
|
||||
X64/Mwait.asm
|
||||
X64/Monitor.asm
|
||||
X64/ReadPmc.asm
|
||||
X64/ReadTsc.asm
|
||||
X64/WriteMm7.asm
|
||||
X64/WriteMm6.asm
|
||||
X64/WriteMm5.asm
|
||||
X64/WriteMm4.asm
|
||||
X64/WriteMm3.asm
|
||||
X64/WriteMm2.asm
|
||||
X64/WriteMm1.asm
|
||||
X64/WriteMm0.asm
|
||||
X64/ReadMm7.asm
|
||||
X64/ReadMm6.asm
|
||||
X64/ReadMm5.asm
|
||||
X64/ReadMm4.asm
|
||||
X64/ReadMm3.asm
|
||||
X64/ReadMm2.asm
|
||||
X64/ReadMm1.asm
|
||||
X64/ReadMm0.asm
|
||||
X64/FxRestore.asm
|
||||
X64/FxSave.asm
|
||||
X64/WriteLdtr.asm
|
||||
X64/ReadLdtr.asm
|
||||
X64/WriteIdtr.asm
|
||||
X64/ReadIdtr.asm
|
||||
X64/WriteGdtr.asm
|
||||
X64/ReadGdtr.asm
|
||||
X64/ReadTr.asm
|
||||
X64/ReadSs.asm
|
||||
X64/ReadGs.asm
|
||||
X64/ReadFs.asm
|
||||
X64/ReadEs.asm
|
||||
X64/ReadDs.asm
|
||||
X64/ReadCs.asm
|
||||
X64/WriteDr7.asm
|
||||
X64/WriteDr6.asm
|
||||
X64/WriteDr5.asm
|
||||
X64/WriteDr4.asm
|
||||
X64/WriteDr3.asm
|
||||
X64/WriteDr2.asm
|
||||
X64/WriteDr1.asm
|
||||
X64/WriteDr0.asm
|
||||
X64/ReadDr7.asm
|
||||
X64/ReadDr6.asm
|
||||
X64/ReadDr5.asm
|
||||
X64/ReadDr4.asm
|
||||
X64/ReadDr3.asm
|
||||
X64/ReadDr2.asm
|
||||
X64/ReadDr1.asm
|
||||
X64/ReadDr0.asm
|
||||
X64/WriteCr4.asm
|
||||
X64/WriteCr3.asm
|
||||
X64/WriteCr2.asm
|
||||
X64/WriteCr0.asm
|
||||
X64/ReadCr4.asm
|
||||
X64/ReadCr3.asm
|
||||
X64/ReadCr2.asm
|
||||
X64/ReadCr0.asm
|
||||
X64/ReadEflags.asm
|
||||
X64/CpuIdEx.asm
|
||||
X64/CpuId.asm
|
||||
X64/LongJump.asm
|
||||
X64/SetJump.asm
|
||||
X64/SwitchStack.asm
|
||||
X64/InterlockedCompareExchange64.asm
|
||||
X64/InterlockedCompareExchange32.asm
|
||||
|
||||
X64/InterlockedDecrement.c | MSFT
|
||||
X64/InterlockedIncrement.c | MSFT
|
||||
X64/CpuBreakpoint.c | MSFT
|
||||
X64/WriteMsr64.c | MSFT
|
||||
X64/ReadMsr64.c | MSFT
|
||||
SynchronizationMsc.c | MSFT
|
||||
|
||||
X64/InterlockedDecrement.asm | INTEL
|
||||
X64/InterlockedIncrement.asm | INTEL
|
||||
X64/CpuBreakpoint.asm | INTEL
|
||||
X64/WriteMsr64.asm | INTEL
|
||||
X64/ReadMsr64.asm | INTEL
|
||||
Synchronization.c | INTEL
|
||||
|
||||
X64/Non-existing.c
|
||||
Math64.c
|
||||
Unaligned.c
|
||||
x86WriteIdtr.c
|
||||
x86WriteGdtr.c
|
||||
x86Thunk.c
|
||||
x86ReadIdtr.c
|
||||
x86ReadGdtr.c
|
||||
x86Msr.c
|
||||
x86MemoryFence.c
|
||||
x86GetInterruptState.c
|
||||
x86FxSave.c
|
||||
x86FxRestore.c
|
||||
x86EnablePaging64.c
|
||||
x86EnablePaging32.c
|
||||
x86DisablePaging64.c
|
||||
x86DisablePaging32.c
|
||||
X64/WriteMsr64.S | GCC
|
||||
X64/WriteMm7.S | GCC
|
||||
X64/WriteMm6.S | GCC
|
||||
X64/WriteMm5.S | GCC
|
||||
X64/WriteMm4.S | GCC
|
||||
X64/WriteMm3.S | GCC
|
||||
X64/WriteMm2.S | GCC
|
||||
X64/WriteMm1.S | GCC
|
||||
X64/WriteMm0.S | GCC
|
||||
X64/WriteLdtr.S | GCC
|
||||
X64/WriteIdtr.S | GCC
|
||||
X64/WriteGdtr.S | GCC
|
||||
X64/WriteDr7.S | GCC
|
||||
X64/WriteDr6.S | GCC
|
||||
X64/WriteDr5.S | GCC
|
||||
X64/WriteDr4.S | GCC
|
||||
X64/WriteDr3.S | GCC
|
||||
X64/WriteDr2.S | GCC
|
||||
X64/WriteDr1.S | GCC
|
||||
X64/WriteDr0.S | GCC
|
||||
X64/WriteCr4.S | GCC
|
||||
X64/WriteCr3.S | GCC
|
||||
X64/WriteCr2.S | GCC
|
||||
X64/WriteCr0.S | GCC
|
||||
X64/Wbinvd.S | GCC
|
||||
X64/Thunk16.S | GCC
|
||||
X64/SwitchStack.S | GCC
|
||||
X64/SetJump.S | GCC
|
||||
X64/ReadTsc.S | GCC
|
||||
X64/ReadTr.S | GCC
|
||||
X64/ReadSs.S | GCC
|
||||
X64/ReadPmc.S | GCC
|
||||
X64/ReadMsr64.S | GCC
|
||||
X64/ReadMm7.S | GCC
|
||||
X64/ReadMm6.S | GCC
|
||||
X64/ReadMm5.S | GCC
|
||||
X64/ReadMm4.S | GCC
|
||||
X64/ReadMm3.S | GCC
|
||||
X64/ReadMm2.S | GCC
|
||||
X64/ReadMm1.S | GCC
|
||||
X64/ReadMm0.S | GCC
|
||||
X64/ReadLdtr.S | GCC
|
||||
X64/ReadIdtr.S | GCC
|
||||
X64/ReadGs.S | GCC
|
||||
X64/ReadGdtr.S | GCC
|
||||
X64/ReadFs.S | GCC
|
||||
X64/ReadEs.S | GCC
|
||||
X64/ReadEflags.S | GCC
|
||||
X64/ReadDs.S | GCC
|
||||
X64/ReadDr7.S | GCC
|
||||
X64/ReadDr6.S | GCC
|
||||
X64/ReadDr5.S | GCC
|
||||
X64/ReadDr4.S | GCC
|
||||
X64/ReadDr3.S | GCC
|
||||
X64/ReadDr2.S | GCC
|
||||
X64/ReadDr1.S | GCC
|
||||
X64/ReadDr0.S | GCC
|
||||
X64/ReadCs.S | GCC
|
||||
X64/ReadCr4.S | GCC
|
||||
X64/ReadCr3.S | GCC
|
||||
X64/ReadCr2.S | GCC
|
||||
X64/ReadCr0.S | GCC
|
||||
X64/Mwait.S | GCC
|
||||
X64/Monitor.S | GCC
|
||||
X64/LongJump.S | GCC
|
||||
X64/Invd.S | GCC
|
||||
X64/InterlockedIncrement.S | GCC
|
||||
X64/InterlockedDecrement.S | GCC
|
||||
X64/InterlockedCompareExchange64.S | GCC
|
||||
X64/InterlockedCompareExchange32.S | GCC
|
||||
X64/FxSave.S | GCC
|
||||
X64/FxRestore.S | GCC
|
||||
X64/FlushCacheLine.S | GCC
|
||||
X64/EnablePaging64.S | GCC
|
||||
X64/EnableInterrupts.S | GCC
|
||||
X64/EnableDisableInterrupts.S | GCC
|
||||
X64/DisablePaging64.S | GCC
|
||||
X64/DisableInterrupts.S | GCC
|
||||
X64/CpuPause.S | GCC
|
||||
X64/CpuId.S | GCC
|
||||
X64/CpuIdEx.S | GCC
|
||||
X64/CpuBreakpoint.S | GCC
|
||||
SynchronizationGcc.c | GCC
|
||||
ChkStkGcc.c | GCC
|
||||
|
||||
[Sources.IPF]
|
||||
SynchronizationMsc.c
|
||||
Math64.c
|
||||
Ipf/asm.h
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
/** @file
|
||||
Implementation of synchronization functions.
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
|
||||
|
||||
#include "BaseLibInternals.h"
|
||||
|
||||
VOID __chkstk() {
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
# Module Name:
|
||||
#
|
||||
# ARShiftU64.asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# 64-bit arithmetic right shift function for IA-32
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalMathARShiftU64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalMathARShiftU64 (
|
||||
# IN UINT64 Operand,
|
||||
# IN UINTN Count
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathARShiftU64):
|
||||
movb 12(%esp), %cl
|
||||
movl 8(%esp), %eax
|
||||
cltd
|
||||
testb $32, %cl
|
||||
cmovz %eax, %edx
|
||||
cmovz 4(%esp), %eax
|
||||
shrdl %cl, %edx, %eax
|
||||
sar %cl, %edx
|
||||
ret
|
|
@ -0,0 +1,46 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ARShiftU64.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; 64-bit arithmetic right shift function for IA-32
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.686
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalMathARShiftU64 (
|
||||
; IN UINT64 Operand,
|
||||
; IN UINTN Count
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathARShiftU64 PROC
|
||||
mov cl, [esp + 12]
|
||||
mov eax, [esp + 8]
|
||||
cdq
|
||||
test cl, 32
|
||||
cmovz edx, eax
|
||||
cmovz eax, [esp + 4]
|
||||
shrd eax, edx, cl
|
||||
sar edx, cl
|
||||
ret
|
||||
InternalMathARShiftU64 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# CpuBreakpoint.s
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# CpuBreakpoint function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(CpuBreakpoint)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# CpuBreakpoint (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(CpuBreakpoint):
|
||||
int $3
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------ ;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; CpuBreakpoint.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; CpuBreakpoint function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.686
|
||||
.model flat
|
||||
.xmm
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; CpuBreakpoint (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
_CpuBreakpoint PROC
|
||||
int 3
|
||||
ret
|
||||
_CpuBreakpoint ENDP
|
||||
|
||||
END
|
|
@ -0,0 +1,63 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
# Module Name:
|
||||
#
|
||||
# CpuId.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmCpuid function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmCpuid)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmCpuid (
|
||||
# IN UINT32 RegisterInEax,
|
||||
# OUT UINT32 *RegisterOutEax OPTIONAL,
|
||||
# OUT UINT32 *RegisterOutEbx OPTIONAL,
|
||||
# OUT UINT32 *RegisterOutEcx OPTIONAL,
|
||||
# OUT UINT32 *RegisterOutEdx OPTIONAL
|
||||
# )
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmCpuid):
|
||||
push %ebx
|
||||
push %ebp
|
||||
movl %esp, %ebp
|
||||
movl 12(%ebp), %eax
|
||||
cpuid
|
||||
push %ecx
|
||||
movl 16(%ebp), %ecx
|
||||
jecxz L1
|
||||
movl %eax, (%ecx)
|
||||
L1:
|
||||
movl 20(%ebp), %ecx
|
||||
jecxz L2
|
||||
movl %ebx, (%ecx)
|
||||
L2:
|
||||
movl 24(%ebp), %ecx
|
||||
jecxz L3
|
||||
popl (%ecx)
|
||||
L3:
|
||||
movl 28(%ebp), %ecx
|
||||
jecxz L4
|
||||
movl %edx, (%ecx)
|
||||
L4:
|
||||
movl 12(%ebp), %eax
|
||||
leave
|
||||
pop %ebx
|
||||
ret
|
|
@ -0,0 +1,66 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; CpuId.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmCpuid function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586P
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; AsmCpuid (
|
||||
; IN UINT32 RegisterInEax,
|
||||
; OUT UINT32 *RegisterOutEax OPTIONAL,
|
||||
; OUT UINT32 *RegisterOutEbx OPTIONAL,
|
||||
; OUT UINT32 *RegisterOutEcx OPTIONAL,
|
||||
; OUT UINT32 *RegisterOutEdx OPTIONAL
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmCpuid PROC USES ebx
|
||||
push ebp
|
||||
mov ebp, esp
|
||||
mov eax, [ebp + 12]
|
||||
cpuid
|
||||
push ecx
|
||||
mov ecx, [ebp + 16]
|
||||
jecxz @F
|
||||
mov [ecx], eax
|
||||
@@:
|
||||
mov ecx, [ebp + 20]
|
||||
jecxz @F
|
||||
mov [ecx], ebx
|
||||
@@:
|
||||
mov ecx, [ebp + 24]
|
||||
jecxz @F
|
||||
pop [ecx]
|
||||
@@:
|
||||
mov ecx, [ebp + 28]
|
||||
jecxz @F
|
||||
mov [ecx], edx
|
||||
@@:
|
||||
mov eax, [ebp + 12]
|
||||
leave
|
||||
ret
|
||||
AsmCpuid ENDP
|
||||
|
||||
END
|
|
@ -0,0 +1,67 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM 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:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.686:
|
||||
.code:
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT32
|
||||
# EFIAPI
|
||||
# AsmCpuidEx (
|
||||
# IN UINT32 RegisterInEax,
|
||||
# IN UINT32 RegisterInEcx,
|
||||
# OUT UINT32 *RegisterOutEax OPTIONAL,
|
||||
# OUT UINT32 *RegisterOutEbx OPTIONAL,
|
||||
# OUT UINT32 *RegisterOutEcx OPTIONAL,
|
||||
# OUT UINT32 *RegisterOutEdx OPTIONAL
|
||||
# )
|
||||
#------------------------------------------------------------------------------
|
||||
.globl ASM_PFX(AsmCpuidEx)
|
||||
ASM_PFX(AsmCpuidEx):
|
||||
push %ebx
|
||||
push %ebp
|
||||
movl %esp, %ebp
|
||||
movl 12(%ebp), %eax
|
||||
movl 16(%ebp), %ecx
|
||||
cpuid
|
||||
push %ecx
|
||||
movl 20(%ebp), %ecx
|
||||
jecxz L1
|
||||
movl %eax, (%ecx)
|
||||
L1:
|
||||
movl 24(%ebp), %ecx
|
||||
jecxz L2
|
||||
movl %ebx, (%ecx)
|
||||
L2:
|
||||
movl 28(%ebp), %ecx
|
||||
jecxz L3
|
||||
popl (%ecx)
|
||||
L3:
|
||||
movl 32(%ebp), %edx
|
||||
jecxz L4
|
||||
movl %edx, (%ecx)
|
||||
L4:
|
||||
movl 12(%ebp), %eax
|
||||
leave
|
||||
pop %ebx
|
||||
ret
|
|
@ -0,0 +1,68 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM 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:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.686
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; 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
|
||||
; )
|
||||
;------------------------------------------------------------------------------
|
||||
AsmCpuidEx PROC USES ebx
|
||||
push ebp
|
||||
mov ebp, esp
|
||||
mov eax, [ebp + 12]
|
||||
mov ecx, [ebp + 16]
|
||||
cpuid
|
||||
push ecx
|
||||
mov ecx, [ebp + 20]
|
||||
jecxz @F
|
||||
mov [ecx], eax
|
||||
@@:
|
||||
mov ecx, [ebp + 24]
|
||||
jecxz @F
|
||||
mov [ecx], ebx
|
||||
@@:
|
||||
mov ecx, [ebp + 28]
|
||||
jecxz @F
|
||||
pop [ecx]
|
||||
@@:
|
||||
mov edx, [ebp + 32]
|
||||
jecxz @F
|
||||
mov [ecx], edx
|
||||
@@:
|
||||
mov eax, [ebp + 12]
|
||||
leave
|
||||
ret
|
||||
AsmCpuidEx ENDP
|
||||
|
||||
END
|
|
@ -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.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# CpuPause function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(CpuPause)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# CpuPause (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(CpuPause):
|
||||
pause
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------ ;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; CpuPause.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; CpuPause function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.686
|
||||
.model flat,C
|
||||
.xmm
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; CpuPause (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
CpuPause PROC
|
||||
pause
|
||||
ret
|
||||
CpuPause ENDP
|
||||
|
||||
END
|
|
@ -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.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# CpuSleep function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(CpuSleep)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# CpuSleep (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(CpuSleep):
|
||||
hlt
|
||||
ret
|
|
@ -0,0 +1,39 @@
|
|||
;------------------------------------------------------------------------------ ;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; CpuSleep.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; CpuSleep function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; CpuSleep (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
CpuSleep PROC
|
||||
hlt
|
||||
ret
|
||||
CpuSleep ENDP
|
||||
|
||||
END
|
|
@ -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.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# DisableInterrupts function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(DisableInterrupts)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# DisableInterrupts (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(DisableInterrupts):
|
||||
cli
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; DisableInterrupts.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; DisableInterrupts function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; DisableInterrupts (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
DisableInterrupts PROC
|
||||
cli
|
||||
ret
|
||||
DisableInterrupts ENDP
|
||||
|
||||
END
|
|
@ -0,0 +1,52 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
# Module Name:
|
||||
#
|
||||
# DisablePaging32.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InternalX86DisablePaging32 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalX86DisablePaging32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# InternalX86DisablePaging32 (
|
||||
# IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||
# IN VOID *Context1, OPTIONAL
|
||||
# IN VOID *Context2, OPTIONAL
|
||||
# IN VOID *NewStack
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalX86DisablePaging32):
|
||||
movl 4(%esp), %ebx
|
||||
movl 8(%esp), %ecx
|
||||
movl 12(%esp), %edx
|
||||
pushfl
|
||||
pop %edi
|
||||
cli
|
||||
movl %cr0, %eax
|
||||
btrl $31, %eax
|
||||
movl 16(%esp), %esp
|
||||
movl %eax, %cr0
|
||||
push %edi
|
||||
popfl
|
||||
push %edx
|
||||
push %ecx
|
||||
call *%ebx
|
||||
jmp .
|
|
@ -0,0 +1,57 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; DisablePaging32.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmDisablePaging32 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; InternalX86DisablePaging32 (
|
||||
; IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||
; IN VOID *Context1, OPTIONAL
|
||||
; IN VOID *Context2, OPTIONAL
|
||||
; IN VOID *NewStack
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalX86DisablePaging32 PROC
|
||||
mov ebx, [esp + 4]
|
||||
mov ecx, [esp + 8]
|
||||
mov edx, [esp + 12]
|
||||
pushfd
|
||||
pop edi ; save EFLAGS to edi
|
||||
cli
|
||||
mov eax, cr0
|
||||
btr eax, 31
|
||||
mov esp, [esp + 16]
|
||||
mov cr0, eax
|
||||
push edi
|
||||
popfd ; restore EFLAGS from edi
|
||||
push edx
|
||||
push ecx
|
||||
call ebx
|
||||
jmp $ ; EntryPoint() should not return
|
||||
InternalX86DisablePaging32 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# DivU64x32.asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Calculate the quotient of a 64-bit integer by a 32-bit integer
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalMathDivU64x32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalMathDivU64x32 (
|
||||
# IN UINT64 Dividend,
|
||||
# IN UINT32 Divisor
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathDivU64x32):
|
||||
movl 8(%esp), %eax
|
||||
movl 12(%esp), %ecx
|
||||
xorl %edx, %edx
|
||||
divl %ecx
|
||||
push %eax
|
||||
movl 8(%esp), %eax
|
||||
divl %ecx
|
||||
pop %edx
|
||||
ret
|
|
@ -0,0 +1,46 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; DivU64x32.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; Calculate the quotient of a 64-bit integer by a 32-bit integer
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalMathDivU64x32 (
|
||||
; IN UINT64 Dividend,
|
||||
; IN UINT32 Divisor
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathDivU64x32 PROC
|
||||
mov eax, [esp + 8]
|
||||
mov ecx, [esp + 12]
|
||||
xor edx, edx
|
||||
div ecx
|
||||
push eax ; save quotient on stack
|
||||
mov eax, [esp + 8]
|
||||
div ecx
|
||||
pop edx ; restore high-order dword of the quotient
|
||||
ret
|
||||
InternalMathDivU64x32 ENDP
|
||||
|
||||
END
|
|
@ -0,0 +1,46 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
# Module Name:
|
||||
#
|
||||
# DivError.asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Set error flag for all division functions
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalMathDivRemU64x32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalMathDivRemU64x32 (
|
||||
# IN UINT64 Dividend,
|
||||
# IN UINT32 Divisor,
|
||||
# OUT UINT32 *Remainder
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathDivRemU64x32):
|
||||
movl 12(%esp), %ecx
|
||||
movl 8(%esp), %eax
|
||||
xorl %edx, %edx
|
||||
divl %ecx
|
||||
push %eax
|
||||
movl 8(%esp), %eax
|
||||
divl %ecx
|
||||
movl 20(%esp), %ecx
|
||||
jecxz L1
|
||||
movl %edx, (%ecx)
|
||||
L1:
|
||||
pop %edx
|
||||
ret
|
|
@ -0,0 +1,51 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; DivError.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; Set error flag for all division functions
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalMathDivRemU64x32 (
|
||||
; IN UINT64 Dividend,
|
||||
; IN UINT32 Divisor,
|
||||
; OUT UINT32 *Remainder
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathDivRemU64x32 PROC
|
||||
mov ecx, [esp + 12] ; ecx <- divisor
|
||||
mov eax, [esp + 8] ; eax <- dividend[32..63]
|
||||
xor edx, edx
|
||||
div ecx ; eax <- quotient[32..63], edx <- remainder
|
||||
push eax
|
||||
mov eax, [esp + 8] ; eax <- dividend[0..31]
|
||||
div ecx ; eax <- quotient[0..31]
|
||||
mov ecx, [esp + 20] ; ecx <- Remainder
|
||||
jecxz @F ; abandon remainder if Remainder == NULL
|
||||
mov [ecx], edx
|
||||
@@:
|
||||
pop edx ; edx <- quotient[32..63]
|
||||
ret
|
||||
InternalMathDivRemU64x32 ENDP
|
||||
|
||||
END
|
|
@ -0,0 +1,89 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
# Module Name:
|
||||
#
|
||||
# DivU64x64Remainder.asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Calculate the quotient of a 64-bit integer by a 64-bit integer and returns
|
||||
# both the quotient and the remainder
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalMathDivRemU64x32), ASM_PFX(InternalMathDivRemU64x64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalMathDivRemU64x64 (
|
||||
# IN UINT64 Dividend,
|
||||
# IN UINT64 Divisor,
|
||||
# OUT UINT64 *Remainder OPTIONAL
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathDivRemU64x64):
|
||||
movl 16(%esp), %ecx
|
||||
testl %ecx, %ecx
|
||||
jnz Hard
|
||||
movl 20(%esp), %ecx
|
||||
jecxz L1
|
||||
and $0, 4(%ecx)
|
||||
movl %ecx, 16(%esp)
|
||||
L1:
|
||||
jmp ASM_PFX(InternalMathDivRemU64x32)
|
||||
Hard:
|
||||
push %ebx
|
||||
push %esi
|
||||
push %edi
|
||||
mov 20(%esp), %edx
|
||||
mov 16(%esp), %eax
|
||||
movl %edx, %edi
|
||||
movl %eax, %esi
|
||||
mov 24(%esp), %ebx
|
||||
L2:
|
||||
shrl %edx
|
||||
rcrl $1, %eax
|
||||
shrdl $1, %ecx, %ebx
|
||||
shrl %ecx
|
||||
jnz L2
|
||||
divl %ebx
|
||||
movl %eax, %ebx
|
||||
movl 28(%esp), %ecx
|
||||
mull 24(%esp)
|
||||
imull %ebx, %ecx
|
||||
addl %ecx, %edx
|
||||
mov 32(%esp), %ecx
|
||||
jc TooLarge
|
||||
cmpl %edx, %edi
|
||||
ja Correct
|
||||
jb TooLarge
|
||||
cmpl %eax, %esi
|
||||
jae Correct
|
||||
TooLarge:
|
||||
decl %ebx
|
||||
jecxz Return
|
||||
sub 24(%esp), %eax
|
||||
sbb 28(%esp), %edx
|
||||
Correct:
|
||||
jecxz Return
|
||||
subl %eax, %esi
|
||||
sbbl %edx, %edi
|
||||
movl %esi, (%ecx)
|
||||
movl %edi, 4(%ecx)
|
||||
Return:
|
||||
movl %ebx, %eax
|
||||
xorl %edx, %edx
|
||||
pop %edi
|
||||
pop %esi
|
||||
pop %ebx
|
||||
ret
|
|
@ -0,0 +1,92 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; DivU64x64Remainder.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; Calculate the quotient of a 64-bit integer by a 64-bit integer and returns
|
||||
; both the quotient and the remainder
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
EXTERN InternalMathDivRemU64x32:PROC
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalMathDivRemU64x64 (
|
||||
; IN UINT64 Dividend,
|
||||
; IN UINT64 Divisor,
|
||||
; OUT UINT64 *Remainder OPTIONAL
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathDivRemU64x64 PROC
|
||||
mov ecx, [esp + 16] ; ecx <- divisor[32..63]
|
||||
test ecx, ecx
|
||||
jnz _@DivRemU64x64 ; call _@DivRemU64x64 if Divisor > 2^32
|
||||
mov ecx, [esp + 20]
|
||||
jecxz @F
|
||||
and dword ptr [ecx + 4], 0 ; zero high dword of remainder
|
||||
mov [esp + 16], ecx ; set up stack frame to match DivRemU64x32
|
||||
@@:
|
||||
jmp InternalMathDivRemU64x32
|
||||
InternalMathDivRemU64x64 ENDP
|
||||
|
||||
_@DivRemU64x64 PROC USES ebx esi edi
|
||||
mov edx, dword ptr [esp + 20]
|
||||
mov eax, dword ptr [esp + 16] ; edx:eax <- dividend
|
||||
mov edi, edx
|
||||
mov esi, eax ; edi:esi <- dividend
|
||||
mov ebx, dword ptr [esp + 24] ; ecx:ebx <- divisor
|
||||
@@:
|
||||
shr edx, 1
|
||||
rcr eax, 1
|
||||
shrd ebx, ecx, 1
|
||||
shr ecx, 1
|
||||
jnz @B
|
||||
div ebx
|
||||
mov ebx, eax ; ebx <- quotient
|
||||
mov ecx, [esp + 28] ; ecx <- high dword of divisor
|
||||
mul dword ptr [esp + 24] ; edx:eax <- quotient * divisor[0..31]
|
||||
imul ecx, ebx ; ecx <- quotient * divisor[32..63]
|
||||
add edx, ecx ; edx <- (quotient * divisor)[32..63]
|
||||
mov ecx, dword ptr [esp + 32] ; ecx <- addr for Remainder
|
||||
jc @TooLarge ; product > 2^64
|
||||
cmp edi, edx ; compare high 32 bits
|
||||
ja @Correct
|
||||
jb @TooLarge ; product > dividend
|
||||
cmp esi, eax
|
||||
jae @Correct ; product <= dividend
|
||||
@TooLarge:
|
||||
dec ebx ; adjust quotient by -1
|
||||
jecxz @Return ; return if Remainder == NULL
|
||||
sub eax, dword ptr [esp + 24]
|
||||
sbb edx, dword ptr [esp + 28] ; edx:eax <- (quotient - 1) * divisor
|
||||
@Correct:
|
||||
jecxz @Return
|
||||
sub esi, eax
|
||||
sbb edi, edx ; edi:esi <- remainder
|
||||
mov [ecx], esi
|
||||
mov [ecx + 4], edi
|
||||
@Return:
|
||||
mov eax, ebx ; eax <- quotient
|
||||
xor edx, edx ; quotient is 32 bits long
|
||||
ret
|
||||
_@DivRemU64x64 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# EnableDisableInterrupts.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# EnableDisableInterrupts function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(EnableDisableInterrupts)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# EnableDisableInterrupts (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(EnableDisableInterrupts):
|
||||
sti
|
||||
cli
|
||||
ret
|
|
@ -0,0 +1,41 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; EnableDisableInterrupts.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; EnableDisableInterrupts function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386p
|
||||
.model flat
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; EnableDisableInterrupts (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
_EnableDisableInterrupts PROC
|
||||
sti
|
||||
cli
|
||||
ret
|
||||
_EnableDisableInterrupts ENDP
|
||||
|
||||
END
|
|
@ -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.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# EnableInterrupts function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(EnableInterrupts)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# EnableInterrupts (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(EnableInterrupts):
|
||||
sti
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; EnableInterrupts.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; EnableInterrupts function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386p
|
||||
.model flat
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; EnableInterrupts (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
_EnableInterrupts PROC
|
||||
sti
|
||||
ret
|
||||
_EnableInterrupts ENDP
|
||||
|
||||
END
|
|
@ -0,0 +1,52 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
# Module Name:
|
||||
#
|
||||
# EnablePaging32.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InternalX86EnablePaging32 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalX86EnablePaging32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# InternalX86EnablePaging32 (
|
||||
# IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||
# IN VOID *Context1, OPTIONAL
|
||||
# IN VOID *Context2, OPTIONAL
|
||||
# IN VOID *NewStack
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalX86EnablePaging32):
|
||||
movl 4(%esp), %ebx
|
||||
movl 8(%esp), %ecx
|
||||
movl 12(%esp), %edx
|
||||
pushfl
|
||||
pop %edi
|
||||
cli
|
||||
movl %cr0, %eax
|
||||
btsl $31, %eax
|
||||
movl 16(%esp), %esp
|
||||
movl %eax, %cr0
|
||||
push %edi
|
||||
popfl
|
||||
push %edx
|
||||
push %ecx
|
||||
call *%ebx
|
||||
jmp .
|
|
@ -0,0 +1,57 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; EnablePaging32.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmEnablePaging32 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; InternalX86EnablePaging32 (
|
||||
; IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||
; IN VOID *Context1, OPTIONAL
|
||||
; IN VOID *Context2, OPTIONAL
|
||||
; IN VOID *NewStack
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalX86EnablePaging32 PROC
|
||||
mov ebx, [esp + 4]
|
||||
mov ecx, [esp + 8]
|
||||
mov edx, [esp + 12]
|
||||
pushfd
|
||||
pop edi ; save flags in edi
|
||||
cli
|
||||
mov eax, cr0
|
||||
bts eax, 31
|
||||
mov esp, [esp + 16]
|
||||
mov cr0, eax
|
||||
push edi
|
||||
popfd ; restore flags
|
||||
push edx
|
||||
push ecx
|
||||
call ebx
|
||||
jmp $
|
||||
InternalX86EnablePaging32 ENDP
|
||||
|
||||
END
|
|
@ -0,0 +1,63 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
# Module Name:
|
||||
#
|
||||
# EnablePaging64.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InternalX86EnablePaging64 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalX86EnablePaging64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# InternalX86EnablePaging64 (
|
||||
# IN UINT16 CodeSelector,
|
||||
# IN UINT64 EntryPoint,
|
||||
# IN UINT64 Context1, OPTIONAL
|
||||
# IN UINT64 Context2, OPTIONAL
|
||||
# IN UINT64 NewStack
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalX86EnablePaging64):
|
||||
cli
|
||||
movl $LongStart, (%esp)
|
||||
movl %cr4, %eax
|
||||
orb $0x20, %al
|
||||
movl %eax, %cr4 # enable PAE
|
||||
movl $0xc0000080, %ecx
|
||||
rdmsr
|
||||
orb $1, %ah # set LME
|
||||
wrmsr
|
||||
movl %cr0, %eax
|
||||
btsl $31, %eax
|
||||
movl %eax, %cr0 # enable paging
|
||||
lret
|
||||
LongStart: # long mode starts here
|
||||
.byte 0x67, 0x48
|
||||
movl (%esp), %ebx # mov rbx, [esp]
|
||||
.byte 0x67, 0x48
|
||||
movl 8(%esp), %ecx # mov rcx, [esp + 8]
|
||||
.byte 0x67, 0x48
|
||||
movl 0x10(%esp), %edx # mov rdx, [esp + 10h]
|
||||
.byte 0x67, 0x48
|
||||
movl 0x18(%esp), %esp # mov rsp, [esp + 18h]
|
||||
.byte 0x48
|
||||
addl $0x-20, %esp # add rsp, -20h
|
||||
call *%ebx # call rbx
|
||||
jmp .
|
|
@ -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.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmFlushCacheLine function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmFlushCacheLine)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmFlushCacheLine (
|
||||
# IN VOID *LinearAddress
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmFlushCacheLine):
|
||||
movl 4(%esp), %eax
|
||||
clflush (%eax)
|
||||
ret
|
|
@ -0,0 +1,42 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; FlushCacheLine.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmFlushCacheLine function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586P
|
||||
.model flat,C
|
||||
.xmm
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID *
|
||||
; EFIAPI
|
||||
; AsmFlushCacheLine (
|
||||
; IN VOID *LinearAddress
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmFlushCacheLine PROC
|
||||
mov eax, [esp + 4]
|
||||
clflush [eax]
|
||||
ret
|
||||
AsmFlushCacheLine ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# FxRestore.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InternalX86FxRestore function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalX86FxRestore)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# InternalX86FxRestore (
|
||||
# IN CONST IA32_FX_BUFFER *Buffer
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalX86FxRestore):
|
||||
movl 4(%esp), %eax
|
||||
fxrstor (%eax)
|
||||
ret
|
|
@ -0,0 +1,42 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; FxRestore.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmFxRestore function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586
|
||||
.model flat,C
|
||||
.xmm
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; InternalX86FxRestore (
|
||||
; IN CONST IA32_FX_BUFFER *Buffer
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalX86FxRestore PROC
|
||||
mov eax, [esp + 4] ; Buffer must be 16-byte aligned
|
||||
fxrstor [eax]
|
||||
ret
|
||||
InternalX86FxRestore ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# FxSave.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InternalX86FxSave function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalX86FxSave)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# InternalX86FxSave (
|
||||
# OUT IA32_FX_BUFFER *Buffer
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalX86FxSave):
|
||||
movl 4(%esp), %eax
|
||||
fxsave (%eax)
|
||||
ret
|
|
@ -0,0 +1,42 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; FxSave.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmFxSave function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586
|
||||
.model flat,C
|
||||
.xmm
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; InternalX86FxSave (
|
||||
; OUT IA32_FX_BUFFER *Buffer
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalX86FxSave PROC
|
||||
mov eax, [esp + 4] ; Buffer must be 16-byte aligned
|
||||
fxsave [eax]
|
||||
ret
|
||||
InternalX86FxSave ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# InterlockedCompareExchange32.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InternalSyncCompareExchange32 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalSyncCompareExchange32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT32
|
||||
# EFIAPI
|
||||
# InternalSyncCompareExchange32 (
|
||||
# IN UINT32 *Value,
|
||||
# IN UINT32 CompareValue,
|
||||
# IN UINT32 ExchangeValue
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalSyncCompareExchange32):
|
||||
movl 4(%esp), %ecx
|
||||
movl 8(%esp), %eax
|
||||
movl 12(%esp), %edx
|
||||
lock
|
||||
cmpxchgl %edx, (%ecx)
|
||||
ret
|
|
@ -0,0 +1,45 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; InterlockedCompareExchange32.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; InterlockedCompareExchange32 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.486
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InternalSyncCompareExchange32 (
|
||||
; IN UINT32 *Value,
|
||||
; IN UINT32 CompareValue,
|
||||
; IN UINT32 ExchangeValue
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalSyncCompareExchange32 PROC
|
||||
mov ecx, [esp + 4]
|
||||
mov eax, [esp + 8]
|
||||
mov edx, [esp + 12]
|
||||
lock cmpxchg [ecx], edx
|
||||
ret
|
||||
InternalSyncCompareExchange32 ENDP
|
||||
|
||||
END
|
|
@ -0,0 +1,47 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
# Module Name:
|
||||
#
|
||||
# InterlockedCompareExchange64.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InternalSyncCompareExchange64 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalSyncCompareExchange64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalSyncCompareExchange64 (
|
||||
# IN UINT64 *Value,
|
||||
# IN UINT64 CompareValue,
|
||||
# IN UINT64 ExchangeValue
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalSyncCompareExchange64):
|
||||
push %esi
|
||||
push %ebx
|
||||
movl 12(%esp), %esi
|
||||
movl 16(%esp), %eax
|
||||
movl 20(%esp), %edx
|
||||
movl 24(%esp), %ebx
|
||||
movl 28(%esp), %ecx
|
||||
lock
|
||||
cmpxchg8b (%esi)
|
||||
pop %ebx
|
||||
pop %esi
|
||||
ret
|
|
@ -0,0 +1,47 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; InterlockedCompareExchange64.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; InterlockedCompareExchange64 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586P
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalSyncCompareExchange64 (
|
||||
; IN UINT64 *Value,
|
||||
; IN UINT64 CompareValue,
|
||||
; IN UINT64 ExchangeValue
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalSyncCompareExchange64 PROC USES esi ebx
|
||||
mov esi, [esp + 12]
|
||||
mov eax, [esp + 16]
|
||||
mov edx, [esp + 20]
|
||||
mov ebx, [esp + 24]
|
||||
mov ecx, [esp + 28]
|
||||
lock cmpxchg8b qword ptr [esi]
|
||||
ret
|
||||
InternalSyncCompareExchange64 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# InterlockedDecrement.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InternalSyncDecrement function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalSyncDecrement)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT32
|
||||
# EFIAPI
|
||||
# InternalSyncDecrement (
|
||||
# IN UINT32 *Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalSyncDecrement):
|
||||
movl 4(%esp), %eax
|
||||
lock
|
||||
decl (%eax)
|
||||
movl (%eax), %eax
|
||||
ret
|
|
@ -0,0 +1,42 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; InterlockedDecrement.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; InterlockedDecrement function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InternalSyncDecrement (
|
||||
; IN UINT32 *Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalSyncDecrement PROC
|
||||
mov eax, [esp + 4]
|
||||
lock dec dword ptr [eax]
|
||||
mov eax, [eax]
|
||||
ret
|
||||
InternalSyncDecrement ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# InterlockedIncrement.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InternalSyncIncrement function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalSyncIncrement)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT32
|
||||
# EFIAPI
|
||||
# InternalSyncIncrement (
|
||||
# IN UINT32 *Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalSyncIncrement):
|
||||
movl 4(%esp), %eax
|
||||
lock
|
||||
incl (%eax)
|
||||
movl (%eax), %eax
|
||||
ret
|
|
@ -0,0 +1,42 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; InterlockedIncrement.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; InterlockedIncrement function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InternalSyncIncrement (
|
||||
; IN UINT32 *Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalSyncIncrement PROC
|
||||
mov eax, [esp + 4]
|
||||
lock inc dword ptr [eax]
|
||||
mov eax, [eax]
|
||||
ret
|
||||
InternalSyncIncrement ENDP
|
||||
|
||||
END
|
|
@ -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.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmInvd function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmInvd)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmInvd (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmInvd):
|
||||
invd
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; Invd.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmInvd function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.486p
|
||||
.model flat
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; AsmInvd (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
_AsmInvd PROC
|
||||
invd
|
||||
ret
|
||||
_AsmInvd ENDP
|
||||
|
||||
END
|
|
@ -0,0 +1,46 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
# Module Name:
|
||||
#
|
||||
# LRotU64.asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# 64-bit left rotation for Ia32
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalMathLRotU64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalMathLRotU64 (
|
||||
# IN UINT64 Operand,
|
||||
# IN UINTN Count
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathLRotU64):
|
||||
push %ebx
|
||||
movb 16(%esp), %cl
|
||||
movl 12(%esp), %edx
|
||||
movl 8(%esp), %eax
|
||||
shldl %cl, %edx, %ebx
|
||||
shldl %cl, %eax, %edx
|
||||
rorl %cl, %ebx
|
||||
shldl %cl, %ebx, %eax
|
||||
testb $32, %cl
|
||||
cmovnz %eax, %ecx
|
||||
cmovnz %edx, %eax
|
||||
cmovnz %ecx, %edx
|
||||
pop %ebx
|
||||
ret
|
|
@ -0,0 +1,49 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; LRotU64.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; 64-bit left rotation for Ia32
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.686
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalMathLRotU64 (
|
||||
; IN UINT64 Operand,
|
||||
; IN UINTN Count
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathLRotU64 PROC USES ebx
|
||||
mov cl, [esp + 16]
|
||||
mov edx, [esp + 12]
|
||||
mov eax, [esp + 8]
|
||||
shld ebx, edx, cl
|
||||
shld edx, eax, cl
|
||||
ror ebx, cl
|
||||
shld eax, ebx, cl
|
||||
test cl, 32 ; Count >= 32?
|
||||
cmovnz ecx, eax
|
||||
cmovnz eax, edx
|
||||
cmovnz edx, ecx
|
||||
ret
|
||||
InternalMathLRotU64 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# LShiftU64.asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# 64-bit left shift function for IA-32
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalMathLShiftU64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalMathLShiftU64 (
|
||||
# IN UINT64 Operand,
|
||||
# IN UINTN Count
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathLShiftU64):
|
||||
movb 12(%esp), %cl
|
||||
xorl %eax, %eax
|
||||
movl 4(%esp), %edx
|
||||
testb $32, %cl
|
||||
cmovz %edx, %eax
|
||||
cmovz 0x8(%esp), %edx
|
||||
shld %cl, %eax, %edx
|
||||
shl %cl, %eax
|
||||
ret
|
|
@ -0,0 +1,46 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; LShiftU64.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; 64-bit left shift function for IA-32
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.686
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalMathLShiftU64 (
|
||||
; IN UINT64 Operand,
|
||||
; IN UINTN Count
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathLShiftU64 PROC
|
||||
mov cl, [esp + 12]
|
||||
xor eax, eax
|
||||
mov edx, [esp + 4]
|
||||
test cl, 32 ; Count >= 32?
|
||||
cmovz eax, edx
|
||||
cmovz edx, [esp + 8]
|
||||
shld edx, eax, cl
|
||||
shl eax, cl
|
||||
ret
|
||||
InternalMathLShiftU64 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# LongJump.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Implementation of _LongJump() on IA-32.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalLongJump)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# InternalLongJump (
|
||||
# IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
|
||||
# IN UINTN Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalLongJump):
|
||||
pop %eax
|
||||
pop %edx
|
||||
pop %eax
|
||||
movl (%edx), %ebx
|
||||
movl 4(%edx), %esi
|
||||
movl 8(%edx), %edi
|
||||
movl 12(%edx), %ebp
|
||||
movl 16(%edx), %esp
|
||||
jmp *20(%edx)
|
|
@ -0,0 +1,46 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; LongJump.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; Implementation of _LongJump() on IA-32.
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VOID
|
||||
; EFIAPI
|
||||
; InternalLongJump (
|
||||
; IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
|
||||
; IN UINTN Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalLongJump PROC
|
||||
pop eax ; skip return address
|
||||
pop edx ; edx <- JumpBuffer
|
||||
pop eax ; eax <- Value
|
||||
mov ebx, [edx]
|
||||
mov esi, [edx + 4]
|
||||
mov edi, [edx + 8]
|
||||
mov ebp, [edx + 12]
|
||||
mov esp, [edx + 16]
|
||||
jmp dword ptr [edx + 20] ; restore "eip"
|
||||
InternalLongJump ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# DivU64x32.S
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Calculate the remainder of a 64-bit integer by a 32-bit integer
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalMathModU64x32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT32
|
||||
# EFIAPI
|
||||
# InternalMathModU64x32 (
|
||||
# IN UINT64 Dividend,
|
||||
# IN UINT32 Divisor
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathModU64x32):
|
||||
movl 8(%esp), %eax
|
||||
movl 12(%esp), %ecx
|
||||
xorl %edx, %edx
|
||||
divl %ecx
|
||||
movl 4(%esp), %eax
|
||||
divl %ecx
|
||||
movl %edx, %eax
|
||||
ret
|
|
@ -0,0 +1,45 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; DivU64x32.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; Calculate the remainder of a 64-bit integer by a 32-bit integer
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InternalMathModU64x32 (
|
||||
; IN UINT64 Dividend,
|
||||
; IN UINT32 Divisor
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathModU64x32 PROC
|
||||
mov eax, [esp + 8]
|
||||
mov ecx, [esp + 12]
|
||||
xor edx, edx
|
||||
div ecx
|
||||
mov eax, [esp + 4]
|
||||
div ecx
|
||||
mov eax, edx
|
||||
ret
|
||||
InternalMathModU64x32 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# Monitor.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmMonitor function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmMonitor)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# AsmMonitor (
|
||||
# IN UINTN Eax,
|
||||
# IN UINTN Ecx,
|
||||
# IN UINTN Edx
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmMonitor):
|
||||
movl 4(%esp), %eax
|
||||
movl 8(%esp), %ecx
|
||||
movl 12(%esp), %edx
|
||||
monitor %eax, %ecx, %edx
|
||||
ret
|
|
@ -0,0 +1,45 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; Monitor.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmMonitor function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.686
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmMonitor (
|
||||
; IN UINTN Eax,
|
||||
; IN UINTN Ecx,
|
||||
; IN UINTN Edx
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmMonitor PROC
|
||||
mov eax, [esp + 4]
|
||||
mov ecx, [esp + 8]
|
||||
mov edx, [esp + 12]
|
||||
DB 0fh, 1, 0c8h ; monitor
|
||||
ret
|
||||
AsmMonitor ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# MultU64x32.asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Calculate the product of a 64-bit integer and a 32-bit integer
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.386:
|
||||
.code:
|
||||
|
||||
.globl ASM_PFX(InternalMathMultU64x32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalMathMultU64x32 (
|
||||
# IN UINT64 Multiplicand,
|
||||
# IN UINT32 Multiplier
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathMultU64x32):
|
||||
movl 12(%esp), %ecx
|
||||
movl %ecx, %eax
|
||||
imull 8(%esp), %ecx
|
||||
mull 0x4(%esp)
|
||||
addl %ecx, %edx
|
||||
ret
|
|
@ -0,0 +1,43 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; MultU64x32.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; Calculate the product of a 64-bit integer and a 32-bit integer
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalMathMultU64x32 (
|
||||
; IN UINT64 Multiplicand,
|
||||
; IN UINT32 Multiplier
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathMultU64x32 PROC
|
||||
mov ecx, [esp + 12]
|
||||
mov eax, ecx
|
||||
imul ecx, [esp + 8] ; overflow not detectable
|
||||
mul dword ptr [esp + 4]
|
||||
add edx, ecx
|
||||
ret
|
||||
InternalMathMultU64x32 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# MultU64x64.asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Calculate the product of a 64-bit integer and another 64-bit integer
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalMathMultU64x64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalMathMultU64x64 (
|
||||
# IN UINT64 Multiplicand,
|
||||
# IN UINT64 Multiplier
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathMultU64x64):
|
||||
push %ebx
|
||||
movl 8(%esp), %ebx
|
||||
movl 16(%esp), %edx
|
||||
movl %ebx, %ecx
|
||||
movl %edx, %eax
|
||||
imull 20(%esp), %ebx
|
||||
imull 12(%esp), %edx
|
||||
addl %edx, %ebx
|
||||
mull %ecx
|
||||
addl %ebx, %edx
|
||||
pop %ebx
|
||||
ret
|
|
@ -0,0 +1,47 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; MultU64x64.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; Calculate the product of a 64-bit integer and another 64-bit integer
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalMathMultU64x64 (
|
||||
; IN UINT64 Multiplicand,
|
||||
; IN UINT64 Multiplier
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathMultU64x64 PROC USES ebx
|
||||
mov ebx, [esp + 8] ; ebx <- M1[0..31]
|
||||
mov edx, [esp + 16] ; edx <- M2[0..31]
|
||||
mov ecx, ebx
|
||||
mov eax, edx
|
||||
imul ebx, [esp + 20] ; ebx <- M1[0..31] * M2[32..63]
|
||||
imul edx, [esp + 12] ; edx <- M1[32..63] * M2[0..31]
|
||||
add ebx, edx ; carries are abandoned
|
||||
mul ecx ; edx:eax <- M1[0..31] * M2[0..31]
|
||||
add edx, ebx ; carries are abandoned
|
||||
ret
|
||||
InternalMathMultU64x64 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# Mwait.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmMwait function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmMwait)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# AsmMwait (
|
||||
# IN UINTN Eax,
|
||||
# IN UINTN Ecx
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmMwait):
|
||||
movl 4(%esp), %eax
|
||||
movl 8(%esp), %ecx
|
||||
mwait %eax, %ecx
|
||||
ret
|
|
@ -0,0 +1,43 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; Mwait.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmMwait function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.686
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmMwait (
|
||||
; IN UINTN Eax,
|
||||
; IN UINTN Ecx
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmMwait PROC
|
||||
mov eax, [esp + 4]
|
||||
mov ecx, [esp + 8]
|
||||
DB 0fh, 1, 0c9h ; mwait
|
||||
ret
|
||||
AsmMwait ENDP
|
||||
|
||||
END
|
|
@ -0,0 +1,46 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
# Module Name:
|
||||
#
|
||||
# RRotU64.asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# 64-bit right rotation for Ia32
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(InternalMathRRotU64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalMathRRotU64 (
|
||||
# IN UINT64 Operand,
|
||||
# IN UINTN Count
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathRRotU64):
|
||||
push %ebx
|
||||
movb 16(%esp), %cl
|
||||
movl 8(%esp), %eax
|
||||
movl 12(%esp), %edx
|
||||
shrdl %cl, %eax, %ebx
|
||||
shrdl %cl, %edx, %eax
|
||||
roll %cl, %ebx
|
||||
shrdl %cl, %ebx, %edx
|
||||
testb $32, %cl
|
||||
cmovnz %eax, %ecx
|
||||
cmovnz %edx, %eax
|
||||
cmovnz %ecx, %edx
|
||||
pop %ebx
|
||||
ret
|
|
@ -0,0 +1,49 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; RRotU64.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; 64-bit right rotation for Ia32
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.686
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalMathRRotU64 (
|
||||
; IN UINT64 Operand,
|
||||
; IN UINTN Count
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathRRotU64 PROC USES ebx
|
||||
mov cl, [esp + 16]
|
||||
mov eax, [esp + 8]
|
||||
mov edx, [esp + 12]
|
||||
shrd ebx, eax, cl
|
||||
shrd eax, edx, cl
|
||||
rol ebx, cl
|
||||
shrd edx, ebx, cl
|
||||
test cl, 32 ; Count >= 32?
|
||||
cmovnz ecx, eax ; switch eax & edx if Count >= 32
|
||||
cmovnz eax, edx
|
||||
cmovnz edx, ecx
|
||||
ret
|
||||
InternalMathRRotU64 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# RShiftU64.asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# 64-bit logical right shift function for IA-32
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.686:
|
||||
.code:
|
||||
|
||||
.globl ASM_PFX(InternalMathRShiftU64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InternalMathRShiftU64 (
|
||||
# IN UINT64 Operand,
|
||||
# IN UINTN Count
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathRShiftU64):
|
||||
movb 12(%esp), %cl
|
||||
xorl %edx, %edx
|
||||
movl 8(%esp), %eax
|
||||
testb $32, %cl
|
||||
cmovz %eax, %edx
|
||||
cmovz 0x4(%esp), %eax
|
||||
shrdl %cl, %edx, %eax
|
||||
shr %cl, %edx
|
||||
ret
|
|
@ -0,0 +1,46 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; RShiftU64.asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; 64-bit logical right shift function for IA-32
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.686
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalMathRShiftU64 (
|
||||
; IN UINT64 Operand,
|
||||
; IN UINTN Count
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalMathRShiftU64 PROC
|
||||
mov cl, [esp + 12] ; cl <- Count
|
||||
xor edx, edx
|
||||
mov eax, [esp + 8]
|
||||
test cl, 32 ; Count >= 32?
|
||||
cmovz edx, eax
|
||||
cmovz eax, [esp + 4]
|
||||
shrd eax, edx, cl
|
||||
shr edx, cl
|
||||
ret
|
||||
InternalMathRShiftU64 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadCr0.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadCr0 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadCr0)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadCr0 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadCr0):
|
||||
movl %cr0, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadCr0.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadCr0 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadCr0 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadCr0 PROC
|
||||
mov eax, cr0
|
||||
ret
|
||||
AsmReadCr0 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadCr2.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadCr2 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadCr2)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadCr2 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadCr2):
|
||||
movl %cr2, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadCr2.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadCr2 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadCr2 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadCr2 PROC
|
||||
mov eax, cr2
|
||||
ret
|
||||
AsmReadCr2 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadCr3.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadCr3 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadCr3)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadCr3 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadCr3):
|
||||
movl %cr3, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadCr3.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadCr3 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadCr3 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadCr3 PROC
|
||||
mov eax, cr3
|
||||
ret
|
||||
AsmReadCr3 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadCr4.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadCr4 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadCr4)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadCr4 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadCr4):
|
||||
movl %cr4, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadCr4.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadCr4 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadCr4 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadCr4 PROC
|
||||
mov eax, cr4
|
||||
ret
|
||||
AsmReadCr4 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadCs.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadCs function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadCs)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT16
|
||||
# EFIAPI
|
||||
# AsmReadCs (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadCs):
|
||||
movl %cs, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadCs.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadCs function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT16
|
||||
; EFIAPI
|
||||
; AsmReadCs (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadCs PROC
|
||||
mov eax, cs
|
||||
ret
|
||||
AsmReadCs ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadDr0.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadDr0 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadDr0)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadDr0 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadDr0):
|
||||
movl %dr0, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadDr0.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadDr0 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadDr0 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadDr0 PROC
|
||||
mov eax, dr0
|
||||
ret
|
||||
AsmReadDr0 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadDr1.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadDr1 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadDr1)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadDr1 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadDr1):
|
||||
movl %dr1, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadDr1.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadDr1 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadDr1 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadDr1 PROC
|
||||
mov eax, dr1
|
||||
ret
|
||||
AsmReadDr1 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadDr2.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadDr2 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadDr2)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadDr2 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadDr2):
|
||||
movl %dr2, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadDr2.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadDr2 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadDr2 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadDr2 PROC
|
||||
mov eax, dr2
|
||||
ret
|
||||
AsmReadDr2 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadDr3.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadDr3 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadDr3)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadDr3 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadDr3):
|
||||
movl %dr3, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadDr3.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadDr3 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadDr3 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadDr3 PROC
|
||||
mov eax, dr3
|
||||
ret
|
||||
AsmReadDr3 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadDr4.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadDr4 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadDr4)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadDr4 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadDr4):
|
||||
movl %dr4, %eax
|
||||
ret
|
|
@ -0,0 +1,47 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadDr4.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadDr4 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadDr4 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadDr4 PROC
|
||||
;
|
||||
; DR4 is alias to DR6 only if DE (in CR4) is cleared. Otherwise, reading
|
||||
; this register will cause a #UD exception.
|
||||
;
|
||||
; MS assembler doesn't support this instruction since no one would use it
|
||||
; under normal circustances. Here opcode is used.
|
||||
;
|
||||
DB 0fh, 21h, 0e0h
|
||||
ret
|
||||
AsmReadDr4 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadDr5.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadDr5 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadDr5)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadDr5 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadDr5):
|
||||
movl %dr5, %eax
|
||||
ret
|
|
@ -0,0 +1,47 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadDr5.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadDr5 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadDr5 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadDr5 PROC
|
||||
;
|
||||
; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, reading
|
||||
; this register will cause a #UD exception.
|
||||
;
|
||||
; MS assembler doesn't support this instruction since no one would use it
|
||||
; under normal circustances. Here opcode is used.
|
||||
;
|
||||
DB 0fh, 21h, 0e8h
|
||||
ret
|
||||
AsmReadDr5 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadDr6.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadDr6 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadDr6)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadDr6 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadDr6):
|
||||
movl %dr6, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadDr6.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadDr6 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadDr6 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadDr6 PROC
|
||||
mov eax, dr6
|
||||
ret
|
||||
AsmReadDr6 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadDr7.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadDr7 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadDr7)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadDr7 (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadDr7):
|
||||
movl %dr7, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadDr7.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadDr7 function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.586p
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadDr7 (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadDr7 PROC
|
||||
mov eax, dr7
|
||||
ret
|
||||
AsmReadDr7 ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadDs.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadDs function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadDs)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT16
|
||||
# EFIAPI
|
||||
# AsmReadDs (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadDs):
|
||||
movl %ds, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadDs.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadDs function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT16
|
||||
; EFIAPI
|
||||
; AsmReadDs (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadDs PROC
|
||||
mov eax, ds
|
||||
ret
|
||||
AsmReadDs ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadEflags.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadEflags function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadEflags)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINTN
|
||||
# EFIAPI
|
||||
# AsmReadEflags (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadEflags):
|
||||
pushfl
|
||||
pop %eax
|
||||
ret
|
|
@ -0,0 +1,41 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadEflags.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadEflags function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINTN
|
||||
; EFIAPI
|
||||
; AsmReadEflags (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadEflags PROC
|
||||
pushfd
|
||||
pop eax
|
||||
ret
|
||||
AsmReadEflags ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadEs.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadEs function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadEs)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT16
|
||||
# EFIAPI
|
||||
# AsmReadEs (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadEs):
|
||||
movl %es, %eax
|
||||
ret
|
|
@ -0,0 +1,40 @@
|
|||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation
|
||||
; All rights reserved. This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
; http://opensource.org/licenses/bsd-license.php
|
||||
;
|
||||
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
; Module Name:
|
||||
;
|
||||
; ReadEs.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmReadEs function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; UINT16
|
||||
; EFIAPI
|
||||
; AsmReadEs (
|
||||
; VOID
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmReadEs PROC
|
||||
mov eax, es
|
||||
ret
|
||||
AsmReadEs ENDP
|
||||
|
||||
END
|
|
@ -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:
|
||||
#
|
||||
# ReadFs.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadFs function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmReadFs)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT16
|
||||
# EFIAPI
|
||||
# AsmReadFs (
|
||||
# VOID
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmReadFs):
|
||||
movl %fs, %eax
|
||||
ret
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue