From 185d764218d07c06838d4758125a5ca66178e7c9 Mon Sep 17 00:00:00 2001 From: bbahnsen Date: Mon, 24 Apr 2006 22:17:39 +0000 Subject: Rename dirs git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@16 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm | 38 ++++ MdePkg/Library/BaseLib/Ia32/ARShiftU64.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/CpuId.asm | 66 +++++++ MdePkg/Library/BaseLib/Ia32/CpuId.s | 63 +++++++ MdePkg/Library/BaseLib/Ia32/CpuPause.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/CpuPause.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/CpuSleep.asm | 39 +++++ MdePkg/Library/BaseLib/Ia32/CpuSleep.s | 40 +++++ MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/DisableInterrupts.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm | 57 ++++++ MdePkg/Library/BaseLib/Ia32/DisablePaging32.s | 58 +++++++ MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c | 38 ++++ MdePkg/Library/BaseLib/Ia32/DivU64x32.asm | 38 ++++ MdePkg/Library/BaseLib/Ia32/DivU64x32.s | 39 +++++ MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm | 42 +++++ MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.s | 43 +++++ MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm | 83 +++++++++ MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.s | 89 ++++++++++ .../BaseLib/Ia32/EnableDisableInterrupts.asm | 41 +++++ .../Library/BaseLib/Ia32/EnableDisableInterrupts.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/EnableInterrupts.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm | 57 ++++++ MdePkg/Library/BaseLib/Ia32/EnablePaging32.s | 58 +++++++ MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm | 57 ++++++ MdePkg/Library/BaseLib/Ia32/EnablePaging64.s | 66 +++++++ MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm | 42 +++++ MdePkg/Library/BaseLib/Ia32/FlushCacheLine.s | 43 +++++ MdePkg/Library/BaseLib/Ia32/FxRestore.asm | 42 +++++ MdePkg/Library/BaseLib/Ia32/FxRestore.s | 43 +++++ MdePkg/Library/BaseLib/Ia32/FxSave.asm | 42 +++++ MdePkg/Library/BaseLib/Ia32/FxSave.s | 43 +++++ .../BaseLib/Ia32/InterlockedCompareExchange32.asm | 45 +++++ .../BaseLib/Ia32/InterlockedCompareExchange32.s | 64 +++++++ .../BaseLib/Ia32/InterlockedCompareExchange64.asm | 47 +++++ .../BaseLib/Ia32/InterlockedCompareExchange64.s | 52 ++++++ .../Library/BaseLib/Ia32/InterlockedDecrement.asm | 42 +++++ MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.s | 44 +++++ .../Library/BaseLib/Ia32/InterlockedIncrement.asm | 42 +++++ MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.s | 44 +++++ MdePkg/Library/BaseLib/Ia32/Invd.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/Invd.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/LRotU64.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/LRotU64.s | 43 +++++ MdePkg/Library/BaseLib/Ia32/LShiftU64.asm | 38 ++++ MdePkg/Library/BaseLib/Ia32/LShiftU64.s | 39 +++++ MdePkg/Library/BaseLib/Ia32/LongJump.asm | 38 ++++ MdePkg/Library/BaseLib/Ia32/LongJump.s | 39 +++++ MdePkg/Library/BaseLib/Ia32/ModU64x32.asm | 37 ++++ MdePkg/Library/BaseLib/Ia32/ModU64x32.s | 38 ++++ MdePkg/Library/BaseLib/Ia32/Monitor.asm | 45 +++++ MdePkg/Library/BaseLib/Ia32/Monitor.s | 46 +++++ MdePkg/Library/BaseLib/Ia32/MultU64x32.asm | 35 ++++ MdePkg/Library/BaseLib/Ia32/MultU64x32.s | 36 ++++ MdePkg/Library/BaseLib/Ia32/MultU64x64.asm | 39 +++++ MdePkg/Library/BaseLib/Ia32/MultU64x64.s | 49 ++++++ MdePkg/Library/BaseLib/Ia32/Mwait.asm | 43 +++++ MdePkg/Library/BaseLib/Ia32/Mwait.s | 44 +++++ MdePkg/Library/BaseLib/Ia32/Non-existing.c | 30 ++++ MdePkg/Library/BaseLib/Ia32/RRotU64.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/RRotU64.s | 43 +++++ MdePkg/Library/BaseLib/Ia32/RShiftU64.asm | 38 ++++ MdePkg/Library/BaseLib/Ia32/RShiftU64.s | 39 +++++ MdePkg/Library/BaseLib/Ia32/ReadCr0.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadCr0.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadCr2.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadCr2.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadCr3.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadCr3.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadCr4.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadCr4.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadCs.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadCs.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr0.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr0.s | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr1.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr1.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr2.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr2.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr3.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr3.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr4.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr5.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr6.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr6.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr7.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadDr7.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadDs.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadDs.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadEflags.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadEflags.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/ReadEs.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadEs.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadFs.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadFs.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadGdtr.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/ReadGs.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadGs.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm | 34 ++++ MdePkg/Library/BaseLib/Ia32/ReadIdtr.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadLdtr.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm0.asm | 45 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm0.s | 46 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm1.asm | 45 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm1.s | 46 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm2.asm | 45 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm2.s | 46 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm3.asm | 45 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm3.s | 46 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm4.asm | 45 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm4.s | 46 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm5.asm | 45 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm5.s | 46 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm6.asm | 45 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm6.s | 46 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm7.asm | 45 +++++ MdePkg/Library/BaseLib/Ia32/ReadMm7.s | 46 +++++ MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm | 55 ++++++ MdePkg/Library/BaseLib/Ia32/ReadMsr64.s | 57 ++++++ MdePkg/Library/BaseLib/Ia32/ReadPmc.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadPmc.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/ReadSs.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadSs.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadTr.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadTr.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/ReadTsc.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/ReadTsc.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/SetJump.asm | 39 +++++ MdePkg/Library/BaseLib/Ia32/SetJump.s | 40 +++++ MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm | 36 ++++ MdePkg/Library/BaseLib/Ia32/SwitchStack.c | 57 ++++++ MdePkg/Library/BaseLib/Ia32/Thunk16.asm | 163 ++++++++++++++++++ MdePkg/Library/BaseLib/Ia32/Thunk16.s | 191 +++++++++++++++++++++ MdePkg/Library/BaseLib/Ia32/Wbinvd.asm | 40 +++++ MdePkg/Library/BaseLib/Ia32/Wbinvd.s | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteCr0.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteCr0.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteCr2.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteCr2.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteCr3.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteCr3.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteCr4.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteCr4.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr0.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr0.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr1.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr1.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr2.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr2.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr3.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr3.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr4.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr5.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr6.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr6.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr7.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteDr7.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm | 34 ++++ MdePkg/Library/BaseLib/Ia32/WriteGdtr.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm | 34 ++++ MdePkg/Library/BaseLib/Ia32/WriteIdtr.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteLdtr.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm0.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm0.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm1.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm1.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm2.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm2.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm3.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm3.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm4.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm4.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm5.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm5.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm6.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm6.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm7.asm | 41 +++++ MdePkg/Library/BaseLib/Ia32/WriteMm7.s | 42 +++++ MdePkg/Library/BaseLib/Ia32/WriteMsr32.asm | 44 +++++ MdePkg/Library/BaseLib/Ia32/WriteMsr32.s | 45 +++++ MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm | 44 +++++ MdePkg/Library/BaseLib/Ia32/WriteMsr64.s | 45 +++++ MdePkg/Library/BaseLib/X64/CpuBreakpoint.asm | 37 ++++ MdePkg/Library/BaseLib/X64/CpuFlushTlb.asm | 38 ++++ MdePkg/Library/BaseLib/X64/CpuId.asm | 62 +++++++ MdePkg/Library/BaseLib/X64/CpuPause.asm | 37 ++++ MdePkg/Library/BaseLib/X64/CpuSleep.asm | 37 ++++ MdePkg/Library/BaseLib/X64/DisableInterrupts.asm | 38 ++++ MdePkg/Library/BaseLib/X64/DisablePaging64.asm | 54 ++++++ .../BaseLib/X64/EnableDisableInterrupts.asm | 39 +++++ MdePkg/Library/BaseLib/X64/EnableInterrupts.asm | 38 ++++ MdePkg/Library/BaseLib/X64/FlushCacheLine.asm | 38 ++++ MdePkg/Library/BaseLib/X64/FxRestore.asm | 31 ++++ MdePkg/Library/BaseLib/X64/FxSave.asm | 31 ++++ .../BaseLib/X64/InterlockedCompareExchange32.asm | 41 +++++ .../BaseLib/X64/InterlockedCompareExchange64.asm | 41 +++++ .../Library/BaseLib/X64/InterlockedDecrement.asm | 39 +++++ .../Library/BaseLib/X64/InterlockedIncrement.asm | 39 +++++ MdePkg/Library/BaseLib/X64/Invd.asm | 38 ++++ MdePkg/Library/BaseLib/X64/LongJump.asm | 38 ++++ MdePkg/Library/BaseLib/X64/Monitor.asm | 43 +++++ MdePkg/Library/BaseLib/X64/Mwait.asm | 41 +++++ MdePkg/Library/BaseLib/X64/Non-existing.c | 54 ++++++ MdePkg/Library/BaseLib/X64/ReadCr0.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadCr2.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadCr3.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadCr4.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadCs.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadDr0.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadDr1.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadDr2.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadDr3.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadDr4.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadDr5.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadDr6.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadDr7.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadDs.asm | 39 +++++ MdePkg/Library/BaseLib/X64/ReadEflags.asm | 39 +++++ MdePkg/Library/BaseLib/X64/ReadEs.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadFs.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadGdtr.asm | 31 ++++ MdePkg/Library/BaseLib/X64/ReadGs.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadIdtr.asm | 31 ++++ MdePkg/Library/BaseLib/X64/ReadLdtr.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadMm0.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadMm1.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadMm2.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadMm3.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadMm4.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadMm5.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadMm6.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadMm7.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadMsr32.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadMsr64.asm | 40 +++++ MdePkg/Library/BaseLib/X64/ReadPmc.asm | 43 +++++ MdePkg/Library/BaseLib/X64/ReadSs.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadTr.asm | 38 ++++ MdePkg/Library/BaseLib/X64/ReadTsc.asm | 40 +++++ MdePkg/Library/BaseLib/X64/SetJump.asm | 40 +++++ MdePkg/Library/BaseLib/X64/SwitchStack.asm | 47 +++++ MdePkg/Library/BaseLib/X64/Thunk16.asm | 189 ++++++++++++++++++++ MdePkg/Library/BaseLib/X64/Wbinvd.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteCr0.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteCr2.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteCr3.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteCr4.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteDr0.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteDr1.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteDr2.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteDr3.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteDr4.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteDr5.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteDr6.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteDr7.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteGdtr.asm | 31 ++++ MdePkg/Library/BaseLib/X64/WriteIdtr.asm | 31 ++++ MdePkg/Library/BaseLib/X64/WriteLdtr.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteMm0.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteMm1.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteMm2.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteMm3.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteMm4.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteMm5.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteMm6.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteMm7.asm | 38 ++++ MdePkg/Library/BaseLib/X64/WriteMsr32.asm | 41 +++++ MdePkg/Library/BaseLib/X64/WriteMsr64.asm | 43 +++++ MdePkg/Library/BaseLib/ia32/ARShiftU64.asm | 38 ---- MdePkg/Library/BaseLib/ia32/ARShiftU64.s | 41 ----- MdePkg/Library/BaseLib/ia32/CpuBreakpoint.asm | 40 ----- MdePkg/Library/BaseLib/ia32/CpuBreakpoint.s | 41 ----- MdePkg/Library/BaseLib/ia32/CpuFlushTlb.asm | 40 ----- MdePkg/Library/BaseLib/ia32/CpuFlushTlb.s | 41 ----- MdePkg/Library/BaseLib/ia32/CpuId.asm | 66 ------- MdePkg/Library/BaseLib/ia32/CpuId.s | 63 ------- MdePkg/Library/BaseLib/ia32/CpuPause.asm | 40 ----- MdePkg/Library/BaseLib/ia32/CpuPause.s | 41 ----- MdePkg/Library/BaseLib/ia32/CpuSleep.asm | 39 ----- MdePkg/Library/BaseLib/ia32/CpuSleep.s | 40 ----- MdePkg/Library/BaseLib/ia32/DisableInterrupts.asm | 40 ----- MdePkg/Library/BaseLib/ia32/DisableInterrupts.s | 41 ----- MdePkg/Library/BaseLib/ia32/DisablePaging32.asm | 57 ------ MdePkg/Library/BaseLib/ia32/DisablePaging32.s | 58 ------- MdePkg/Library/BaseLib/ia32/DivS64x64Remainder.c | 38 ---- MdePkg/Library/BaseLib/ia32/DivU64x32.asm | 38 ---- MdePkg/Library/BaseLib/ia32/DivU64x32.s | 39 ----- MdePkg/Library/BaseLib/ia32/DivU64x32Remainder.asm | 42 ----- MdePkg/Library/BaseLib/ia32/DivU64x32Remainder.s | 43 ----- MdePkg/Library/BaseLib/ia32/DivU64x64Remainder.asm | 83 --------- MdePkg/Library/BaseLib/ia32/DivU64x64Remainder.s | 89 ---------- .../BaseLib/ia32/EnableDisableInterrupts.asm | 41 ----- .../Library/BaseLib/ia32/EnableDisableInterrupts.s | 42 ----- MdePkg/Library/BaseLib/ia32/EnableInterrupts.asm | 40 ----- MdePkg/Library/BaseLib/ia32/EnableInterrupts.s | 41 ----- MdePkg/Library/BaseLib/ia32/EnablePaging32.asm | 57 ------ MdePkg/Library/BaseLib/ia32/EnablePaging32.s | 58 ------- MdePkg/Library/BaseLib/ia32/EnablePaging64.asm | 57 ------ MdePkg/Library/BaseLib/ia32/EnablePaging64.s | 66 ------- MdePkg/Library/BaseLib/ia32/FlushCacheLine.asm | 42 ----- MdePkg/Library/BaseLib/ia32/FlushCacheLine.s | 43 ----- MdePkg/Library/BaseLib/ia32/FxRestore.asm | 42 ----- MdePkg/Library/BaseLib/ia32/FxRestore.s | 43 ----- MdePkg/Library/BaseLib/ia32/FxSave.asm | 42 ----- MdePkg/Library/BaseLib/ia32/FxSave.s | 43 ----- .../BaseLib/ia32/InterlockedCompareExchange32.asm | 45 ----- .../BaseLib/ia32/InterlockedCompareExchange32.s | 64 ------- .../BaseLib/ia32/InterlockedCompareExchange64.asm | 47 ----- .../BaseLib/ia32/InterlockedCompareExchange64.s | 52 ------ .../Library/BaseLib/ia32/InterlockedDecrement.asm | 42 ----- MdePkg/Library/BaseLib/ia32/InterlockedDecrement.s | 44 ----- .../Library/BaseLib/ia32/InterlockedIncrement.asm | 42 ----- MdePkg/Library/BaseLib/ia32/InterlockedIncrement.s | 44 ----- MdePkg/Library/BaseLib/ia32/Invd.asm | 40 ----- MdePkg/Library/BaseLib/ia32/Invd.s | 41 ----- MdePkg/Library/BaseLib/ia32/LRotU64.asm | 41 ----- MdePkg/Library/BaseLib/ia32/LRotU64.s | 43 ----- MdePkg/Library/BaseLib/ia32/LShiftU64.asm | 38 ---- MdePkg/Library/BaseLib/ia32/LShiftU64.s | 39 ----- MdePkg/Library/BaseLib/ia32/LongJump.asm | 38 ---- MdePkg/Library/BaseLib/ia32/LongJump.s | 39 ----- MdePkg/Library/BaseLib/ia32/ModU64x32.asm | 37 ---- MdePkg/Library/BaseLib/ia32/ModU64x32.s | 38 ---- MdePkg/Library/BaseLib/ia32/Monitor.asm | 45 ----- MdePkg/Library/BaseLib/ia32/Monitor.s | 46 ----- MdePkg/Library/BaseLib/ia32/MultU64x32.asm | 35 ---- MdePkg/Library/BaseLib/ia32/MultU64x32.s | 36 ---- MdePkg/Library/BaseLib/ia32/MultU64x64.asm | 39 ----- MdePkg/Library/BaseLib/ia32/MultU64x64.s | 49 ------ MdePkg/Library/BaseLib/ia32/Mwait.asm | 43 ----- MdePkg/Library/BaseLib/ia32/Mwait.s | 44 ----- MdePkg/Library/BaseLib/ia32/Non-existing.c | 30 ---- MdePkg/Library/BaseLib/ia32/RRotU64.asm | 41 ----- MdePkg/Library/BaseLib/ia32/RRotU64.s | 43 ----- MdePkg/Library/BaseLib/ia32/RShiftU64.asm | 38 ---- MdePkg/Library/BaseLib/ia32/RShiftU64.s | 39 ----- MdePkg/Library/BaseLib/ia32/ReadCr0.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadCr0.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadCr2.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadCr2.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadCr3.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadCr3.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadCr4.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadCr4.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadCs.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadCs.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadDr0.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadDr0.s | 40 ----- MdePkg/Library/BaseLib/ia32/ReadDr1.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadDr1.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadDr2.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadDr2.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadDr3.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadDr3.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadDr4.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadDr5.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadDr6.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadDr6.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadDr7.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadDr7.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadDs.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadDs.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadEflags.asm | 41 ----- MdePkg/Library/BaseLib/ia32/ReadEflags.s | 42 ----- MdePkg/Library/BaseLib/ia32/ReadEs.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadEs.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadFs.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadFs.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadGdtr.asm | 41 ----- MdePkg/Library/BaseLib/ia32/ReadGdtr.s | 42 ----- MdePkg/Library/BaseLib/ia32/ReadGs.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadGs.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadIdtr.asm | 34 ---- MdePkg/Library/BaseLib/ia32/ReadIdtr.s | 42 ----- MdePkg/Library/BaseLib/ia32/ReadLdtr.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadLdtr.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadMm0.asm | 45 ----- MdePkg/Library/BaseLib/ia32/ReadMm0.s | 46 ----- MdePkg/Library/BaseLib/ia32/ReadMm1.asm | 45 ----- MdePkg/Library/BaseLib/ia32/ReadMm1.s | 46 ----- MdePkg/Library/BaseLib/ia32/ReadMm2.asm | 45 ----- MdePkg/Library/BaseLib/ia32/ReadMm2.s | 46 ----- MdePkg/Library/BaseLib/ia32/ReadMm3.asm | 45 ----- MdePkg/Library/BaseLib/ia32/ReadMm3.s | 46 ----- MdePkg/Library/BaseLib/ia32/ReadMm4.asm | 45 ----- MdePkg/Library/BaseLib/ia32/ReadMm4.s | 46 ----- MdePkg/Library/BaseLib/ia32/ReadMm5.asm | 45 ----- MdePkg/Library/BaseLib/ia32/ReadMm5.s | 46 ----- MdePkg/Library/BaseLib/ia32/ReadMm6.asm | 45 ----- MdePkg/Library/BaseLib/ia32/ReadMm6.s | 46 ----- MdePkg/Library/BaseLib/ia32/ReadMm7.asm | 45 ----- MdePkg/Library/BaseLib/ia32/ReadMm7.s | 46 ----- MdePkg/Library/BaseLib/ia32/ReadMsr64.asm | 55 ------ MdePkg/Library/BaseLib/ia32/ReadMsr64.s | 57 ------ MdePkg/Library/BaseLib/ia32/ReadPmc.asm | 41 ----- MdePkg/Library/BaseLib/ia32/ReadPmc.s | 42 ----- MdePkg/Library/BaseLib/ia32/ReadSs.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadSs.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadTr.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadTr.s | 41 ----- MdePkg/Library/BaseLib/ia32/ReadTsc.asm | 40 ----- MdePkg/Library/BaseLib/ia32/ReadTsc.s | 41 ----- MdePkg/Library/BaseLib/ia32/SetJump.asm | 39 ----- MdePkg/Library/BaseLib/ia32/SetJump.s | 40 ----- MdePkg/Library/BaseLib/ia32/SwapBytes64.asm | 36 ---- MdePkg/Library/BaseLib/ia32/SwitchStack.c | 57 ------ MdePkg/Library/BaseLib/ia32/Thunk16.asm | 163 ------------------ MdePkg/Library/BaseLib/ia32/Thunk16.s | 191 --------------------- MdePkg/Library/BaseLib/ia32/Wbinvd.asm | 40 ----- MdePkg/Library/BaseLib/ia32/Wbinvd.s | 41 ----- MdePkg/Library/BaseLib/ia32/WriteCr0.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteCr0.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteCr2.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteCr2.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteCr3.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteCr3.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteCr4.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteCr4.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteDr0.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteDr0.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteDr1.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteDr1.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteDr2.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteDr2.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteDr3.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteDr3.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteDr4.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteDr5.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteDr6.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteDr6.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteDr7.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteDr7.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteGdtr.asm | 34 ---- MdePkg/Library/BaseLib/ia32/WriteGdtr.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteIdtr.asm | 34 ---- MdePkg/Library/BaseLib/ia32/WriteIdtr.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteLdtr.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteLdtr.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteMm0.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteMm0.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteMm1.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteMm1.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteMm2.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteMm2.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteMm3.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteMm3.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteMm4.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteMm4.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteMm5.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteMm5.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteMm6.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteMm6.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteMm7.asm | 41 ----- MdePkg/Library/BaseLib/ia32/WriteMm7.s | 42 ----- MdePkg/Library/BaseLib/ia32/WriteMsr32.asm | 44 ----- MdePkg/Library/BaseLib/ia32/WriteMsr32.s | 45 ----- MdePkg/Library/BaseLib/ia32/WriteMsr64.asm | 44 ----- MdePkg/Library/BaseLib/ia32/WriteMsr64.s | 45 ----- MdePkg/Library/BaseLib/x64/CpuBreakpoint.asm | 37 ---- MdePkg/Library/BaseLib/x64/CpuFlushTlb.asm | 38 ---- MdePkg/Library/BaseLib/x64/CpuId.asm | 62 ------- MdePkg/Library/BaseLib/x64/CpuPause.asm | 37 ---- MdePkg/Library/BaseLib/x64/CpuSleep.asm | 37 ---- MdePkg/Library/BaseLib/x64/DisableInterrupts.asm | 38 ---- MdePkg/Library/BaseLib/x64/DisablePaging64.asm | 54 ------ .../BaseLib/x64/EnableDisableInterrupts.asm | 39 ----- MdePkg/Library/BaseLib/x64/EnableInterrupts.asm | 38 ---- MdePkg/Library/BaseLib/x64/FlushCacheLine.asm | 38 ---- MdePkg/Library/BaseLib/x64/FxRestore.asm | 31 ---- MdePkg/Library/BaseLib/x64/FxSave.asm | 31 ---- .../BaseLib/x64/InterlockedCompareExchange32.asm | 41 ----- .../BaseLib/x64/InterlockedCompareExchange64.asm | 41 ----- .../Library/BaseLib/x64/InterlockedDecrement.asm | 39 ----- .../Library/BaseLib/x64/InterlockedIncrement.asm | 39 ----- MdePkg/Library/BaseLib/x64/Invd.asm | 38 ---- MdePkg/Library/BaseLib/x64/LongJump.asm | 38 ---- MdePkg/Library/BaseLib/x64/Monitor.asm | 43 ----- MdePkg/Library/BaseLib/x64/Mwait.asm | 41 ----- MdePkg/Library/BaseLib/x64/Non-existing.c | 54 ------ MdePkg/Library/BaseLib/x64/ReadCr0.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadCr2.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadCr3.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadCr4.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadCs.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadDr0.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadDr1.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadDr2.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadDr3.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadDr4.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadDr5.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadDr6.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadDr7.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadDs.asm | 39 ----- MdePkg/Library/BaseLib/x64/ReadEflags.asm | 39 ----- MdePkg/Library/BaseLib/x64/ReadEs.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadFs.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadGdtr.asm | 31 ---- MdePkg/Library/BaseLib/x64/ReadGs.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadIdtr.asm | 31 ---- MdePkg/Library/BaseLib/x64/ReadLdtr.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadMm0.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadMm1.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadMm2.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadMm3.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadMm4.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadMm5.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadMm6.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadMm7.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadMsr32.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadMsr64.asm | 40 ----- MdePkg/Library/BaseLib/x64/ReadPmc.asm | 43 ----- MdePkg/Library/BaseLib/x64/ReadSs.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadTr.asm | 38 ---- MdePkg/Library/BaseLib/x64/ReadTsc.asm | 40 ----- MdePkg/Library/BaseLib/x64/SetJump.asm | 40 ----- MdePkg/Library/BaseLib/x64/SwitchStack.asm | 47 ----- MdePkg/Library/BaseLib/x64/Thunk16.asm | 189 -------------------- MdePkg/Library/BaseLib/x64/Wbinvd.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteCr0.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteCr2.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteCr3.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteCr4.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteDr0.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteDr1.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteDr2.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteDr3.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteDr4.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteDr5.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteDr6.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteDr7.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteGdtr.asm | 31 ---- MdePkg/Library/BaseLib/x64/WriteIdtr.asm | 31 ---- MdePkg/Library/BaseLib/x64/WriteLdtr.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteMm0.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteMm1.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteMm2.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteMm3.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteMm4.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteMm5.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteMm6.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteMm7.asm | 38 ---- MdePkg/Library/BaseLib/x64/WriteMsr32.asm | 41 ----- MdePkg/Library/BaseLib/x64/WriteMsr64.asm | 43 ----- 550 files changed, 11875 insertions(+), 11875 deletions(-) create mode 100644 MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ARShiftU64.s create mode 100644 MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.s create mode 100644 MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.s create mode 100644 MdePkg/Library/BaseLib/Ia32/CpuId.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/CpuId.s create mode 100644 MdePkg/Library/BaseLib/Ia32/CpuPause.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/CpuPause.s create mode 100644 MdePkg/Library/BaseLib/Ia32/CpuSleep.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/CpuSleep.s create mode 100644 MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/DisableInterrupts.s create mode 100644 MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/DisablePaging32.s create mode 100644 MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c create mode 100644 MdePkg/Library/BaseLib/Ia32/DivU64x32.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/DivU64x32.s create mode 100644 MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.s create mode 100644 MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.s create mode 100644 MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.s create mode 100644 MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/EnableInterrupts.s create mode 100644 MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/EnablePaging32.s create mode 100644 MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/EnablePaging64.s create mode 100644 MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/FlushCacheLine.s create mode 100644 MdePkg/Library/BaseLib/Ia32/FxRestore.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/FxRestore.s create mode 100644 MdePkg/Library/BaseLib/Ia32/FxSave.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/FxSave.s create mode 100644 MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.s create mode 100644 MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.s create mode 100644 MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.s create mode 100644 MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.s create mode 100644 MdePkg/Library/BaseLib/Ia32/Invd.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/Invd.s create mode 100644 MdePkg/Library/BaseLib/Ia32/LRotU64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/LRotU64.s create mode 100644 MdePkg/Library/BaseLib/Ia32/LShiftU64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/LShiftU64.s create mode 100644 MdePkg/Library/BaseLib/Ia32/LongJump.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/LongJump.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ModU64x32.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ModU64x32.s create mode 100644 MdePkg/Library/BaseLib/Ia32/Monitor.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/Monitor.s create mode 100644 MdePkg/Library/BaseLib/Ia32/MultU64x32.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/MultU64x32.s create mode 100644 MdePkg/Library/BaseLib/Ia32/MultU64x64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/MultU64x64.s create mode 100644 MdePkg/Library/BaseLib/Ia32/Mwait.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/Mwait.s create mode 100644 MdePkg/Library/BaseLib/Ia32/Non-existing.c create mode 100644 MdePkg/Library/BaseLib/Ia32/RRotU64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/RRotU64.s create mode 100644 MdePkg/Library/BaseLib/Ia32/RShiftU64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/RShiftU64.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr0.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr0.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr2.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr2.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr3.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr3.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr4.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr4.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCs.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCs.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr0.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr0.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr1.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr1.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr2.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr2.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr3.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr3.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr4.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr5.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr6.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr6.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr7.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr7.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDs.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDs.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadEflags.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadEflags.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadEs.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadEs.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadFs.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadFs.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadGdtr.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadGs.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadGs.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadIdtr.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadLdtr.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm0.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm0.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm1.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm1.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm2.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm2.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm3.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm3.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm4.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm4.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm5.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm5.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm6.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm6.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm7.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm7.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMsr64.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadPmc.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadPmc.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadSs.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadSs.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadTr.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadTr.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadTsc.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadTsc.s create mode 100644 MdePkg/Library/BaseLib/Ia32/SetJump.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/SetJump.s create mode 100644 MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/SwitchStack.c create mode 100644 MdePkg/Library/BaseLib/Ia32/Thunk16.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/Thunk16.s create mode 100644 MdePkg/Library/BaseLib/Ia32/Wbinvd.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/Wbinvd.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr0.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr0.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr2.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr2.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr3.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr3.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr4.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr4.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr0.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr0.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr1.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr1.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr2.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr2.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr3.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr3.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr4.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr5.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr6.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr6.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr7.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr7.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteGdtr.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteIdtr.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteLdtr.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm0.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm0.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm1.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm1.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm2.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm2.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm3.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm3.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm4.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm4.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm5.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm5.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm6.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm6.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm7.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm7.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMsr32.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMsr32.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMsr64.s create mode 100644 MdePkg/Library/BaseLib/X64/CpuBreakpoint.asm create mode 100644 MdePkg/Library/BaseLib/X64/CpuFlushTlb.asm create mode 100644 MdePkg/Library/BaseLib/X64/CpuId.asm create mode 100644 MdePkg/Library/BaseLib/X64/CpuPause.asm create mode 100644 MdePkg/Library/BaseLib/X64/CpuSleep.asm create mode 100644 MdePkg/Library/BaseLib/X64/DisableInterrupts.asm create mode 100644 MdePkg/Library/BaseLib/X64/DisablePaging64.asm create mode 100644 MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.asm create mode 100644 MdePkg/Library/BaseLib/X64/EnableInterrupts.asm create mode 100644 MdePkg/Library/BaseLib/X64/FlushCacheLine.asm create mode 100644 MdePkg/Library/BaseLib/X64/FxRestore.asm create mode 100644 MdePkg/Library/BaseLib/X64/FxSave.asm create mode 100644 MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.asm create mode 100644 MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.asm create mode 100644 MdePkg/Library/BaseLib/X64/InterlockedDecrement.asm create mode 100644 MdePkg/Library/BaseLib/X64/InterlockedIncrement.asm create mode 100644 MdePkg/Library/BaseLib/X64/Invd.asm create mode 100644 MdePkg/Library/BaseLib/X64/LongJump.asm create mode 100644 MdePkg/Library/BaseLib/X64/Monitor.asm create mode 100644 MdePkg/Library/BaseLib/X64/Mwait.asm create mode 100644 MdePkg/Library/BaseLib/X64/Non-existing.c create mode 100644 MdePkg/Library/BaseLib/X64/ReadCr0.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadCr2.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadCr3.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadCr4.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadCs.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadDr0.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadDr1.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadDr2.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadDr3.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadDr4.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadDr5.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadDr6.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadDr7.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadDs.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadEflags.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadEs.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadFs.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadGdtr.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadGs.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadIdtr.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadLdtr.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadMm0.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadMm1.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadMm2.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadMm3.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadMm4.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadMm5.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadMm6.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadMm7.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadMsr32.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadMsr64.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadPmc.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadSs.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadTr.asm create mode 100644 MdePkg/Library/BaseLib/X64/ReadTsc.asm create mode 100644 MdePkg/Library/BaseLib/X64/SetJump.asm create mode 100644 MdePkg/Library/BaseLib/X64/SwitchStack.asm create mode 100644 MdePkg/Library/BaseLib/X64/Thunk16.asm create mode 100644 MdePkg/Library/BaseLib/X64/Wbinvd.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteCr0.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteCr2.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteCr3.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteCr4.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteDr0.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteDr1.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteDr2.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteDr3.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteDr4.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteDr5.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteDr6.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteDr7.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteGdtr.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteIdtr.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteLdtr.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteMm0.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteMm1.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteMm2.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteMm3.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteMm4.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteMm5.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteMm6.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteMm7.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteMsr32.asm create mode 100644 MdePkg/Library/BaseLib/X64/WriteMsr64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ARShiftU64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ARShiftU64.s delete mode 100644 MdePkg/Library/BaseLib/ia32/CpuBreakpoint.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/CpuBreakpoint.s delete mode 100644 MdePkg/Library/BaseLib/ia32/CpuFlushTlb.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/CpuFlushTlb.s delete mode 100644 MdePkg/Library/BaseLib/ia32/CpuId.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/CpuId.s delete mode 100644 MdePkg/Library/BaseLib/ia32/CpuPause.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/CpuPause.s delete mode 100644 MdePkg/Library/BaseLib/ia32/CpuSleep.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/CpuSleep.s delete mode 100644 MdePkg/Library/BaseLib/ia32/DisableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/DisableInterrupts.s delete mode 100644 MdePkg/Library/BaseLib/ia32/DisablePaging32.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/DisablePaging32.s delete mode 100644 MdePkg/Library/BaseLib/ia32/DivS64x64Remainder.c delete mode 100644 MdePkg/Library/BaseLib/ia32/DivU64x32.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/DivU64x32.s delete mode 100644 MdePkg/Library/BaseLib/ia32/DivU64x32Remainder.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/DivU64x32Remainder.s delete mode 100644 MdePkg/Library/BaseLib/ia32/DivU64x64Remainder.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/DivU64x64Remainder.s delete mode 100644 MdePkg/Library/BaseLib/ia32/EnableDisableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/EnableDisableInterrupts.s delete mode 100644 MdePkg/Library/BaseLib/ia32/EnableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/EnableInterrupts.s delete mode 100644 MdePkg/Library/BaseLib/ia32/EnablePaging32.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/EnablePaging32.s delete mode 100644 MdePkg/Library/BaseLib/ia32/EnablePaging64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/EnablePaging64.s delete mode 100644 MdePkg/Library/BaseLib/ia32/FlushCacheLine.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/FlushCacheLine.s delete mode 100644 MdePkg/Library/BaseLib/ia32/FxRestore.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/FxRestore.s delete mode 100644 MdePkg/Library/BaseLib/ia32/FxSave.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/FxSave.s delete mode 100644 MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange32.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange32.s delete mode 100644 MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange64.s delete mode 100644 MdePkg/Library/BaseLib/ia32/InterlockedDecrement.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/InterlockedDecrement.s delete mode 100644 MdePkg/Library/BaseLib/ia32/InterlockedIncrement.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/InterlockedIncrement.s delete mode 100644 MdePkg/Library/BaseLib/ia32/Invd.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/Invd.s delete mode 100644 MdePkg/Library/BaseLib/ia32/LRotU64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/LRotU64.s delete mode 100644 MdePkg/Library/BaseLib/ia32/LShiftU64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/LShiftU64.s delete mode 100644 MdePkg/Library/BaseLib/ia32/LongJump.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/LongJump.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ModU64x32.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ModU64x32.s delete mode 100644 MdePkg/Library/BaseLib/ia32/Monitor.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/Monitor.s delete mode 100644 MdePkg/Library/BaseLib/ia32/MultU64x32.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/MultU64x32.s delete mode 100644 MdePkg/Library/BaseLib/ia32/MultU64x64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/MultU64x64.s delete mode 100644 MdePkg/Library/BaseLib/ia32/Mwait.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/Mwait.s delete mode 100644 MdePkg/Library/BaseLib/ia32/Non-existing.c delete mode 100644 MdePkg/Library/BaseLib/ia32/RRotU64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/RRotU64.s delete mode 100644 MdePkg/Library/BaseLib/ia32/RShiftU64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/RShiftU64.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadCr0.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadCr0.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadCr2.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadCr2.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadCr3.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadCr3.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadCr4.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadCr4.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadCs.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadCs.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr0.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr0.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr1.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr1.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr2.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr2.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr3.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr3.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr4.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr5.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr6.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr6.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr7.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDr7.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDs.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadDs.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadEflags.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadEflags.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadEs.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadEs.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadFs.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadFs.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadGdtr.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadGdtr.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadGs.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadGs.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadIdtr.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadIdtr.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadLdtr.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadLdtr.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm0.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm0.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm1.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm1.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm2.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm2.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm3.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm3.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm4.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm4.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm5.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm5.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm6.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm6.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm7.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMm7.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMsr64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadMsr64.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadPmc.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadPmc.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadSs.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadSs.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadTr.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadTr.s delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadTsc.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/ReadTsc.s delete mode 100644 MdePkg/Library/BaseLib/ia32/SetJump.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/SetJump.s delete mode 100644 MdePkg/Library/BaseLib/ia32/SwapBytes64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/SwitchStack.c delete mode 100644 MdePkg/Library/BaseLib/ia32/Thunk16.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/Thunk16.s delete mode 100644 MdePkg/Library/BaseLib/ia32/Wbinvd.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/Wbinvd.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteCr0.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteCr0.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteCr2.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteCr2.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteCr3.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteCr3.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteCr4.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteCr4.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr0.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr0.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr1.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr1.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr2.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr2.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr3.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr3.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr4.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr5.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr6.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr6.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr7.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteDr7.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteGdtr.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteGdtr.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteIdtr.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteIdtr.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteLdtr.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteLdtr.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm0.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm0.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm1.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm1.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm2.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm2.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm3.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm3.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm4.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm4.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm5.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm5.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm6.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm6.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm7.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMm7.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMsr32.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMsr32.s delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMsr64.asm delete mode 100644 MdePkg/Library/BaseLib/ia32/WriteMsr64.s delete mode 100644 MdePkg/Library/BaseLib/x64/CpuBreakpoint.asm delete mode 100644 MdePkg/Library/BaseLib/x64/CpuFlushTlb.asm delete mode 100644 MdePkg/Library/BaseLib/x64/CpuId.asm delete mode 100644 MdePkg/Library/BaseLib/x64/CpuPause.asm delete mode 100644 MdePkg/Library/BaseLib/x64/CpuSleep.asm delete mode 100644 MdePkg/Library/BaseLib/x64/DisableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/x64/DisablePaging64.asm delete mode 100644 MdePkg/Library/BaseLib/x64/EnableDisableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/x64/EnableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/x64/FlushCacheLine.asm delete mode 100644 MdePkg/Library/BaseLib/x64/FxRestore.asm delete mode 100644 MdePkg/Library/BaseLib/x64/FxSave.asm delete mode 100644 MdePkg/Library/BaseLib/x64/InterlockedCompareExchange32.asm delete mode 100644 MdePkg/Library/BaseLib/x64/InterlockedCompareExchange64.asm delete mode 100644 MdePkg/Library/BaseLib/x64/InterlockedDecrement.asm delete mode 100644 MdePkg/Library/BaseLib/x64/InterlockedIncrement.asm delete mode 100644 MdePkg/Library/BaseLib/x64/Invd.asm delete mode 100644 MdePkg/Library/BaseLib/x64/LongJump.asm delete mode 100644 MdePkg/Library/BaseLib/x64/Monitor.asm delete mode 100644 MdePkg/Library/BaseLib/x64/Mwait.asm delete mode 100644 MdePkg/Library/BaseLib/x64/Non-existing.c delete mode 100644 MdePkg/Library/BaseLib/x64/ReadCr0.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadCr2.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadCr3.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadCr4.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadCs.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadDr0.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadDr1.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadDr2.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadDr3.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadDr4.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadDr5.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadDr6.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadDr7.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadDs.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadEflags.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadEs.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadFs.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadGdtr.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadGs.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadIdtr.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadLdtr.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadMm0.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadMm1.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadMm2.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadMm3.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadMm4.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadMm5.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadMm6.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadMm7.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadMsr32.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadMsr64.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadPmc.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadSs.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadTr.asm delete mode 100644 MdePkg/Library/BaseLib/x64/ReadTsc.asm delete mode 100644 MdePkg/Library/BaseLib/x64/SetJump.asm delete mode 100644 MdePkg/Library/BaseLib/x64/SwitchStack.asm delete mode 100644 MdePkg/Library/BaseLib/x64/Thunk16.asm delete mode 100644 MdePkg/Library/BaseLib/x64/Wbinvd.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteCr0.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteCr2.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteCr3.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteCr4.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteDr0.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteDr1.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteDr2.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteDr3.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteDr4.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteDr5.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteDr6.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteDr7.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteGdtr.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteIdtr.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteLdtr.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteMm0.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteMm1.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteMm2.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteMm3.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteMm4.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteMm5.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteMm6.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteMm7.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteMsr32.asm delete mode 100644 MdePkg/Library/BaseLib/x64/WriteMsr64.asm (limited to 'MdePkg') diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm new file mode 100644 index 0000000000..6b9cfa18a8 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm @@ -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: +; +; ARShiftU64.asm +; +; Abstract: +; +; 64-bit arithmetic right shift function for IA-32 +; +;------------------------------------------------------------------------------ + + .686 + .model flat,C + .code + +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 \ No newline at end of file diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.s b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.s new file mode 100644 index 0000000000..d6af974d0f --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.s @@ -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 +# +#------------------------------------------------------------------------------ + + + + + +.global _ARShiftU64 +_ARShiftU64: + movb 12(%esp),%cl + movl 8(%esp),%eax + cltd + testb $32,%cl +# MISMATCH: " cmovz edx, eax" + cmovz %eax, %edx +# MISMATCH: " cmovz eax, [esp + 4]" + cmovz 4(%esp), %eax + shrdl %cl,%edx,%eax + sar %cl,%edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm new file mode 100644 index 0000000000..a4d397874d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm @@ -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 diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.s b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.s new file mode 100644 index 0000000000..e5d18c35b3 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.s @@ -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: +# +# CpuBreakpoint.s +# +# Abstract: +# +# CpuBreakpoint function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# CpuBreakpoint ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _CpuBreakpoint +_CpuBreakpoint: + int 3 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.asm b/MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.asm new file mode 100644 index 0000000000..de87ad75e9 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.asm @@ -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: +; +; CpuFlushTlb.Asm +; +; Abstract: +; +; CpuFlushTlb function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; CpuFlushTlb ( +; VOID +; ); +;------------------------------------------------------------------------------ +_CpuFlushTlb PROC + mov eax, cr3 + mov cr3, eax + ret +_CpuFlushTlb ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.s b/MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.s new file mode 100644 index 0000000000..1d85fa77da --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.s @@ -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: +# +# CpuFlushTlb.Asm +# +# Abstract: +# +# CpuFlushTlb function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# CpuFlushTlb ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _CpuFlushTlb +_CpuFlushTlb: + movl %cr3, %eax + movl %eax, %cr3 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.asm b/MdePkg/Library/BaseLib/Ia32/CpuId.asm new file mode 100644 index 0000000000..2c94e3a1ae --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/CpuId.asm @@ -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 diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.s b/MdePkg/Library/BaseLib/Ia32/CpuId.s new file mode 100644 index 0000000000..989daba127 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/CpuId.s @@ -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: +# +#------------------------------------------------------------------------------ + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmCpuid ( +# IN UINT32 RegisterInEax, +# OUT UINT32 *RegisterOutEax OPTIONAL, +# OUT UINT32 *RegisterOutEbx OPTIONAL, +# OUT UINT32 *RegisterOutEcx OPTIONAL, +# OUT UINT32 *RegisterOutEdx OPTIONAL +# ) +#------------------------------------------------------------------------------ +.globl _AsmCpuid +_AsmCpuid: + push %ebx + push %edi + movl 12(%esp),%eax + cpuid + movl %ecx,%edi + movl 16(%esp),%ecx + jecxz L1 + movl %eax,(%ecx) +L1: + movl 20(%esp),%ecx + jecxz L2 + movl %ebx,(%ecx) +L2: + movl 24(%esp),%ecx + jecxz L3 + movl %edi,(%ecx) +L3: + movl 28(%esp),%ecx + jecxz L4 + movl %edx,(%ecx) +L4: + pop %edi + pop %ebx + ret diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.asm b/MdePkg/Library/BaseLib/Ia32/CpuPause.asm new file mode 100644 index 0000000000..79a4f2f67b --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/CpuPause.asm @@ -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 + .xmm + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; CpuPause ( +; VOID +; ); +;------------------------------------------------------------------------------ +_CpuPause PROC + pause + ret +_CpuPause ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.s b/MdePkg/Library/BaseLib/Ia32/CpuPause.s new file mode 100644 index 0000000000..ace2c6764a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/CpuPause.s @@ -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: +# +# CpuPause.Asm +# +# Abstract: +# +# CpuPause function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# CpuPause ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _CpuPause +_CpuPause: + pause + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/CpuSleep.asm b/MdePkg/Library/BaseLib/Ia32/CpuSleep.asm new file mode 100644 index 0000000000..66fb90e903 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/CpuSleep.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; CpuSleep ( +; VOID +; ); +;------------------------------------------------------------------------------ +_CpuSleep PROC + hlt + ret +_CpuSleep ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuSleep.s b/MdePkg/Library/BaseLib/Ia32/CpuSleep.s new file mode 100644 index 0000000000..9b7713128f --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/CpuSleep.s @@ -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: +# +# CpuSleep.Asm +# +# Abstract: +# +# CpuSleep function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# CpuSleep ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _CpuSleep +_CpuSleep: + hlt + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm new file mode 100644 index 0000000000..74bdd0bd98 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; DisableInterrupts ( +; VOID +; ); +;------------------------------------------------------------------------------ +_DisableInterrupts PROC + cli + ret +_DisableInterrupts ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.s b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.s new file mode 100644 index 0000000000..cc9c95c30f --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.s @@ -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: +# +# DisableInterrupts.Asm +# +# Abstract: +# +# DisableInterrupts function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# DisableInterrupts ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _DisableInterrupts +_DisableInterrupts: + cli + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm new file mode 100644 index 0000000000..04ae8cf514 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm @@ -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 + cli + mov eax, cr0 + btr eax, 31 + mov esp, [esp + 16] + mov cr0, eax + push edi + popfd + push edx + push ecx + call ebx + jmp $ +InternalX86DisablePaging32 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.s b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.s new file mode 100644 index 0000000000..21e8a82c0e --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.s @@ -0,0 +1,58 @@ +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM 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: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmDisablePaging32 ( +# IN SWITCH_STACK_ENTRY_POINT EntryPoint, +# IN VOID *Context1, OPTIONAL +# IN VOID *Context2, OPTIONAL +# IN VOID *NewStack +# ); +#------------------------------------------------------------------------------ +.global _AsmDisablePaging32 +_AsmDisablePaging32: + movl 4(%esp),%ebx + movl 8(%esp),%ecx + movl 12(%esp),%edx + pushfl + popl %edi + cli + movl %cr0, %eax + btrl $31,%eax + movl 16(%esp),%esp + movl %eax, %cr0 + pushl %edi + popfl + pushl %edx + pushl %ecx + call *%ebx + jmp . + + + diff --git a/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c b/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c new file mode 100644 index 0000000000..219f48f321 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c @@ -0,0 +1,38 @@ +/** @file + Integer division worker functions for Ia32. + + Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + Module Name: DivS64x64Remainder.c + +**/ + +#include "../BaseLibInternals.h" + +INT64 +EFIAPI +InternalMathDivRemS64x64 ( + IN INT64 Dividend, + IN INT64 Divisor, + OUT INT64 *Remainder + ) +{ + INT64 Quot; + + Quot = InternalMathDivRemU64x64 ( + Dividend >= 0 ? Dividend : -Dividend, + Divisor >= 0 ? Divisor : -Divisor, + (UINT64 *) Remainder + ); + if (Remainder != NULL && Dividend < 0) { + *Remainder = -*Remainder; + } + return (Dividend ^ Divisor) >= 0 ? Quot : -Quot; +} diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.asm b/MdePkg/Library/BaseLib/Ia32/DivU64x32.asm new file mode 100644 index 0000000000..1ad5474586 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32.asm @@ -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: +; +; DivU64x32.asm +; +; Abstract: +; +; Calculate the quotient of a 64-bit integer by a 32-bit integer +; +;------------------------------------------------------------------------------ + + .386 + .model flat,C + .code + +InternalMathDivU64x32 PROC + mov eax, [esp + 8] + mov ecx, [esp + 12] + xor edx, edx + div ecx + push eax + mov eax, [esp + 8] + div ecx + pop edx + ret +InternalMathDivU64x32 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.s b/MdePkg/Library/BaseLib/Ia32/DivU64x32.s new file mode 100644 index 0000000000..689c7092c0 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32.s @@ -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: +# +# DivU64x32.asm +# +# Abstract: +# +# Calculate the quotient of a 64-bit integer by a 32-bit integer +# +#------------------------------------------------------------------------------ + + + + + +.global _DivU64x32 +_DivU64x32: + movl 8(%esp),%eax + movl 12(%esp),%ecx + xorl %edx,%edx + divl %ecx + pushl %eax + movl 8(%esp),%eax + divl %ecx + popl %edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm new file mode 100644 index 0000000000..f1c6c1f4ac --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm @@ -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: +; +; DivError.asm +; +; Abstract: +; +; Set error flag for all division functions +; +;------------------------------------------------------------------------------ + + .386 + .model flat,C + .code + +InternalMathDivRemU64x32 PROC + mov ecx, [esp + 12] + mov eax, [esp + 8] + xor edx, edx + div ecx + push eax + mov eax, [esp + 8] + div ecx + mov ecx, [esp + 20] + jecxz @F + mov [ecx], edx +@@: + pop edx + ret +InternalMathDivRemU64x32 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.s b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.s new file mode 100644 index 0000000000..1f34f18255 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.s @@ -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: +# +# DivError.asm +# +# Abstract: +# +# Set error flag for all division functions +# +#------------------------------------------------------------------------------ + + + + + +.global _InternalMathDivRemU64x32 +_InternalMathDivRemU64x32: + movl 12(%esp),%ecx + movl 8(%esp),%eax + xorl %edx,%edx + divl %ecx + pushl %eax + movl 8(%esp),%eax + divl %ecx + movl 20(%esp),%ecx + jecxz L1 + movl %edx,(%ecx) +L1: + popl %edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm new file mode 100644 index 0000000000..261211b946 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm @@ -0,0 +1,83 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM 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 + +InternalMathDivRemU64x64 PROC + mov ecx, [esp + 16] + test ecx, ecx + jnz _@DivRemU64x64 + mov ecx, [esp + 20] + jecxz @F + and dword ptr [ecx + 4], 0 + mov [esp + 16], ecx +@@: + jmp InternalMathDivRemU64x32 +InternalMathDivRemU64x64 ENDP + +_@DivRemU64x64 PROC USES ebx esi edi + mov edx, dword ptr [esp + 20] + mov eax, dword ptr [esp + 16] + mov edi, edx + mov esi, eax + mov ebx, dword ptr [esp + 24] +@@: + shr edx, 1 + rcr eax, 1 + shrd ebx, ecx, 1 + shr ecx, 1 + jnz @B + div ebx + mov ebx, eax + mov ecx, [esp + 28] + mul dword ptr [esp + 24] + imul ecx, ebx + add edx, ecx + mov ecx, dword ptr [esp + 32] + jc @TooLarge + cmp edi, edx + ja @Correct + jb @TooLarge + cmp esi, eax + jae @Correct +@TooLarge: + dec ebx + jecxz @Return + sub eax, dword ptr [esp + 24] + sbb edx, dword ptr [esp + 28] +@Correct: + jecxz @Return + sub esi, eax + sbb edi, edx + mov [ecx], esi + mov [ecx + 4], edi +@Return: + mov eax, ebx + xor edx, edx + ret +_@DivRemU64x64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.s b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.s new file mode 100644 index 0000000000..f604f7c72e --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.s @@ -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 +# +#------------------------------------------------------------------------------ + + + + + +.extern _InternalMathDivRemU64x32 + +.global _InternalMathDivRemU64x64 +_InternalMathDivRemU64x64: + movl 16(%esp),%ecx + testl %ecx,%ecx + jnz _DivRemU64x64 + movl 20(%esp),%ecx + jecxz L1 + and $0,4(%ecx) + movl %ecx,16(%esp) +L1: + jmp _InternalMathDivRemU64x32 + + +.global DivRemU64x64 +DivRemU64x64: +# MISMATCH: "DivRemU64x64: USES ebx esi edi" + 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 + push %edi + push %esi + push %ebx + ret diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm new file mode 100644 index 0000000000..fe2016da87 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm @@ -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 diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.s b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.s new file mode 100644 index 0000000000..80362a95b2 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.s @@ -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: +# +# EnableDisableInterrupts.Asm +# +# Abstract: +# +# EnableDisableInterrupts function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# EnableDisableInterrupts ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _EnableDisableInterrupts +_EnableDisableInterrupts: + sti + cli + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm new file mode 100644 index 0000000000..194dd8f935 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm @@ -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 diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.s b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.s new file mode 100644 index 0000000000..74413d83b6 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.s @@ -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: +# +# EnableInterrupts.Asm +# +# Abstract: +# +# EnableInterrupts function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# EnableInterrupts ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _EnableInterrupts +_EnableInterrupts: + sti + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm new file mode 100644 index 0000000000..cf6f2fe458 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm @@ -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 + cli + mov eax, cr0 + bts eax, 31 + mov esp, [esp + 16] + mov cr0, eax + push edi + popfd + push edx + push ecx + call ebx + jmp $ +InternalX86EnablePaging32 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.s b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.s new file mode 100644 index 0000000000..6f9befcb4a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.s @@ -0,0 +1,58 @@ +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM 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: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmEnablePaging32 ( +# IN SWITCH_STACK_ENTRY_POINT EntryPoint, +# IN VOID *Context1, OPTIONAL +# IN VOID *Context2, OPTIONAL +# IN VOID *NewStack +# ); +#------------------------------------------------------------------------------ +.global _AsmEnablePaging32 +_AsmEnablePaging32: + movl 4(%esp),%ebx + movl 8(%esp),%ecx + movl 12(%esp),%edx + pushfl + popl %edi + cli + movl %cr0, %eax + btsl $31,%eax + movl 16(%esp),%esp + movl %eax, %cr0 + pushl %edi + popfl + pushl %edx + pushl %ecx + call *%ebx + jmp . + + + diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm new file mode 100644 index 0000000000..6c9b0ea76b --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm @@ -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: +; +; EnablePaging64.Asm +; +; Abstract: +; +; AsmEnablePaging64 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .686p + .model flat,C + .code + +InternalX86EnablePaging64 PROC + cli + mov [esp], @F ; offset for far retf + mov eax, cr4 + or al, (1 SHL 5) + mov cr4, eax ; enable PAE + mov ecx, 0c0000080h + rdmsr + or ah, 1 ; set LME + wrmsr + mov eax, cr0 + bts eax, 31 + mov cr0, eax ; enable paging + retf +@@: ; long mode starts here + DB 67h, 48h + mov ebx, [esp] ; mov rbx, [esp] + DB 67h, 48h + mov ecx, [esp + 8] ; mov rcx, [esp + 8] + DB 67h, 48h + mov edx, [esp + 10h] ; mov rdx, [esp + 10h] + DB 67h, 48h + mov esp, [esp + 18h] ; mov rsp, [esp + 18h] + DB 48h + add esp, -20h ; add rsp, -20h + call ebx ; call rbx + jmp $ +InternalX86EnablePaging64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.s b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.s new file mode 100644 index 0000000000..b365ea762a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.s @@ -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: +# +# EnablePaging64.Asm +# +# Abstract: +# +# AsmEnablePaging64 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + #.MODEL flat + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmEnablePaging64 ( +# IN UINT16 CodeSelector, +# IN UINT64 EntryPoint, +# IN UINT64 Context1, OPTIONAL +# IN UINT64 Context2, OPTIONAL +# IN UINT64 NewStack +# ); +#------------------------------------------------------------------------------ +.global _AsmEnablePaging64 +_AsmEnablePaging64: + 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 . diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm new file mode 100644 index 0000000000..d79f217610 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm @@ -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 + .xmm + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmFlushCacheLine ( +; IN VOID *LinearAddress +; ); +;------------------------------------------------------------------------------ +_AsmFlushCacheLine PROC + mov eax, [esp + 4] + clflush [eax] + ret +_AsmFlushCacheLine ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.s b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.s new file mode 100644 index 0000000000..c14bd11d68 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.s @@ -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: +# +# FlushCacheLine.Asm +# +# Abstract: +# +# AsmFlushCacheLine function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmFlushCacheLine ( +# IN VOID *LinearAddress +# ); +#------------------------------------------------------------------------------ +.global _AsmFlushCacheLine +_AsmFlushCacheLine: + movl 4(%esp),%eax + clflush (%eax) + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.asm b/MdePkg/Library/BaseLib/Ia32/FxRestore.asm new file mode 100644 index 0000000000..e9e37d1384 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/FxRestore.asm @@ -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: +; +;------------------------------------------------------------------------------ + + .586P + .model flat,C + .xmm + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; InternalX86FxRestore ( +; IN CONST IA32_FX_BUFFER *Buffer +; ); +;------------------------------------------------------------------------------ +InternalX86FxRestore PROC + mov eax, [esp + 4] + fxrstor [eax] + ret +InternalX86FxRestore ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.s b/MdePkg/Library/BaseLib/Ia32/FxRestore.s new file mode 100644 index 0000000000..631a3ef68a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/FxRestore.s @@ -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: +# +# FxRestore.Asm +# +# Abstract: +# +# AsmFxRestore function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmFxRestore ( +# IN CONST IA32_FX_BUFFER *Buffer +# ); +#------------------------------------------------------------------------------ +.global _AsmFxRestore +_AsmFxRestore: + movl 4(%esp),%eax + fxrstor (%eax) + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.asm b/MdePkg/Library/BaseLib/Ia32/FxSave.asm new file mode 100644 index 0000000000..22496c5e57 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/FxSave.asm @@ -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: +; +;------------------------------------------------------------------------------ + + .586P + .model flat,C + .xmm + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; InternalX86FxSave ( +; OUT IA32_FX_BUFFER *Buffer +; ); +;------------------------------------------------------------------------------ +InternalX86FxSave PROC + mov eax, [esp + 4] + fxsave [eax] + ret +InternalX86FxSave ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.s b/MdePkg/Library/BaseLib/Ia32/FxSave.s new file mode 100644 index 0000000000..44a55126a9 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/FxSave.s @@ -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: +# +# FxSave.Asm +# +# Abstract: +# +# AsmFxSave function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmFxSave ( +# OUT IA32_FX_BUFFER *Buffer +# ); +#------------------------------------------------------------------------------ +.global _AsmFxSave +_AsmFxSave: + movl 4(%esp),%eax + fxsave (%eax) + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm new file mode 100644 index 0000000000..c8c20fbc92 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm @@ -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 +; InterlockedCompareExchange32 ( +; 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 diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.s b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.s new file mode 100644 index 0000000000..43bb92526e --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.s @@ -0,0 +1,64 @@ +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM 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: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID * +# EFIAPI +# InterlockedCompareExchangePointer ( +# IN VOID **Value, +# IN VOID *CompareValue, +# IN VOID *ExchangeValue +# ); +#------------------------------------------------------------------------------ +.global _InterlockedCompareExchangePointer +_InterlockedCompareExchangePointer: + # + # InterlockedCompareExchangePointer() shares the same code as + # InterlockedCompareExchange32() on IA32 and thus no code inside this + # function + # + + +#------------------------------------------------------------------------------ +# UINT32 +# EFIAPI +# InterlockedCompareExchange32 ( +# IN UINT32 *Value, +# IN UINT32 CompareValue, +# IN UINT32 ExchangeValue +# ); +#------------------------------------------------------------------------------ +.global _InterlockedCompareExchange32 +_InterlockedCompareExchange32: + movl 4(%esp),%ecx + movl 8(%esp),%eax + movl 12(%esp),%edx + lock cmpxchgl %edx,(%ecx) + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm new file mode 100644 index 0000000000..cded9206b8 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm @@ -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 +; InterlockedCompareExchange64 ( +; 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 diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.s b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.s new file mode 100644 index 0000000000..abc51e905b --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.s @@ -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: +# +# InterlockedCompareExchange64.Asm +# +# Abstract: +# +# InterlockedCompareExchange64 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# InterlockedCompareExchange64 ( +# IN UINT64 *Value, +# IN UINT64 CompareValue, +# IN UINT64 ExchangeValue +# ); +#------------------------------------------------------------------------------ +.global _InterlockedCompareExchange64 + 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 + + + diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.asm b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.asm new file mode 100644 index 0000000000..d8495405c0 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.asm @@ -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 +; InterlockedDecrement ( +; IN UINT32 *Value +; ); +;------------------------------------------------------------------------------ +InternalSyncDecrement PROC + mov eax, [esp + 4] + lock dec dword ptr [eax] + mov eax, [eax] + ret +InternalSyncDecrement ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.s b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.s new file mode 100644 index 0000000000..a7b653ac20 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.s @@ -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: +# +# InterlockedDecrement.Asm +# +# Abstract: +# +# InterlockedDecrement function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT32 +# EFIAPI +# InterlockedDecrement ( +# IN UINT32 *Value +# ); +#------------------------------------------------------------------------------ +.global _InterlockedDecrement +_InterlockedDecrement: + movl 4(%esp),%eax + lock + decl (%eax) + movl (%eax),%eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.asm b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.asm new file mode 100644 index 0000000000..a7bfb6fccd --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.asm @@ -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 +; InterlockedIncrement ( +; IN UINT32 *Value +; ); +;------------------------------------------------------------------------------ +InternalSyncIncrement PROC + mov eax, [esp + 4] + lock inc dword ptr [eax] + mov eax, [eax] + ret +InternalSyncIncrement ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.s b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.s new file mode 100644 index 0000000000..3f9beec211 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.s @@ -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: +# +# InterlockedIncrement.Asm +# +# Abstract: +# +# InterlockedIncrement function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT32 +# EFIAPI +# InterlockedIncrement ( +# IN UINT32 *Value +# ); +#------------------------------------------------------------------------------ +.global _InterlockedIncrement +_InterlockedIncrement: + movl 4(%esp),%eax + lock + incl (%eax) + movl (%eax),%eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.asm b/MdePkg/Library/BaseLib/Ia32/Invd.asm new file mode 100644 index 0000000000..5767f54848 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Invd.asm @@ -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 diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.s b/MdePkg/Library/BaseLib/Ia32/Invd.s new file mode 100644 index 0000000000..6d6c8d46cd --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Invd.s @@ -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: +# +# Invd.Asm +# +# Abstract: +# +# AsmInvd function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmInvd ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmInvd +_AsmInvd: + invd + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.asm b/MdePkg/Library/BaseLib/Ia32/LRotU64.asm new file mode 100644 index 0000000000..1d5562a799 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/LRotU64.asm @@ -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: +; +; LRotU64.asm +; +; Abstract: +; +; 64-bit left rotation for Ia32 +; +;------------------------------------------------------------------------------ + + .686 + .model flat,C + .code + +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 + cmovnz ecx, eax + cmovnz eax, edx + cmovnz edx, ecx + ret +InternalMathLRotU64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.s b/MdePkg/Library/BaseLib/Ia32/LRotU64.s new file mode 100644 index 0000000000..9c961ce378 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/LRotU64.s @@ -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: +# +# LRotU64.asm +# +# Abstract: +# +# 64-bit left rotation for Ia32 +# +#------------------------------------------------------------------------------ + + + + + +.global _LRotU64 + 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 + + + diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.asm b/MdePkg/Library/BaseLib/Ia32/LShiftU64.asm new file mode 100644 index 0000000000..9ce946ddd1 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/LShiftU64.asm @@ -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: +; +; LShiftU64.asm +; +; Abstract: +; +; 64-bit left shift function for IA-32 +; +;------------------------------------------------------------------------------ + + .686 + .model flat,C + .code + +InternalMathLShiftU64 PROC + mov cl, [esp + 12] + xor eax, eax + mov edx, [esp + 4] + test cl, 32 + cmovz eax, edx + cmovz edx, [esp + 8] + shld edx, eax, cl + shl eax, cl + ret +InternalMathLShiftU64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.s b/MdePkg/Library/BaseLib/Ia32/LShiftU64.s new file mode 100644 index 0000000000..94cbc12265 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/LShiftU64.s @@ -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: +# +# LShiftU64.asm +# +# Abstract: +# +# 64-bit left shift function for IA-32 +# +#------------------------------------------------------------------------------ + + + + + +.global _LShiftU64 +_LShiftU64: + movb 12(%esp),%cl + xorl %eax,%eax + movl 4(%esp),%edx + testb $32,%cl + cmovz %edx, %eax + cmovz 8(%esp), %edx + shldl %cl,%eax,%edx + shll %cl,%eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.asm b/MdePkg/Library/BaseLib/Ia32/LongJump.asm new file mode 100644 index 0000000000..ff0cef2273 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/LongJump.asm @@ -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: +; +; LongJump.Asm +; +; Abstract: +; +; Implementation of LongJump() on IA-32. +; +;------------------------------------------------------------------------------ + + .386 + .model flat + .code + +_LongJump PROC + pop eax + pop edx + pop eax + mov ebx, [edx] + mov esi, [edx + 4] + mov edi, [edx + 8] + mov ebp, [edx + 12] + mov esp, [edx + 16] + jmp dword ptr [edx + 20] +_LongJump ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.s b/MdePkg/Library/BaseLib/Ia32/LongJump.s new file mode 100644 index 0000000000..3da09142fc --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/LongJump.s @@ -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: +# +# LongJump.Asm +# +# Abstract: +# +# Implementation of LongJump() on IA-32. +# +#------------------------------------------------------------------------------ + + + + + +.global _LongJump +_LongJump: + popl %eax + popl %edx + popl %eax + movl (%edx),%ebx + movl 4(%edx),%esi + movl 8(%edx),%edi + movl 12(%edx),%ebp + movl 16(%edx),%esp + jmpl *20(%edx) + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.asm b/MdePkg/Library/BaseLib/Ia32/ModU64x32.asm new file mode 100644 index 0000000000..62481ce98a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ModU64x32.asm @@ -0,0 +1,37 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; DivU64x32.asm +; +; Abstract: +; +; Calculate the remainder of a 64-bit integer by a 32-bit integer +; +;------------------------------------------------------------------------------ + + .386 + .model flat,C + .code + +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 diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.s b/MdePkg/Library/BaseLib/Ia32/ModU64x32.s new file mode 100644 index 0000000000..ed9c2fee25 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ModU64x32.s @@ -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: +# +# DivU64x32.asm +# +# Abstract: +# +# Calculate the remainder of a 64-bit integer by a 32-bit integer +# +#------------------------------------------------------------------------------ + + + + + +.global _ModU64x32 +_ModU64x32: + movl 8(%esp),%eax + movl 12(%esp),%ecx + xorl %edx,%edx + divl %ecx + movl 4(%esp),%eax + divl %ecx + movl %edx,%eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.asm b/MdePkg/Library/BaseLib/Ia32/Monitor.asm new file mode 100644 index 0000000000..5d92d26673 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Monitor.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINT64 +; 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 + ret +_AsmMonitor ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.s b/MdePkg/Library/BaseLib/Ia32/Monitor.s new file mode 100644 index 0000000000..8da0e341ed --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Monitor.s @@ -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: +# +# Monitor.Asm +# +# Abstract: +# +# AsmMonitor function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmMonitor ( +# IN UINTN Eax, +# IN UINTN Ecx, +# IN UINTN Edx +# ); +#------------------------------------------------------------------------------ +.global _AsmMonitor +_AsmMonitor: + movl 4(%esp),%eax + movl 8(%esp),%ecx + movl 12(%esp),%edx + monitor %eax,%ecx,%edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.asm b/MdePkg/Library/BaseLib/Ia32/MultU64x32.asm new file mode 100644 index 0000000000..e2806e3082 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x32.asm @@ -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: +; +; MultU64x32.asm +; +; Abstract: +; +; Calculate the product of a 64-bit integer and a 32-bit integer +; +;------------------------------------------------------------------------------ + + .386 + .model flat,C + .code + +InternalMathMultU64x32 PROC + mov ecx, [esp + 12] + mov eax, ecx + imul ecx, [esp + 8] + mul dword ptr [esp + 4] + add edx, ecx + ret +InternalMathMultU64x32 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.s b/MdePkg/Library/BaseLib/Ia32/MultU64x32.s new file mode 100644 index 0000000000..03c520bcf7 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x32.s @@ -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: +# +# MultU64x32.asm +# +# Abstract: +# +# Calculate the product of a 64-bit integer and a 32-bit integer +# +#------------------------------------------------------------------------------ + + + + + +.global _MultU64x32 +_MultU64x32: + movl 12(%esp),%ecx + movl %ecx,%eax + imull 8(%esp),%ecx + mull 4(%esp) + addl %ecx,%edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.asm b/MdePkg/Library/BaseLib/Ia32/MultU64x64.asm new file mode 100644 index 0000000000..24c6a7daa3 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x64.asm @@ -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: +; +; MultU64x64.asm +; +; Abstract: +; +; Calculate the product of a 64-bit integer and another 64-bit integer +; +;------------------------------------------------------------------------------ + + .386 + .model flat,C + .code + +InternalMathMultU64x64 PROC USES ebx + mov ebx, [esp + 8] + mov edx, [esp + 16] + mov ecx, ebx + mov eax, edx + imul ebx, [esp + 20] + imul edx, [esp + 12] + add ebx, edx + mul ecx + add edx, ebx + ret +InternalMathMultU64x64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.s b/MdePkg/Library/BaseLib/Ia32/MultU64x64.s new file mode 100644 index 0000000000..8841fc44dc --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x64.s @@ -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: +# +# MultU64x64.asm +# +# Abstract: +# +# Calculate the product of a 64-bit integer and another 64-bit integer +# +#------------------------------------------------------------------------------ + + + + + +.global _MultS64x64 +_MultS64x64: + # + # MultS64x32 shares the same implementation with _MultU64x32, and thus no + # code inside this function. + # + + +.global _MultU64x64 + 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 + + + diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.asm b/MdePkg/Library/BaseLib/Ia32/Mwait.asm new file mode 100644 index 0000000000..91d505b4e2 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Mwait.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmMwait ( +; IN UINTN Eax, +; IN UINTN Ecx +; ); +;------------------------------------------------------------------------------ +_AsmMwait PROC + mov eax, [esp + 4] + mov ecx, [esp + 8] + DB 0fh, 1, 0c9h + ret +_AsmMwait ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.s b/MdePkg/Library/BaseLib/Ia32/Mwait.s new file mode 100644 index 0000000000..7e04453352 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Mwait.s @@ -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: +# +# Mwait.Asm +# +# Abstract: +# +# AsmMwait function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmMwait ( +# IN UINTN Eax, +# IN UINTN Ecx +# ); +#------------------------------------------------------------------------------ +.global _AsmMwait +_AsmMwait: + movl 4(%esp),%eax + movl 8(%esp),%ecx + mwait %eax,%ecx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/Non-existing.c b/MdePkg/Library/BaseLib/Ia32/Non-existing.c new file mode 100644 index 0000000000..4132d30c31 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Non-existing.c @@ -0,0 +1,30 @@ +/** @file + Non-existing BaseLib functions on Ia32 + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + Module Name: Non-existing.c + +**/ + +#include "../BaseLibInternals.h" + +VOID +EFIAPI +InternalX86DisablePaging64 ( + IN UINT16 CodeSelector, + IN UINT32 EntryPoint, + IN UINT32 Context1, OPTIONAL + IN UINT32 Context2, OPTIONAL + IN UINT32 NewStack + ) +{ + ASSERT (FALSE); +} diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.asm b/MdePkg/Library/BaseLib/Ia32/RRotU64.asm new file mode 100644 index 0000000000..062e201e8d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/RRotU64.asm @@ -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: +; +; RRotU64.asm +; +; Abstract: +; +; 64-bit right rotation for Ia32 +; +;------------------------------------------------------------------------------ + + .686 + .model flat,C + .code + +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 + cmovnz ecx, eax + cmovnz eax, edx + cmovnz edx, ecx + ret +InternalMathRRotU64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.s b/MdePkg/Library/BaseLib/Ia32/RRotU64.s new file mode 100644 index 0000000000..541e420a3c --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/RRotU64.s @@ -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: +# +# RRotU64.asm +# +# Abstract: +# +# 64-bit right rotation for Ia32 +# +#------------------------------------------------------------------------------ + + + + + +.global _RRotU64 + 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 + + + diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.asm b/MdePkg/Library/BaseLib/Ia32/RShiftU64.asm new file mode 100644 index 0000000000..effbc55e1c --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/RShiftU64.asm @@ -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: +; +; RShiftU64.asm +; +; Abstract: +; +; 64-bit logical right shift function for IA-32 +; +;------------------------------------------------------------------------------ + + .686 + .model flat,C + .code + +InternalMathRShiftU64 PROC + mov cl, [esp + 12] + xor edx, edx + mov eax, [esp + 8] + test cl, 32 + cmovz edx, eax + cmovz eax, [esp + 4] + shrd eax, edx, cl + shr edx, cl + ret +InternalMathRShiftU64 ENDP + + END \ No newline at end of file diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.s b/MdePkg/Library/BaseLib/Ia32/RShiftU64.s new file mode 100644 index 0000000000..5b681e391b --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/RShiftU64.s @@ -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: +# +# RShiftU64.asm +# +# Abstract: +# +# 64-bit logical right shift function for IA-32 +# +#------------------------------------------------------------------------------ + + + + + +.global _RShiftU64 +_RShiftU64: + movb 12(%esp),%cl + xorl %edx,%edx + movl 8(%esp),%eax + testb $32,%cl + cmovz %eax, %edx + cmovz 4(%esp), %eax + shrdl %cl,%edx,%eax + shrl %cl,%edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr0.asm new file mode 100644 index 0000000000..579cee2377 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr0.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadCr0 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadCr0 PROC + mov eax, cr0 + ret +_AsmReadCr0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.s b/MdePkg/Library/BaseLib/Ia32/ReadCr0.s new file mode 100644 index 0000000000..3108b71eeb --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr0.s @@ -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: +# +# ReadCr0.Asm +# +# Abstract: +# +# AsmReadCr0 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadCr0 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadCr0 +_AsmReadCr0: + movl %cr0, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr2.asm new file mode 100644 index 0000000000..3e4a926abd --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr2.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadCr2 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadCr2 PROC + mov eax, cr2 + ret +_AsmReadCr2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.s b/MdePkg/Library/BaseLib/Ia32/ReadCr2.s new file mode 100644 index 0000000000..3ce287a252 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr2.s @@ -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: +# +# ReadCr2.Asm +# +# Abstract: +# +# AsmReadCr2 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadCr2 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadCr2 +_AsmReadCr2: + movl %cr2, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr3.asm new file mode 100644 index 0000000000..c24ded8051 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr3.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadCr3 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadCr3 PROC + mov eax, cr3 + ret +_AsmReadCr3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.s b/MdePkg/Library/BaseLib/Ia32/ReadCr3.s new file mode 100644 index 0000000000..2bd63c725a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr3.s @@ -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: +# +# ReadCr3.Asm +# +# Abstract: +# +# AsmReadCr3 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadCr3 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadCr3 +_AsmReadCr3: + movl %cr3, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr4.asm new file mode 100644 index 0000000000..258f37a97f --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr4.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadCr4 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadCr4 PROC + mov eax, cr4 + ret +_AsmReadCr4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.s b/MdePkg/Library/BaseLib/Ia32/ReadCr4.s new file mode 100644 index 0000000000..4d746d807b --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr4.s @@ -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: +# +# ReadCr4.Asm +# +# Abstract: +# +# AsmReadCr4 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadCr4 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadCr4 +_AsmReadCr4: + movl %cr4, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.asm b/MdePkg/Library/BaseLib/Ia32/ReadCs.asm new file mode 100644 index 0000000000..5972d66754 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadCs.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadCs ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadCs PROC + mov ax, cs + ret +_AsmReadCs ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.s b/MdePkg/Library/BaseLib/Ia32/ReadCs.s new file mode 100644 index 0000000000..66bf4b9eeb --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadCs.s @@ -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: +# +# ReadCs.Asm +# +# Abstract: +# +# AsmReadCs function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT16 +# EFIAPI +# AsmReadCs ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadCs +_AsmReadCs: + movw %cs,%ax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr0.asm new file mode 100644 index 0000000000..4da1dd8d0d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr0.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr0 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadDr0 PROC + mov eax, dr0 + ret +_AsmReadDr0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.s b/MdePkg/Library/BaseLib/Ia32/ReadDr0.s new file mode 100644 index 0000000000..00c521b51d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr0.s @@ -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: +# +#------------------------------------------------------------------------------ + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadDr0 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadDr0 +_AsmReadDr0: + movl %dr0, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr1.asm new file mode 100644 index 0000000000..8724dd228b --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr1.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr1 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadDr1 PROC + mov eax, dr1 + ret +_AsmReadDr1 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.s b/MdePkg/Library/BaseLib/Ia32/ReadDr1.s new file mode 100644 index 0000000000..81d0e54919 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr1.s @@ -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: +# +# ReadDr1.Asm +# +# Abstract: +# +# AsmReadDr1 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadDr1 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadDr1 +_AsmReadDr1: + movl %dr1, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr2.asm new file mode 100644 index 0000000000..9122d42545 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr2.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr2 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadDr2 PROC + mov eax, dr2 + ret +_AsmReadDr2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.s b/MdePkg/Library/BaseLib/Ia32/ReadDr2.s new file mode 100644 index 0000000000..296fff699e --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr2.s @@ -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: +# +# ReadDr2.Asm +# +# Abstract: +# +# AsmReadDr2 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadDr2 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadDr2 +_AsmReadDr2: + movl %dr2, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr3.asm new file mode 100644 index 0000000000..7c1ee9826d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr3.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr3 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadDr3 PROC + mov eax, dr3 + ret +_AsmReadDr3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.s b/MdePkg/Library/BaseLib/Ia32/ReadDr3.s new file mode 100644 index 0000000000..e99391de81 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr3.s @@ -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: +# +# ReadDr3.Asm +# +# Abstract: +# +# AsmReadDr3 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadDr3 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadDr3 +_AsmReadDr3: + movl %dr3, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr4.asm new file mode 100644 index 0000000000..01724555d2 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr4.asm @@ -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: +; +; ReadDr4.Asm +; +; Abstract: +; +; AsmReadDr4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr4 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadDr4 PROC + DB 0fh, 21h, 0e0h + ret +_AsmReadDr4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm new file mode 100644 index 0000000000..a95527e44c --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm @@ -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: +; +; ReadDr5.Asm +; +; Abstract: +; +; AsmReadDr5 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr5 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadDr5 PROC + DB 0fh, 21h, 0e8h + ret +_AsmReadDr5 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr6.asm new file mode 100644 index 0000000000..b2d9a3d252 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr6.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr6 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadDr6 PROC + mov eax, dr6 + ret +_AsmReadDr6 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.s b/MdePkg/Library/BaseLib/Ia32/ReadDr6.s new file mode 100644 index 0000000000..bdadd80672 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr6.s @@ -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: +# +# ReadDr6.Asm +# +# Abstract: +# +# AsmReadDr6 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadDr6 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadDr6 +_AsmReadDr6: + movl %dr6, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr7.asm new file mode 100644 index 0000000000..23924b1184 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr7.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr7 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadDr7 PROC + mov eax, dr7 + ret +_AsmReadDr7 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.s b/MdePkg/Library/BaseLib/Ia32/ReadDr7.s new file mode 100644 index 0000000000..cf213caac9 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr7.s @@ -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: +# +# ReadDr7.Asm +# +# Abstract: +# +# AsmReadDr7 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadDr7 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadDr7 +_AsmReadDr7: + movl %dr7, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.asm b/MdePkg/Library/BaseLib/Ia32/ReadDs.asm new file mode 100644 index 0000000000..6992766e58 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDs.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadDs ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadDs PROC + mov ax, ds + ret +_AsmReadDs ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.s b/MdePkg/Library/BaseLib/Ia32/ReadDs.s new file mode 100644 index 0000000000..ca1e37937a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDs.s @@ -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: +# +# ReadDs.Asm +# +# Abstract: +# +# AsmReadDs function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT16 +# EFIAPI +# AsmReadDs ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadDs +_AsmReadDs: + movw %ds,%ax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.asm b/MdePkg/Library/BaseLib/Ia32/ReadEflags.asm new file mode 100644 index 0000000000..365b1dee87 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadEflags.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadEflags ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadEflags PROC + pushfd + pop eax + ret +_AsmReadEflags ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.s b/MdePkg/Library/BaseLib/Ia32/ReadEflags.s new file mode 100644 index 0000000000..a70a209ffb --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadEflags.s @@ -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: +# +# ReadEflags.Asm +# +# Abstract: +# +# AsmReadEflags function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadEflags ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadEflags +_AsmReadEflags: + pushfl + popl %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.asm b/MdePkg/Library/BaseLib/Ia32/ReadEs.asm new file mode 100644 index 0000000000..0ced46aa62 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadEs.asm @@ -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 + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadEs ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadEs PROC + mov ax, es + ret +_AsmReadEs ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.s b/MdePkg/Library/BaseLib/Ia32/ReadEs.s new file mode 100644 index 0000000000..69727b5afc --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadEs.s @@ -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: +# +# ReadEs.Asm +# +# Abstract: +# +# AsmReadEs function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT16 +# EFIAPI +# AsmReadEs ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadEs +_AsmReadEs: + movw %es,%ax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.asm b/MdePkg/Library/BaseLib/Ia32/ReadFs.asm new file mode 100644 index 0000000000..f1790c6e9e --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadFs.asm @@ -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: +; +; ReadFs.Asm +; +; Abstract: +; +; AsmReadFs function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386 + .model flat + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadFs ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadFs PROC + mov ax, fs + ret +_AsmReadFs ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.s b/MdePkg/Library/BaseLib/Ia32/ReadFs.s new file mode 100644 index 0000000000..7f4fdfa77c --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadFs.s @@ -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: +# +# ReadFs.Asm +# +# Abstract: +# +# AsmReadFs function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT16 +# EFIAPI +# AsmReadFs ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadFs +_AsmReadFs: + movw %fs,%ax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm new file mode 100644 index 0000000000..beacb62b0d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm @@ -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: +; +; ReadGdtr.Asm +; +; Abstract: +; +; AsmReadGdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386 + .model flat,C + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; InternalX86ReadGdtr ( +; OUT IA32_DESCRIPTOR *Gdtr +; ); +;------------------------------------------------------------------------------ +InternalX86ReadGdtr PROC + mov eax, [esp + 4] + sgdt fword ptr [eax] + ret +InternalX86ReadGdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.s b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.s new file mode 100644 index 0000000000..f03a05696d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.s @@ -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: +# +# ReadGdtr.Asm +# +# Abstract: +# +# AsmReadGdtr function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmReadGdtr ( +# OUT IA32_DESCRIPTOR *Gdtr +# ); +#------------------------------------------------------------------------------ +.global _AsmReadGdtr +_AsmReadGdtr: + movl 4(%esp),%eax + sgdt (%eax) + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.asm b/MdePkg/Library/BaseLib/Ia32/ReadGs.asm new file mode 100644 index 0000000000..1de0ebfc88 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadGs.asm @@ -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: +; +; ReadGs.Asm +; +; Abstract: +; +; AsmReadGs function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386 + .model flat + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadGs ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadGs PROC + mov ax, gs + ret +_AsmReadGs ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.s b/MdePkg/Library/BaseLib/Ia32/ReadGs.s new file mode 100644 index 0000000000..0d88a60a52 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadGs.s @@ -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: +# +# ReadGs.Asm +# +# Abstract: +# +# AsmReadGs function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT16 +# EFIAPI +# AsmReadGs ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadGs +_AsmReadGs: + movw %gs,%ax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm new file mode 100644 index 0000000000..95158be903 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm @@ -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: +; +; ReadIdtr.Asm +; +; Abstract: +; +; AsmReadIdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386 + .model flat,C + .code + +InternalX86ReadIdtr PROC + mov eax, [esp + 4] + sidt fword ptr [eax] + ret +InternalX86ReadIdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.s b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.s new file mode 100644 index 0000000000..fa72d3ba7d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.s @@ -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: +# +# ReadIdtr.Asm +# +# Abstract: +# +# AsmReadIdtr function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmReadIdtr ( +# OUT IA32_DESCRIPTOR *Idtr +# ); +#------------------------------------------------------------------------------ +.global _AsmReadIdtr +_AsmReadIdtr: + movl 4(%esp),%eax + sidt (%eax) + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm new file mode 100644 index 0000000000..a859a0e553 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm @@ -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: +; +; ReadLdtr.Asm +; +; Abstract: +; +; AsmReadLdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386 + .model flat + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadLdtr ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadLdtr PROC + sldt ax + ret +_AsmReadLdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.s b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.s new file mode 100644 index 0000000000..aea1d9265c --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.s @@ -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: +# +# ReadLdtr.Asm +# +# Abstract: +# +# AsmReadLdtr function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT16 +# EFIAPI +# AsmReadLdtr ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadLdtr +_AsmReadLdtr: + sldt %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm0.asm new file mode 100644 index 0000000000..c45895b2a8 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm0.asm @@ -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: +; +; ReadMm0.Asm +; +; Abstract: +; +; AsmReadMm0 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm0 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadMm0 PROC + push eax + push eax + movq [esp], mm0 + pop eax + pop edx + ret +_AsmReadMm0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.s b/MdePkg/Library/BaseLib/Ia32/ReadMm0.s new file mode 100644 index 0000000000..dd6b846836 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm0.s @@ -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: +# +# ReadMm0.Asm +# +# Abstract: +# +# AsmReadMm0 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadMm0 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadMm0 +_AsmReadMm0: + pushl %eax + pushl %eax + movq %mm0,(%esp) + popl %eax + popl %edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm1.asm new file mode 100644 index 0000000000..ea748cbd7e --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm1.asm @@ -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: +; +; ReadMm1.Asm +; +; Abstract: +; +; AsmReadMm1 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm1 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadMm1 PROC + push eax + push eax + movq [esp], mm1 + pop eax + pop edx + ret +_AsmReadMm1 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.s b/MdePkg/Library/BaseLib/Ia32/ReadMm1.s new file mode 100644 index 0000000000..cbaafff0f3 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm1.s @@ -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: +# +# ReadMm1.Asm +# +# Abstract: +# +# AsmReadMm1 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadMm1 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadMm1 +_AsmReadMm1: + pushl %eax + pushl %eax + movq %mm1,(%esp) + popl %eax + popl %edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm2.asm new file mode 100644 index 0000000000..ab16c513f3 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm2.asm @@ -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: +; +; ReadMm2.Asm +; +; Abstract: +; +; AsmReadMm2 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm2 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadMm2 PROC + push eax + push eax + movq [esp], mm2 + pop eax + pop edx + ret +_AsmReadMm2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.s b/MdePkg/Library/BaseLib/Ia32/ReadMm2.s new file mode 100644 index 0000000000..22a5d71ebc --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm2.s @@ -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: +# +# ReadMm2.Asm +# +# Abstract: +# +# AsmReadMm2 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadMm2 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadMm2 +_AsmReadMm2: + pushl %eax + pushl %eax + movq %mm2,(%esp) + popl %eax + popl %edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm3.asm new file mode 100644 index 0000000000..3c4bf34492 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm3.asm @@ -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: +; +; ReadMm3.Asm +; +; Abstract: +; +; AsmReadMm3 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm3 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadMm3 PROC + push eax + push eax + movq [esp], mm3 + pop eax + pop edx + ret +_AsmReadMm3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.s b/MdePkg/Library/BaseLib/Ia32/ReadMm3.s new file mode 100644 index 0000000000..dae267af7a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm3.s @@ -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: +# +# ReadMm3.Asm +# +# Abstract: +# +# AsmReadMm3 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadMm3 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadMm3 +_AsmReadMm3: + pushl %eax + pushl %eax + movq %mm3,(%esp) + popl %eax + popl %edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm4.asm new file mode 100644 index 0000000000..4c2beb885b --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm4.asm @@ -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: +; +; ReadMm4.Asm +; +; Abstract: +; +; AsmReadMm4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm4 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadMm4 PROC + push eax + push eax + movq [esp], mm4 + pop eax + pop edx + ret +_AsmReadMm4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.s b/MdePkg/Library/BaseLib/Ia32/ReadMm4.s new file mode 100644 index 0000000000..0ae1afcedd --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm4.s @@ -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: +# +# ReadMm4.Asm +# +# Abstract: +# +# AsmReadMm4 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadMm4 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadMm4 +_AsmReadMm4: + pushl %eax + pushl %eax + movq %mm4,(%esp) + popl %eax + popl %edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm5.asm new file mode 100644 index 0000000000..66e38265c6 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm5.asm @@ -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: +; +; ReadMm5.Asm +; +; Abstract: +; +; AsmReadMm5 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm5 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadMm5 PROC + push eax + push eax + movq [esp], mm5 + pop eax + pop edx + ret +_AsmReadMm5 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.s b/MdePkg/Library/BaseLib/Ia32/ReadMm5.s new file mode 100644 index 0000000000..2fad14a7e0 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm5.s @@ -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: +# +# ReadMm5.Asm +# +# Abstract: +# +# AsmReadMm5 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadMm5 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadMm5 +_AsmReadMm5: + pushl %eax + pushl %eax + movq %mm5,(%esp) + popl %eax + popl %edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm6.asm new file mode 100644 index 0000000000..69d9e13f6b --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm6.asm @@ -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: +; +; ReadMm6.Asm +; +; Abstract: +; +; AsmReadMm6 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm6 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadMm6 PROC + push eax + push eax + movq [esp], mm6 + pop eax + pop edx + ret +_AsmReadMm6 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.s b/MdePkg/Library/BaseLib/Ia32/ReadMm6.s new file mode 100644 index 0000000000..22cddfa486 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm6.s @@ -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: +# +# ReadMm6.Asm +# +# Abstract: +# +# AsmReadMm6 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadMm6 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadMm6 +_AsmReadMm6: + pushl %eax + pushl %eax + movq %mm6,(%esp) + popl %eax + popl %edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm7.asm new file mode 100644 index 0000000000..a8788cbf7a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm7.asm @@ -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: +; +; ReadMm7.Asm +; +; Abstract: +; +; AsmReadMm7 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm7 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadMm7 PROC + push eax + push eax + movq [esp], mm7 + pop eax + pop edx + ret +_AsmReadMm7 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.s b/MdePkg/Library/BaseLib/Ia32/ReadMm7.s new file mode 100644 index 0000000000..fb485a00c9 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm7.s @@ -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: +# +# ReadMm7.Asm +# +# Abstract: +# +# AsmReadMm7 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadMm7 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadMm7 +_AsmReadMm7: + pushl %eax + pushl %eax + movq %mm7,(%esp) + popl %eax + popl %edx + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm new file mode 100644 index 0000000000..6c9fe00033 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm @@ -0,0 +1,55 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; ReadMsr64.Asm +; +; Abstract: +; +; AsmReadMsr64 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .code + +;------------------------------------------------------------------------------ +; UINT32 +; EFIAPI +; AsmReadMsr32 ( +; IN UINT32 Index +; ); +;------------------------------------------------------------------------------ +_AsmReadMsr32 PROC + ; + ; AsmReadMsr32 shares the same implementation with AsmReadMsr64 and thus no + ; code inside this function + ; +_AsmReadMsr32 ENDP + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmReadMsr64 ( +; IN UINT64 Index +; ); +;------------------------------------------------------------------------------ +_AsmReadMsr64 PROC + mov ecx, [esp + 4] + rdmsr + ret +_AsmReadMsr64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.s b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.s new file mode 100644 index 0000000000..6a2c9c6688 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.s @@ -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: +# +# ReadMsr64.Asm +# +# Abstract: +# +# AsmReadMsr64 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT32 +# EFIAPI +# AsmReadMsr32 ( +# IN UINT32 Index +# ); +#------------------------------------------------------------------------------ +.global _AsmReadMsr32 +_AsmReadMsr32: + # + # AsmReadMsr32 shares the same implementation with AsmReadMsr64 and thus no + # code inside this function + # + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmReadMsr64 ( +# IN UINT64 Index +# ); +#------------------------------------------------------------------------------ +.global _AsmReadMsr64 +_AsmReadMsr64: + movl 4(%esp),%ecx + rdmsr + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.asm b/MdePkg/Library/BaseLib/Ia32/ReadPmc.asm new file mode 100644 index 0000000000..1fe598158d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadPmc.asm @@ -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: +; +; ReadPmc.Asm +; +; Abstract: +; +; AsmReadPmc function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmReadPmc ( +; IN UINT32 PmcIndex +; ); +;------------------------------------------------------------------------------ +_AsmReadPmc PROC + mov ecx, [esp + 4] + rdpmc + ret +_AsmReadPmc ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.s b/MdePkg/Library/BaseLib/Ia32/ReadPmc.s new file mode 100644 index 0000000000..868e85c23d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadPmc.s @@ -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: +# +# ReadPmc.Asm +# +# Abstract: +# +# AsmReadPmc function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmReadPmc ( +# IN UINT32 PmcIndex +# ); +#------------------------------------------------------------------------------ +.global _AsmReadPmc +_AsmReadPmc: + movl 4(%esp),%ecx + rdpmc + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.asm b/MdePkg/Library/BaseLib/Ia32/ReadSs.asm new file mode 100644 index 0000000000..6d0cd9f2a0 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadSs.asm @@ -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: +; +; ReadSs.Asm +; +; Abstract: +; +; AsmReadSs function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386 + .model flat + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadSs ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadSs PROC + mov ax, ss + ret +_AsmReadSs ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.s b/MdePkg/Library/BaseLib/Ia32/ReadSs.s new file mode 100644 index 0000000000..7db65c1490 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadSs.s @@ -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: +# +# ReadSs.Asm +# +# Abstract: +# +# AsmReadSs function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT16 +# EFIAPI +# AsmReadSs ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadSs +_AsmReadSs: + movw %ss,%ax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.asm b/MdePkg/Library/BaseLib/Ia32/ReadTr.asm new file mode 100644 index 0000000000..d77ee89123 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadTr.asm @@ -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: +; +; ReadTr.Asm +; +; Abstract: +; +; AsmReadTr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386 + .model flat + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadTr ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadTr PROC + str ax + ret +_AsmReadTr ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.s b/MdePkg/Library/BaseLib/Ia32/ReadTr.s new file mode 100644 index 0000000000..8c31e9d9fa --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadTr.s @@ -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: +# +# ReadTr.Asm +# +# Abstract: +# +# AsmReadTr function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT16 +# EFIAPI +# AsmReadTr ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadTr +_AsmReadTr: + str %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.asm b/MdePkg/Library/BaseLib/Ia32/ReadTsc.asm new file mode 100644 index 0000000000..ea3c164ecd --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadTsc.asm @@ -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: +; +; ReadTsc.Asm +; +; Abstract: +; +; AsmReadTsc function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmReadTsc ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmReadTsc PROC + rdtsc + ret +_AsmReadTsc ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.s b/MdePkg/Library/BaseLib/Ia32/ReadTsc.s new file mode 100644 index 0000000000..e7981c05b0 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadTsc.s @@ -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: +# +# ReadTsc.Asm +# +# Abstract: +# +# AsmReadTsc function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmReadTsc ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadTsc +_AsmReadTsc: + rdtsc + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/SetJump.asm b/MdePkg/Library/BaseLib/Ia32/SetJump.asm new file mode 100644 index 0000000000..41277cd20f --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/SetJump.asm @@ -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: +; +; SetJump.Asm +; +; Abstract: +; +; Implementation of SetJump() on IA-32. +; +;------------------------------------------------------------------------------ + + .386 + .model flat + .code + +_SetJump PROC + pop ecx + mov edx, [esp] + mov [edx], ebx + mov [edx + 4], esi + mov [edx + 8], edi + mov [edx + 12], ebp + mov [edx + 16], esp + mov [edx + 20], ecx + xor eax, eax + jmp ecx +_SetJump ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/SetJump.s b/MdePkg/Library/BaseLib/Ia32/SetJump.s new file mode 100644 index 0000000000..b1b6a84f63 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/SetJump.s @@ -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: +# +# SetJump.Asm +# +# Abstract: +# +# Implementation of SetJump() on IA-32. +# +#------------------------------------------------------------------------------ + + + + + +.global _SetJump +_SetJump: + popl %ecx + movl (%esp),%edx + movl %ebx,(%edx) + movl %esi,4(%edx) + movl %edi,8(%edx) + movl %ebp,12(%edx) + movl %esp,16(%edx) + movl %ecx,20(%edx) + xorl %eax,%eax + jmp *%ecx + + + diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm new file mode 100644 index 0000000000..72e366bd4d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm @@ -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: +; +; CpuId.Asm +; +; Abstract: +; +; AsmCpuid function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat,C + .code + +InternalMathSwapBytes64 PROC + mov eax, [esp + 8] + mov edx, [esp + 4] + bswap eax + bswap edx + ret +InternalMathSwapBytes64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/SwitchStack.c b/MdePkg/Library/BaseLib/Ia32/SwitchStack.c new file mode 100644 index 0000000000..77800e35dd --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/SwitchStack.c @@ -0,0 +1,57 @@ +/** @file + SwitchStack() function for IA-32. + + Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + Module Name: SwitchStack.c + +**/ + +/** + Transfers control to a function starting with a new stack. + + Transfers control to the function specified by EntryPoint using the new stack + specified by NewStack and passing in the parameters specified by Context1 and + Context2. Context1 and Context2 are optional and may be NULL. The function + EntryPoint must never return. + + If EntryPoint is NULL, then ASSERT(). + If NewStack is NULL, then ASSERT(). + + @param EntryPoint A pointer to function to call with the new stack. + @param Context1 A pointer to the context to pass into the EntryPoint + function. + @param Context2 A pointer to the context to pass into the EntryPoint + function. + @param NewStack A pointer to the new stack to use for the EntryPoint + function. + +**/ +VOID +EFIAPI +SwitchStack ( + IN SWITCH_STACK_ENTRY_POINT EntryPoint, + IN VOID *Context1, + IN VOID *Context2, + IN VOID *NewStack + ) +{ + BASE_LIBRARY_JUMP_BUFFER JumpBuffer; + + ASSERT (EntryPoint != NULL && NewStack != NULL); + + JumpBuffer.Eip = (UINTN)EntryPoint; + JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*); + JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2); + ((VOID**)JumpBuffer.Esp)[1] = Context1; + ((VOID**)JumpBuffer.Esp)[2] = Context2; + + LongJump (&JumpBuffer, (UINTN)-1); +} diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.asm b/MdePkg/Library/BaseLib/Ia32/Thunk16.asm new file mode 100644 index 0000000000..2d62d72aef --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.asm @@ -0,0 +1,163 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; Thunk.asm +; +; Abstract: +; +; Real mode thunk +; +;------------------------------------------------------------------------------ + + .686p + .model flat,C + + .data + +NullSegSel DQ 0 +_16BitCsSel LABEL QWORD + DW -1 + DW 0 + DB 0 + DB 9bh + DB 8fh ; 16-bit segment + DB 0 +_16BitDsSel LABEL QWORD + DW -1 + DW 0 + DB 0 + DB 93h + DB 8fh ; 16-bit segment + DB 0 +GdtEnd LABEL QWORD + + .const + +_16Gdtr LABEL FWORD + DW offset GdtEnd - offset NullSegSel - 1 + DD offset NullSegSel + +_16Idtr FWORD (1 SHL 10) - 1 + + .code + +IA32_REGS STRUC 4t +_EDI DD ? +_ESI DD ? +_EBP DD ? +_ESP DD ? +_EBX DD ? +_EDX DD ? +_ECX DD ? +_EAX DD ? +_DS DW ? +_ES DW ? +_FS DW ? +_GS DW ? +_EFLAGS DD ? +_EIP DD ? +_CS DW ? +_SS DW ? +IA32_REGS ENDS + +InternalAsmThunk16 PROC USES ebp ebx esi edi ds es fs gs + mov esi, [esp + 36] ; esi <- RegSet + push sizeof (IA32_REGS) + pop ecx + movzx edx, (IA32_REGS ptr [esi])._SS + mov edi, (IA32_REGS ptr [esi])._ESP + sub edi, ecx ; reserve space on realmode stack + push edi ; save stack offset + imul eax, edx, 16 ; eax <- edx * 16 + add edi, eax ; edi <- linear address of 16-bit stack + rep movsb ; copy RegSet + mov esi, edx ; esi <- 16-bit stack segment + pop ebx ; ebx <- 16-bit stack offset + mov edi, [esp + 40] ; edi <- realmode patch + push cs ; save CS segment selector + push offset @BackToThunk ; offset to back from real mode + mov eax, offset @16Return + stosd + xor eax, eax + stosw ; set CS base to 0 + mov eax, esp + stosd + mov eax, ss + stosd + mov eax, cr0 + mov ecx, eax ; ecx <- CR0 + and ecx, 7ffffffeh ; clear PE, PG bits + stosd + mov eax, cr4 + mov ebp, eax + and ebp, 300h ; clear all but PCE and OSFXSR bits + stosd + sidt fword ptr [esp + 44] ; use parameter space to save IDTR + sgdt fword ptr [edi] + lidt _16Idtr + push 10h + pop eax + push 8 + push offset @16Start + lgdt _16Gdtr + retf +@16Start: ; 16-bit starts here + mov ss, eax ; set SS to be a 16-bit segment + mov cr0, ecx + mov cr4, ebp + mov ss, esi ; set up 16-bit stack + mov sp, bx ; mov esp, ebx actually + popaw ; popad actually + pop ds + pop es + pop fs + pop gs + add sp, 4 ; skip _EFLAGS + DB 66h + retf ; transfer control to 16-bit code +@16Return: + pushf ; pushfd actually + push gs + push fs + push es + push ds + pushaw ; pushad actually + DB 67h, 66h + lds esi, fword ptr (IA32_REGS ptr [esp])._EIP + DB 67h, 66h + mov eax, [esi + 12] + mov cr4, eax ; restore CR4 + DB 67h, 66h + lgdt fword ptr [esi + 16] + DB 67h, 66h + mov eax, [esi + 8] + mov cr0, eax ; restore CR0 + xor ax, ax ; xor eax, eax actually + mov eax, ss + DB 67h + mov dword ptr (IA32_REGS ptr [esp])._SS, eax + shl ax, 4 ; shl eax, 4 actually + add ax, sp ; add eax, esp actually + add sp, sizeof (IA32_REGS) ; add esp, sizeof (IA32_REGS) + DB 67h, 66h + mov dword ptr (IA32_REGS ptr [esp - sizeof (IA32_REGS)])._ESP, esp + DB 67h, 66h + lss esp, fword ptr [esi] ; restore protected mode stack + DB 66h + retf ; go back to protected mode +@BackToThunk: + lidt fword ptr [esp + 36] ; restore protected mode IDTR + ret +InternalAsmThunk16 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.s b/MdePkg/Library/BaseLib/Ia32/Thunk16.s new file mode 100644 index 0000000000..4236996226 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.s @@ -0,0 +1,191 @@ +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# Thunk.asm +# +# Abstract: +# +# Real mode thunk +# +#------------------------------------------------------------------------------ + + + +MISMATCH: "EXTERNDEF C mCode16Size:DWORD" + +MISMATCH: "CONST SEGMENT FLAT "DATA" READONLY" + +MISMATCH: "mCode16Size DD _TEXT16SIZE" + +MISMATCH: "CONSTS" + +MISMATCH: "_DATA SEGMENT FLAT "DATA"" + +MISMATCH: "NullSegSel DQ 0" +MISMATCH: "_16BitCsSel LABEL QWORD" + .word -1 + .word 0 + .byte 0 + .byte 0x9b + .byte 0x8f # 16-bit segment + .byte 0 + +MISMATCH: "_16Gdtr LABEL FWORD" +MISMATCH: " DW $ - offset NullSegSel - 1" +MISMATCH: " DD offset NullSegSel" + +MISMATCH: "_DATAS" + +MISMATCH: "_TEXT SEGMENT FLAT "CODE" PARA" + +MISMATCH: "IA32_REGS STRUC 4t" +MISMATCH: "_EDI DD ?" +MISMATCH: "_ESI DD ?" +MISMATCH: "_EBP DD ?" +MISMATCH: "_ESP DD ?" +MISMATCH: "_EBX DD ?" +MISMATCH: "_EDX DD ?" +MISMATCH: "_ECX DD ?" +MISMATCH: "_EAX DD ?" +MISMATCH: "_DS DW ?" +MISMATCH: "_ES DW ?" +MISMATCH: "_FS DW ?" +MISMATCH: "_GS DW ?" +MISMATCH: "_EFLAGS DD ?" +MISMATCH: "_EIP DD ?" +MISMATCH: "_CS DW ?" +MISMATCH: "_SS DW ?" +MISMATCH: "IA32_REGSS" + +MISMATCH: "_STK16 STRUC 1t" +MISMATCH: "RetEip DD ?" +MISMATCH: "RetCs DW ?" +MISMATCH: "ThunkFlags DW ?" +MISMATCH: "SavedEsp DD ?" +MISMATCH: "SavedSs DW ?" +MISMATCH: "SavedGdtr FWORD ?" +MISMATCH: "SavedCr0 DD ?" +MISMATCH: "SavedCr4 DD ?" +MISMATCH: "_STK16S" + +.global _InternalAsmThunk16 +MISMATCH: "_InternalAsmThunk16: USES ebp ebx esi edi ds es fs gs" +MISMATCH: " ASSUME esi:PTR IA32_REGS" + movl 36(%esp),%esi +MISMATCH: " movzx edx, [esi]._SS" + movl $[esi]._ESP, %edi +MISMATCH: " add edi, - sizeof (_STK16) - sizeof (IA32_REGS)" + pushl %edi # save stack offset + imull $16,%edx,%eax # eax <- edx*16 + addl %eax,%edi # edi <- linear address of 16-bit stack +MISMATCH: " push sizeof (IA32_REGS) / 4" + popl %ecx + rep + movsl # copy context to 16-bit stack + popl %ebx # ebx <- 16-bit stack offset +MISMATCH: " mov eax, offset @F " + stosl + movl %cs,%eax # return segment + stosw + movl 40(%esp),%eax # THUNK flags + stosw + movl %esp,%eax + stosl # save esp + movl %ss,%eax # save ss + stosw +MISMATCH: " sgdt fword ptr [edi] " +MISMATCH: " sidt fword ptr [esp + 36] " + movl %cr0, %esi + movl %esi,6(%edi) # save CR0 +MISMATCH: " and esi, NOT 80000001h " + movl %cr4, %eax + movl %eax,10(%edi) # save CR4 +MISMATCH: " and al, NOT 30h " + movl %edx,%edi # edi <- 16-bit stack segment + movl 44(%esp),%edx + shll $16,%edx + pushl %edx +MISMATCH: " lgdt _16Gdtr " + .byte 0xea +MISMATCH: " DD offset @16Bit" + .word 8 # jmp far 8:@16Bit +@16Bit: + movl %esi, %cr0 # disable protected mode + movl %eax, %cr4 # disable PAE & PSE + lret +@@: + movl %ss,%eax + shll $4,%eax + addl %esp,%eax # eax <- address of 16-bit stack +MISMATCH: " lss esp, fword ptr (_STK16 ptr [esp + sizeof (IA32_REGS)]).SavedEsp" +MISMATCH: " lidt fword ptr [esp + 36] " + ret + + +MISMATCH: "_TEXTS" + +MISMATCH: "_TEXT16 SEGMENT USE16 "CODE" PARA" + +.global _Code16Addr +MISMATCH: "_Code16Addr: C" + + +.global RealMode +RealMode: +MISMATCH: " ASSUME bp:PTR _STK16" + movw %di,%ss # set up stack + movl %ebx,%esp +MISMATCH: " lidt fword ptr cs:[_16Idtr - _Code16Addr]" + popal + popl %ds + popl %es + popl %fs + popl %gs + addw $4,%sp # skip EFlags +MISMATCH: " test (_STK16 ptr [esp + 8]).ThunkFlags, 1" + jz @F + pushf +@@: + pushw %cs +MISMATCH: " push @FarCallRet - _Code16Addr" + jz @F +MISMATCH: " jmp fword ptr [esp + 6]" +@@: +MISMATCH: " jmp fword ptr [esp + 4]" +@FarCallRet: + pushfl + pushw %gs + pushw %fs + pushw %es + pushw %ds + pushal + cli +MISMATCH: " lea bp, [esp + sizeof (IA32_REGS)]" + .byte 0x66 +MISMATCH: " lgdt [bp].SavedGdtr" + movl $[bp].SavedCr4, %eax + movl %eax, %cr4 + movl $[bp].SavedCr0, %eax + movl %eax, %cr0 # restore CR0 +MISMATCH: " jmp fword ptr [bp].RetEip" + + +MISMATCH: "_16Idtr FWORD (1 SHL 10) - 1" + +_TEXT16: + +MISMATCH: "_TEXT16SIZE = _TEXT16- _Code16Addr" + +MISMATCH: "_TEXT16S" + + diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.asm b/MdePkg/Library/BaseLib/Ia32/Wbinvd.asm new file mode 100644 index 0000000000..07258fb9e9 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Wbinvd.asm @@ -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: +; +; Wbinvd.Asm +; +; Abstract: +; +; AsmWbinvd function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .486p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWbinvd ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmWbinvd PROC + wbinvd + ret +_AsmWbinvd ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.s b/MdePkg/Library/BaseLib/Ia32/Wbinvd.s new file mode 100644 index 0000000000..e9f6c0ce6b --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Wbinvd.s @@ -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: +# +# Wbinvd.Asm +# +# Abstract: +# +# AsmWbinvd function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWbinvd ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmWbinvd +_AsmWbinvd: + wbinvd + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr0.asm new file mode 100644 index 0000000000..d64d621cd5 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr0.asm @@ -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: +; +; WriteCr0.Asm +; +; Abstract: +; +; AsmWriteCr0 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386p + .model flat + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteCr0 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmWriteCr0 PROC + mov eax, [esp + 4] + mov cr0, eax + ret +_AsmWriteCr0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.s b/MdePkg/Library/BaseLib/Ia32/WriteCr0.s new file mode 100644 index 0000000000..6e3ad50765 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr0.s @@ -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: +# +# WriteCr0.Asm +# +# Abstract: +# +# AsmWriteCr0 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteCr0 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteCr0 +_AsmWriteCr0: + movl 4(%esp),%eax + movl %eax, %cr0 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr2.asm new file mode 100644 index 0000000000..7ab5b0f64f --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr2.asm @@ -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: +; +; WriteCr2.Asm +; +; Abstract: +; +; AsmWriteCr2 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386p + .model flat + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteCr2 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmWriteCr2 PROC + mov eax, [esp + 4] + mov cr2, eax + ret +_AsmWriteCr2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.s b/MdePkg/Library/BaseLib/Ia32/WriteCr2.s new file mode 100644 index 0000000000..cf45e01a24 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr2.s @@ -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: +# +# WriteCr2.Asm +# +# Abstract: +# +# AsmWriteCr2 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteCr2 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteCr2 +_AsmWriteCr2: + movl 4(%esp),%eax + movl %eax, %cr2 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr3.asm new file mode 100644 index 0000000000..9753de1abe --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr3.asm @@ -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: +; +; WriteCr3.Asm +; +; Abstract: +; +; AsmWriteCr3 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386p + .model flat + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteCr3 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmWriteCr3 PROC + mov eax, [esp + 4] + mov cr3, eax + ret +_AsmWriteCr3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.s b/MdePkg/Library/BaseLib/Ia32/WriteCr3.s new file mode 100644 index 0000000000..1c55581905 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr3.s @@ -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: +# +# WriteCr3.Asm +# +# Abstract: +# +# AsmWriteCr3 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteCr3 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteCr3 +_AsmWriteCr3: + movl 4(%esp),%eax + movl %eax, %cr3 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr4.asm new file mode 100644 index 0000000000..60bfe78cb6 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr4.asm @@ -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: +; +; WriteCr4.Asm +; +; Abstract: +; +; AsmWriteCr4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteCr4 ( +; VOID +; ); +;------------------------------------------------------------------------------ +_AsmWriteCr4 PROC + mov eax, [esp + 4] + mov cr4, eax + ret +_AsmWriteCr4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.s b/MdePkg/Library/BaseLib/Ia32/WriteCr4.s new file mode 100644 index 0000000000..fbe48c1cd0 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr4.s @@ -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: +# +# WriteCr4.Asm +# +# Abstract: +# +# AsmWriteCr4 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteCr4 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteCr4 +_AsmWriteCr4: + movl 4(%esp),%eax + movl %eax, %cr4 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr0.asm new file mode 100644 index 0000000000..3dab544c49 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr0.asm @@ -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: +; +; WriteDr0.Asm +; +; Abstract: +; +; AsmWriteDr0 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWriteDr0 ( +; IN UINTN Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteDr0 PROC + mov eax, [esp + 4] + mov dr0, eax + ret +_AsmWriteDr0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.s b/MdePkg/Library/BaseLib/Ia32/WriteDr0.s new file mode 100644 index 0000000000..a5a84de6b4 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr0.s @@ -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: +# +# WriteDr0.Asm +# +# Abstract: +# +# AsmWriteDr0 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteDr0 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteDr0 +_AsmWriteDr0: + movl 4(%esp),%eax + movl %eax, %dr0 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr1.asm new file mode 100644 index 0000000000..5898206c53 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr1.asm @@ -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: +; +; WriteDr1.Asm +; +; Abstract: +; +; AsmWriteDr1 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWriteDr1 ( +; IN UINTN Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteDr1 PROC + mov eax, [esp + 4] + mov dr1, eax + ret +_AsmWriteDr1 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.s b/MdePkg/Library/BaseLib/Ia32/WriteDr1.s new file mode 100644 index 0000000000..66fc2c7cf3 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr1.s @@ -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: +# +# WriteDr1.Asm +# +# Abstract: +# +# AsmWriteDr1 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteDr1 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteDr1 +_AsmWriteDr1: + movl 4(%esp),%eax + movl %eax, %dr1 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr2.asm new file mode 100644 index 0000000000..3ed25fc8ef --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr2.asm @@ -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: +; +; WriteDr2.Asm +; +; Abstract: +; +; AsmWriteDr2 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWriteDr2 ( +; IN UINTN Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteDr2 PROC + mov eax, [esp + 4] + mov dr2, eax + ret +_AsmWriteDr2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.s b/MdePkg/Library/BaseLib/Ia32/WriteDr2.s new file mode 100644 index 0000000000..7b3f780510 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr2.s @@ -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: +# +# WriteDr2.Asm +# +# Abstract: +# +# AsmWriteDr2 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteDr2 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteDr2 +_AsmWriteDr2: + movl 4(%esp),%eax + movl %eax, %dr2 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr3.asm new file mode 100644 index 0000000000..c1dbc826b3 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr3.asm @@ -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: +; +; WriteDr3.Asm +; +; Abstract: +; +; AsmWriteDr3 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWriteDr3 ( +; IN UINTN Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteDr3 PROC + mov eax, [esp + 4] + mov dr3, eax + ret +_AsmWriteDr3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.s b/MdePkg/Library/BaseLib/Ia32/WriteDr3.s new file mode 100644 index 0000000000..34d3e4f0cb --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr3.s @@ -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: +# +# WriteDr3.Asm +# +# Abstract: +# +# AsmWriteDr3 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteDr3 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteDr3 +_AsmWriteDr3: + movl 4(%esp),%eax + movl %eax, %dr3 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr4.asm new file mode 100644 index 0000000000..2c82512acc --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr4.asm @@ -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: +; +; WriteDr4.Asm +; +; Abstract: +; +; AsmWriteDr4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWriteDr4 ( +; IN UINTN Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteDr4 PROC + mov eax, [esp + 4] + DB 0fh, 23h, 0e0h + ret +_AsmWriteDr4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr5.asm new file mode 100644 index 0000000000..dc074244a1 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr5.asm @@ -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: +; +; WriteDr5.Asm +; +; Abstract: +; +; AsmWriteDr5 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWriteDr5 ( +; IN UINTN Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteDr5 PROC + mov eax, [esp + 4] + DB 0fh, 23h, 0e8h + ret +_AsmWriteDr5 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr6.asm new file mode 100644 index 0000000000..e307e827dd --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr6.asm @@ -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: +; +; WriteDr6.Asm +; +; Abstract: +; +; AsmWriteDr6 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWriteDr6 ( +; IN UINTN Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteDr6 PROC + mov eax, [esp + 4] + mov dr6, eax + ret +_AsmWriteDr6 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.s b/MdePkg/Library/BaseLib/Ia32/WriteDr6.s new file mode 100644 index 0000000000..7d7726be64 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr6.s @@ -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: +# +# WriteDr6.Asm +# +# Abstract: +# +# AsmWriteDr6 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteDr6 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteDr6 +_AsmWriteDr6: + movl 4(%esp),%eax + movl %eax, %dr6 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr7.asm new file mode 100644 index 0000000000..55dbdc9c52 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr7.asm @@ -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: +; +; WriteDr7.Asm +; +; Abstract: +; +; AsmWriteDr7 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWriteDr7 ( +; IN UINTN Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteDr7 PROC + mov eax, [esp + 4] + mov dr7, eax + ret +_AsmWriteDr7 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.s b/MdePkg/Library/BaseLib/Ia32/WriteDr7.s new file mode 100644 index 0000000000..a96f445632 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr7.s @@ -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: +# +# WriteDr7.Asm +# +# Abstract: +# +# AsmWriteDr7 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteDr7 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteDr7 +_AsmWriteDr7: + movl 4(%esp),%eax + movl %eax, %dr7 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm new file mode 100644 index 0000000000..a317e75388 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm @@ -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: +; +; WriteGdtr.Asm +; +; Abstract: +; +; AsmWriteGdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .686P + .model flat,C + .code + +InternalX86WriteGdtr PROC + mov eax, [esp + 4] + lgdt fword ptr [eax] + ret +InternalX86WriteGdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.s b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.s new file mode 100644 index 0000000000..c3eb63d9e4 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.s @@ -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: +# +# WriteGdtr.Asm +# +# Abstract: +# +# AsmWriteGdtr function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteGdtr ( +# OUT IA32_DESCRIPTOR *Gdtr +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteGdtr +_AsmWriteGdtr: + movl 4(%esp),%eax + lgdt (%eax) + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm new file mode 100644 index 0000000000..d4b3b51a04 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm @@ -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: +; +; WriteIdtr.Asm +; +; Abstract: +; +; AsmWriteIdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .686P + .model flat,C + .code + +InternalX86WriteIdtr PROC + mov eax, [esp + 4] + lidt fword ptr [eax] + ret +InternalX86WriteIdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.s b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.s new file mode 100644 index 0000000000..f71b696d97 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.s @@ -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: +# +# WriteIdtr.Asm +# +# Abstract: +# +# AsmWriteIdtr function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteIdtr ( +# OUT IA32_DESCRIPTOR *Idtr +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteIdtr +_AsmWriteIdtr: + movl 4(%esp),%eax + lidt (%eax) + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm new file mode 100644 index 0000000000..39f8b2ed5e --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm @@ -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: +; +; WriteLdtr.Asm +; +; Abstract: +; +; AsmWriteLdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .386p + .model flat + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWriteLdtr ( +; IN UINT16 Ldtr +; ); +;------------------------------------------------------------------------------ +_AsmWriteLdtr PROC + mov eax, [esp + 4] + lldt ax + ret +_AsmWriteLdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.s b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.s new file mode 100644 index 0000000000..3797bd547d --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.s @@ -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: +# +# WriteLdtr.Asm +# +# Abstract: +# +# AsmWriteLdtr function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteLdtr ( +# IN UINT16 Ldtr +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteLdtr +_AsmWriteLdtr: + movl 4(%esp),%eax + lldtw %ax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm0.asm new file mode 100644 index 0000000000..e924dbdb61 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm0.asm @@ -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: +; +; WriteMm0.Asm +; +; Abstract: +; +; AsmWriteMm0 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmWriteMm0 ( +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteMm0 PROC + movq mm0, [esp + 4] + ret +_AsmWriteMm0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.s b/MdePkg/Library/BaseLib/Ia32/WriteMm0.s new file mode 100644 index 0000000000..c4444219a9 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm0.s @@ -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: +# +# WriteMm0.Asm +# +# Abstract: +# +# AsmWriteMm0 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmWriteMm0 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteMm0 +_AsmWriteMm0: + movq 4(%esp),%mm0 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm1.asm new file mode 100644 index 0000000000..1f1d8ce8dc --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm1.asm @@ -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: +; +; WriteMm1.Asm +; +; Abstract: +; +; AsmWriteMm1 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmWriteMm1 ( +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteMm1 PROC + movq mm1, [esp + 4] + ret +_AsmWriteMm1 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.s b/MdePkg/Library/BaseLib/Ia32/WriteMm1.s new file mode 100644 index 0000000000..e3a492f9ec --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm1.s @@ -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: +# +# WriteMm1.Asm +# +# Abstract: +# +# AsmWriteMm1 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmWriteMm1 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteMm1 +_AsmWriteMm1: + movq 4(%esp),%mm1 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm2.asm new file mode 100644 index 0000000000..a18417a0d1 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm2.asm @@ -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: +; +; WriteMm2.Asm +; +; Abstract: +; +; AsmWriteMm2 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmWriteMm2 ( +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteMm2 PROC + movq mm2, [esp + 4] + ret +_AsmWriteMm2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.s b/MdePkg/Library/BaseLib/Ia32/WriteMm2.s new file mode 100644 index 0000000000..eaebb37636 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm2.s @@ -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: +# +# WriteMm2.Asm +# +# Abstract: +# +# AsmWriteMm2 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmWriteMm2 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteMm2 +_AsmWriteMm2: + movq 4(%esp),%mm2 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm3.asm new file mode 100644 index 0000000000..7aad49f77f --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm3.asm @@ -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: +; +; WriteMm3.Asm +; +; Abstract: +; +; AsmWriteMm3 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmWriteMm3 ( +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteMm3 PROC + movq mm3, [esp + 4] + ret +_AsmWriteMm3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.s b/MdePkg/Library/BaseLib/Ia32/WriteMm3.s new file mode 100644 index 0000000000..a514091732 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm3.s @@ -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: +# +# WriteMm3.Asm +# +# Abstract: +# +# AsmWriteMm3 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmWriteMm3 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteMm3 +_AsmWriteMm3: + movq 4(%esp),%mm3 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm4.asm new file mode 100644 index 0000000000..8be9c4beb8 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm4.asm @@ -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: +; +; WriteMm4.Asm +; +; Abstract: +; +; AsmWriteMm4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmWriteMm4 ( +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteMm4 PROC + movq mm4, [esp + 4] + ret +_AsmWriteMm4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.s b/MdePkg/Library/BaseLib/Ia32/WriteMm4.s new file mode 100644 index 0000000000..6d4a6cdce1 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm4.s @@ -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: +# +# WriteMm4.Asm +# +# Abstract: +# +# AsmWriteMm4 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmWriteMm4 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteMm4 +_AsmWriteMm4: + movq 4(%esp),%mm4 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm5.asm new file mode 100644 index 0000000000..bc501b397c --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm5.asm @@ -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: +; +; WriteMm5.Asm +; +; Abstract: +; +; AsmWriteMm5 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmWriteMm5 ( +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteMm5 PROC + movq mm5, [esp + 4] + ret +_AsmWriteMm5 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.s b/MdePkg/Library/BaseLib/Ia32/WriteMm5.s new file mode 100644 index 0000000000..15d433271f --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm5.s @@ -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: +# +# WriteMm5.Asm +# +# Abstract: +# +# AsmWriteMm5 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmWriteMm5 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteMm5 +_AsmWriteMm5: + movq 4(%esp),%mm5 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm6.asm new file mode 100644 index 0000000000..4a6445cb63 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm6.asm @@ -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: +; +; WriteMm6.Asm +; +; Abstract: +; +; AsmWriteMm6 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmWriteMm6 ( +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteMm6 PROC + movq mm6, [esp + 4] + ret +_AsmWriteMm6 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.s b/MdePkg/Library/BaseLib/Ia32/WriteMm6.s new file mode 100644 index 0000000000..6b1361e7a3 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm6.s @@ -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: +# +# WriteMm6.Asm +# +# Abstract: +# +# AsmWriteMm6 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmWriteMm6 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteMm6 +_AsmWriteMm6: + movq 4(%esp),%mm6 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm7.asm new file mode 100644 index 0000000000..3bc73fed27 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm7.asm @@ -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: +; +; WriteMm7.Asm +; +; Abstract: +; +; AsmWriteMm7 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .xmm + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmWriteMm7 ( +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteMm7 PROC + movq mm7, [esp + 4] + ret +_AsmWriteMm7 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.s b/MdePkg/Library/BaseLib/Ia32/WriteMm7.s new file mode 100644 index 0000000000..d702fbb242 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm7.s @@ -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: +# +# WriteMm7.Asm +# +# Abstract: +# +# AsmWriteMm7 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmWriteMm7 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteMm7 +_AsmWriteMm7: + movq 4(%esp),%mm7 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr32.asm b/MdePkg/Library/BaseLib/Ia32/WriteMsr32.asm new file mode 100644 index 0000000000..ba14514c93 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr32.asm @@ -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: +; +; WriteMsr32.Asm +; +; Abstract: +; +; AsmWriteMsr32 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .code + +;------------------------------------------------------------------------------ +; UINT32 +; EFIAPI +; AsmWriteMsr32 ( +; IN UINT32 Index, +; IN UINT32 Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteMsr32 PROC + mov eax, [esp + 8] + xor edx, edx + mov ecx, [esp + 4] + wrmsr + ret +_AsmWriteMsr32 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr32.s b/MdePkg/Library/BaseLib/Ia32/WriteMsr32.s new file mode 100644 index 0000000000..450b3b7b9f --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr32.s @@ -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: +# +# WriteMsr32.Asm +# +# Abstract: +# +# AsmWriteMsr32 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT32 +# EFIAPI +# AsmWriteMsr32 ( +# IN UINT32 Index, +# IN UINT32 Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteMsr32 +_AsmWriteMsr32: + movl 8(%esp),%eax + xorl %edx,%edx + movl 4(%esp),%ecx + wrmsr + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm new file mode 100644 index 0000000000..5afc074291 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm @@ -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: +; +; WriteMsr64.Asm +; +; Abstract: +; +; AsmWriteMsr64 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .586P + .model flat + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmWriteMsr64 ( +; IN UINT32 Index, +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +_AsmWriteMsr64 PROC + mov edx, [esp + 12] + mov eax, [esp + 8] + mov ecx, [esp + 4] + wrmsr + ret +_AsmWriteMsr64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.s b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.s new file mode 100644 index 0000000000..802aad7803 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.s @@ -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: +# +# WriteMsr64.Asm +# +# Abstract: +# +# AsmWriteMsr64 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmWriteMsr64 ( +# IN UINT32 Index, +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteMsr64 +_AsmWriteMsr64: + movl 12(%esp),%edx + movl 8(%esp),%eax + movl 4(%esp),%ecx + wrmsr + ret + + + diff --git a/MdePkg/Library/BaseLib/X64/CpuBreakpoint.asm b/MdePkg/Library/BaseLib/X64/CpuBreakpoint.asm new file mode 100644 index 0000000000..f1ebe47b21 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/CpuBreakpoint.asm @@ -0,0 +1,37 @@ +;------------------------------------------------------------------------------ ; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; CpuBreakpoint.Asm +; +; Abstract: +; +; CpuBreakpoint function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; CpuBreakpoint ( +; VOID +; ); +;------------------------------------------------------------------------------ +CpuBreakpoint PROC + int 3 + ret +CpuBreakpoint ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/CpuFlushTlb.asm b/MdePkg/Library/BaseLib/X64/CpuFlushTlb.asm new file mode 100644 index 0000000000..c2c4490e9d --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/CpuFlushTlb.asm @@ -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: +; +; CpuFlushTlb.Asm +; +; Abstract: +; +; CpuFlushTlb function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; CpuFlushTlb ( +; VOID +; ); +;------------------------------------------------------------------------------ +CpuFlushTlb PROC + mov rax, cr3 + mov cr3, rax + ret +CpuFlushTlb ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/CpuId.asm b/MdePkg/Library/BaseLib/X64/CpuId.asm new file mode 100644 index 0000000000..867e92a677 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/CpuId.asm @@ -0,0 +1,62 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; CpuId.Asm +; +; Abstract: +; +; AsmCpuid function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .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 rbx + mov eax, ecx + push rdx + push rax ; save Index on stack + cpuid + test r9, r9 + jz @F + mov [r9], ecx +@@: + pop rcx + jrcxz @F + mov [rcx], eax +@@: + mov rcx, r8 + jrcxz @F + mov [rcx], ebx +@@: + mov rcx, [rsp + 30h] + jrcxz @F + mov [rcx], edx +@@: + pop rax ; restore Index to rax as return value + ret +AsmCpuid ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/CpuPause.asm b/MdePkg/Library/BaseLib/X64/CpuPause.asm new file mode 100644 index 0000000000..d16da37712 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/CpuPause.asm @@ -0,0 +1,37 @@ +;------------------------------------------------------------------------------ ; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; CpuPause.Asm +; +; Abstract: +; +; CpuPause function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; CpuPause ( +; VOID +; ); +;------------------------------------------------------------------------------ +CpuPause PROC + pause + ret +CpuPause ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/CpuSleep.asm b/MdePkg/Library/BaseLib/X64/CpuSleep.asm new file mode 100644 index 0000000000..b2c4907032 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/CpuSleep.asm @@ -0,0 +1,37 @@ +;------------------------------------------------------------------------------ ; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; CpuSleep.Asm +; +; Abstract: +; +; CpuSleep function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; CpuSleep ( +; VOID +; ); +;------------------------------------------------------------------------------ +CpuSleep PROC + hlt + ret +CpuSleep ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/DisableInterrupts.asm b/MdePkg/Library/BaseLib/X64/DisableInterrupts.asm new file mode 100644 index 0000000000..586832c1a2 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/DisableInterrupts.asm @@ -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: +; +; DisableInterrupts.Asm +; +; Abstract: +; +; DisableInterrupts function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; DisableInterrupts ( +; VOID +; ); +;------------------------------------------------------------------------------ +DisableInterrupts PROC + cli + ret +DisableInterrupts ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/DisablePaging64.asm b/MdePkg/Library/BaseLib/X64/DisablePaging64.asm new file mode 100644 index 0000000000..3134e42571 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/DisablePaging64.asm @@ -0,0 +1,54 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; DisablePaging64.Asm +; +; Abstract: +; +; AsmDisablePaging64 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +InternalX86DisablePaging64 PROC + cli + shl rcx, 32 + lea ecx, @F + push rcx + mov ebx, edx + mov esi, r8d + mov edi, r9d + mov eax, [rsp + 28h] + retf +@@: + mov esp, eax ; set up new stack + mov rax, cr0 + btr eax, 31 + mov cr0, rax ; disable paging + mov ecx, 0c0000080h + rdmsr + and ah, NOT 1 ; clear LME + wrmsr + mov rax, cr4 + and al, NOT (1 SHL 5) ; clear PAE + mov cr4, rax + push rdi + push rsi + call rbx + jmp $ +InternalX86DisablePaging64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.asm b/MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.asm new file mode 100644 index 0000000000..0d0400f007 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.asm @@ -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: +; +; EnableDisableInterrupts.Asm +; +; Abstract: +; +; EnableDisableInterrupts function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; EnableDisableInterrupts ( +; VOID +; ); +;------------------------------------------------------------------------------ +EnableDisableInterrupts PROC + sti + cli + ret +EnableDisableInterrupts ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/EnableInterrupts.asm b/MdePkg/Library/BaseLib/X64/EnableInterrupts.asm new file mode 100644 index 0000000000..8fb4adfe37 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/EnableInterrupts.asm @@ -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: +; +; EnableInterrupts.Asm +; +; Abstract: +; +; EnableInterrupts function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; EnableInterrupts ( +; VOID +; ); +;------------------------------------------------------------------------------ +EnableInterrupts PROC + sti + ret +EnableInterrupts ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/FlushCacheLine.asm b/MdePkg/Library/BaseLib/X64/FlushCacheLine.asm new file mode 100644 index 0000000000..1d470e8753 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/FlushCacheLine.asm @@ -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: +; +; FlushCacheLine.Asm +; +; Abstract: +; +; AsmFlushCacheLine function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmFlushCacheLine ( +; IN VOID *LinearAddress +; ); +;------------------------------------------------------------------------------ +AsmFlushCacheLine PROC + clflush [rcx] + ret +AsmFlushCacheLine ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/FxRestore.asm b/MdePkg/Library/BaseLib/X64/FxRestore.asm new file mode 100644 index 0000000000..8acfc2f00f --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/FxRestore.asm @@ -0,0 +1,31 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM 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: +; +;------------------------------------------------------------------------------ + + .code + +InternalX86FxRestore PROC + fxrstor [rcx] + ret +InternalX86FxRestore ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/FxSave.asm b/MdePkg/Library/BaseLib/X64/FxSave.asm new file mode 100644 index 0000000000..cacb1f5283 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/FxSave.asm @@ -0,0 +1,31 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM 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: +; +;------------------------------------------------------------------------------ + + .code + +InternalX86FxSave PROC + fxsave [rcx] + ret +InternalX86FxSave ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.asm b/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.asm new file mode 100644 index 0000000000..55b055453f --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.asm @@ -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: +; +; InterlockedCompareExchange32 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT32 +; EFIAPI +; InterlockedCompareExchange32 ( +; IN UINT32 *Value, +; IN UINT32 CompareValue, +; IN UINT32 ExchangeValue +; ); +;------------------------------------------------------------------------------ +InternalSyncCompareExchange32 PROC + mov eax, edx + lock cmpxchg [rcx], r8d + ret +InternalSyncCompareExchange32 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.asm b/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.asm new file mode 100644 index 0000000000..88c25a56de --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.asm @@ -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: +; +; InterlockedCompareExchange64.Asm +; +; Abstract: +; +; InterlockedCompareExchange64 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; InterlockedCompareExchange64 ( +; IN UINT64 *Value, +; IN UINT64 CompareValue, +; IN UINT64 ExchangeValue +; ); +;------------------------------------------------------------------------------ +InternalSyncCompareExchange64 PROC + mov rax, rdx + lock cmpxchg [rcx], r8 + ret +InternalSyncCompareExchange64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/InterlockedDecrement.asm b/MdePkg/Library/BaseLib/X64/InterlockedDecrement.asm new file mode 100644 index 0000000000..f907fed4a8 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/InterlockedDecrement.asm @@ -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: +; +; InterlockedDecrement.Asm +; +; Abstract: +; +; InterlockedDecrement function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT32 +; EFIAPI +; InterlockedDecrement ( +; IN UINT32 *Value +; ); +;------------------------------------------------------------------------------ +InternalSyncDecrement PROC + lock dec dword ptr [rcx] + mov eax, [rcx] + ret +InternalSyncDecrement ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/InterlockedIncrement.asm b/MdePkg/Library/BaseLib/X64/InterlockedIncrement.asm new file mode 100644 index 0000000000..f5a4130bf1 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/InterlockedIncrement.asm @@ -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: +; +; InterlockedIncrement.Asm +; +; Abstract: +; +; InterlockedIncrement function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT32 +; EFIAPI +; InterlockedIncrement ( +; IN UINT32 *Value +; ); +;------------------------------------------------------------------------------ +InternalSyncIncrement PROC + lock inc dword ptr [rcx] + mov eax, [rcx] + ret +InternalSyncIncrement ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/Invd.asm b/MdePkg/Library/BaseLib/X64/Invd.asm new file mode 100644 index 0000000000..446587923b --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/Invd.asm @@ -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: +; +; Invd.Asm +; +; Abstract: +; +; AsmInvd function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmInvd ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmInvd PROC + invd + ret +AsmInvd ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/LongJump.asm b/MdePkg/Library/BaseLib/X64/LongJump.asm new file mode 100644 index 0000000000..6634778592 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/LongJump.asm @@ -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: +; +; LongJump.Asm +; +; Abstract: +; +; Implementation of LongJump() on x64. +; +;------------------------------------------------------------------------------ + + .code + +LongJump PROC + mov rbx, [rcx] + mov rsp, [rcx + 8] + mov rbp, [rcx + 10h] + mov rdi, [rcx + 18h] + mov rsi, [rcx + 20h] + mov r12, [rcx + 28h] + mov r13, [rcx + 30h] + mov r14, [rcx + 38h] + mov r15, [rcx + 40h] + mov rax, rdx + jmp qword ptr [rcx + 48h] +LongJump ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/Monitor.asm b/MdePkg/Library/BaseLib/X64/Monitor.asm new file mode 100644 index 0000000000..0140494d30 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/Monitor.asm @@ -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: +; +; Monitor.Asm +; +; Abstract: +; +; AsmMonitor function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmMonitor ( +; IN UINTN Eax, +; IN UINTN Ecx, +; IN UINTN Edx +; ); +;------------------------------------------------------------------------------ +AsmMonitor PROC + mov eax, ecx + mov ecx, edx + mov edx, r8d + DB 0fh, 1, 0c8h + ret +AsmMonitor ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/Mwait.asm b/MdePkg/Library/BaseLib/X64/Mwait.asm new file mode 100644 index 0000000000..8f76d944f1 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/Mwait.asm @@ -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: +; +; Mwait.Asm +; +; Abstract: +; +; AsmMwait function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmMwait ( +; IN UINTN Eax, +; IN UINTN Ecx +; ); +;------------------------------------------------------------------------------ +AsmMwait PROC + mov eax, ecx + mov ecx, edx + DB 0fh, 1, 0c9h + ret +AsmMwait ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/Non-existing.c b/MdePkg/Library/BaseLib/X64/Non-existing.c new file mode 100644 index 0000000000..b2c737857d --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/Non-existing.c @@ -0,0 +1,54 @@ +/** @file + Non-existing BaseLib functions on x64 + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + Module Name: Non-existing.c + +**/ + +#include "../BaseLibInternals.h" + +VOID +EFIAPI +InternalX86EnablePaging32 ( + IN SWITCH_STACK_ENTRY_POINT EntryPoint, + IN VOID *Context1, OPTIONAL + IN VOID *Context2, OPTIONAL + IN VOID *NewStack + ) +{ + ASSERT (FALSE); +} + +VOID +EFIAPI +InternalX86DisablePaging32 ( + IN SWITCH_STACK_ENTRY_POINT EntryPoint, + IN VOID *Context1, OPTIONAL + IN VOID *Context2, OPTIONAL + IN VOID *NewStack + ) +{ + ASSERT (FALSE); +} + +VOID +EFIAPI +InternalX86EnablePaging64 ( + IN UINT16 Cs, + IN UINT64 EntryPoint, + IN UINT64 Context1, OPTIONAL + IN UINT64 Context2, OPTIONAL + IN UINT64 NewStack + ) +{ + ASSERT (FALSE); +} diff --git a/MdePkg/Library/BaseLib/X64/ReadCr0.asm b/MdePkg/Library/BaseLib/X64/ReadCr0.asm new file mode 100644 index 0000000000..3e369c3a81 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadCr0.asm @@ -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: +; +; ReadCr0.Asm +; +; Abstract: +; +; AsmReadCr0 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadCr0 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadCr0 PROC + mov rax, cr0 + ret +AsmReadCr0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadCr2.asm b/MdePkg/Library/BaseLib/X64/ReadCr2.asm new file mode 100644 index 0000000000..8476f5af18 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadCr2.asm @@ -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: +; +; ReadCr2.Asm +; +; Abstract: +; +; AsmReadCr2 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadCr2 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadCr2 PROC + mov rax, cr2 + ret +AsmReadCr2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadCr3.asm b/MdePkg/Library/BaseLib/X64/ReadCr3.asm new file mode 100644 index 0000000000..af54d46373 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadCr3.asm @@ -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: +; +; ReadCr3.Asm +; +; Abstract: +; +; AsmReadCr3 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadCr3 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadCr3 PROC + mov rax, cr3 + ret +AsmReadCr3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadCr4.asm b/MdePkg/Library/BaseLib/X64/ReadCr4.asm new file mode 100644 index 0000000000..c8a881db9e --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadCr4.asm @@ -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: +; +; ReadCr4.Asm +; +; Abstract: +; +; AsmReadCr4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadCr4 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadCr4 PROC + mov rax, cr4 + ret +AsmReadCr4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadCs.asm b/MdePkg/Library/BaseLib/X64/ReadCs.asm new file mode 100644 index 0000000000..126149a47c --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadCs.asm @@ -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: +; +; ReadCs.Asm +; +; Abstract: +; +; AsmReadCs function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadCs ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadCs PROC + mov ax, cs + ret +AsmReadCs ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr0.asm b/MdePkg/Library/BaseLib/X64/ReadDr0.asm new file mode 100644 index 0000000000..7e0d6b714a --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadDr0.asm @@ -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: +; +; ReadDr0.Asm +; +; Abstract: +; +; AsmReadDr0 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr0 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadDr0 PROC + mov rax, dr0 + ret +AsmReadDr0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr1.asm b/MdePkg/Library/BaseLib/X64/ReadDr1.asm new file mode 100644 index 0000000000..22f11c4e0f --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadDr1.asm @@ -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: +; +; ReadDr1.Asm +; +; Abstract: +; +; AsmReadDr1 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr1 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadDr1 PROC + mov rax, dr1 + ret +AsmReadDr1 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr2.asm b/MdePkg/Library/BaseLib/X64/ReadDr2.asm new file mode 100644 index 0000000000..3b81605861 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadDr2.asm @@ -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: +; +; ReadDr2.Asm +; +; Abstract: +; +; AsmReadDr2 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr2 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadDr2 PROC + mov rax, dr2 + ret +AsmReadDr2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr3.asm b/MdePkg/Library/BaseLib/X64/ReadDr3.asm new file mode 100644 index 0000000000..1968fd0d67 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadDr3.asm @@ -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: +; +; ReadDr3.Asm +; +; Abstract: +; +; AsmReadDr3 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr3 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadDr3 PROC + mov rax, dr3 + ret +AsmReadDr3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr4.asm b/MdePkg/Library/BaseLib/X64/ReadDr4.asm new file mode 100644 index 0000000000..97740016b3 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadDr4.asm @@ -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: +; +; ReadDr4.Asm +; +; Abstract: +; +; AsmReadDr4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr4 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadDr4 PROC + DB 0fh, 21h, 0e0h + ret +AsmReadDr4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr5.asm b/MdePkg/Library/BaseLib/X64/ReadDr5.asm new file mode 100644 index 0000000000..0582502220 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadDr5.asm @@ -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: +; +; ReadDr5.Asm +; +; Abstract: +; +; AsmReadDr5 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr5 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadDr5 PROC + DB 0fh, 21h, 0e8h + ret +AsmReadDr5 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr6.asm b/MdePkg/Library/BaseLib/X64/ReadDr6.asm new file mode 100644 index 0000000000..a3dafb9b9f --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadDr6.asm @@ -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: +; +; ReadDr6.Asm +; +; Abstract: +; +; AsmReadDr6 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr6 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadDr6 PROC + mov rax, dr6 + ret +AsmReadDr6 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr7.asm b/MdePkg/Library/BaseLib/X64/ReadDr7.asm new file mode 100644 index 0000000000..0cff14b5c4 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadDr7.asm @@ -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: +; +; ReadDr7.Asm +; +; Abstract: +; +; AsmReadDr7 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadDr7 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadDr7 PROC + mov rax, dr7 + ret +AsmReadDr7 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadDs.asm b/MdePkg/Library/BaseLib/X64/ReadDs.asm new file mode 100644 index 0000000000..bdcddb65d8 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadDs.asm @@ -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: +; +; ReadDs.Asm +; +; Abstract: +; +; AsmReadDs function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadDs ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadDs PROC + mov ax, ds + ret +AsmReadDs ENDP + + END + diff --git a/MdePkg/Library/BaseLib/X64/ReadEflags.asm b/MdePkg/Library/BaseLib/X64/ReadEflags.asm new file mode 100644 index 0000000000..174ae95887 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadEflags.asm @@ -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: +; +; ReadEflags.Asm +; +; Abstract: +; +; AsmReadEflags function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadEflags ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadEflags PROC + pushfq + pop rax + ret +AsmReadEflags ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadEs.asm b/MdePkg/Library/BaseLib/X64/ReadEs.asm new file mode 100644 index 0000000000..40384bcd71 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadEs.asm @@ -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: +; +; ReadEs.Asm +; +; Abstract: +; +; AsmReadEs function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadEs ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadEs PROC + mov ax, es + ret +AsmReadEs ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadFs.asm b/MdePkg/Library/BaseLib/X64/ReadFs.asm new file mode 100644 index 0000000000..b63e474023 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadFs.asm @@ -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: +; +; ReadFs.Asm +; +; Abstract: +; +; AsmReadFs function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadFs ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadFs PROC + mov ax, fs + ret +AsmReadFs ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadGdtr.asm b/MdePkg/Library/BaseLib/X64/ReadGdtr.asm new file mode 100644 index 0000000000..2d40599a8b --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadGdtr.asm @@ -0,0 +1,31 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; ReadGdtr.Asm +; +; Abstract: +; +; AsmReadGdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +InternalX86ReadGdtr PROC + sgdt fword ptr [rcx] + ret +InternalX86ReadGdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadGs.asm b/MdePkg/Library/BaseLib/X64/ReadGs.asm new file mode 100644 index 0000000000..02d140e670 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadGs.asm @@ -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: +; +; ReadGs.Asm +; +; Abstract: +; +; AsmReadGs function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadGs ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadGs PROC + mov ax, gs + ret +AsmReadGs ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadIdtr.asm b/MdePkg/Library/BaseLib/X64/ReadIdtr.asm new file mode 100644 index 0000000000..260f697178 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadIdtr.asm @@ -0,0 +1,31 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; ReadIdtr.Asm +; +; Abstract: +; +; AsmReadIdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +InternalX86ReadIdtr PROC + sidt fword ptr [rcx] + ret +InternalX86ReadIdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadLdtr.asm b/MdePkg/Library/BaseLib/X64/ReadLdtr.asm new file mode 100644 index 0000000000..3d6a2f8843 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadLdtr.asm @@ -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: +; +; ReadLdtr.Asm +; +; Abstract: +; +; AsmReadLdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadLdtr ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadLdtr PROC + sldt eax + ret +AsmReadLdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm0.asm b/MdePkg/Library/BaseLib/X64/ReadMm0.asm new file mode 100644 index 0000000000..1239bcacd6 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadMm0.asm @@ -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: +; +; ReadMm0.Asm +; +; Abstract: +; +; AsmReadMm0 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm0 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadMm0 PROC + DB 48h, 0fh, 7eh, 0c0h + ret +AsmReadMm0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm1.asm b/MdePkg/Library/BaseLib/X64/ReadMm1.asm new file mode 100644 index 0000000000..b42bd7f63f --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadMm1.asm @@ -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: +; +; ReadMm1.Asm +; +; Abstract: +; +; AsmReadMm1 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm1 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadMm1 PROC + DB 48h, 0fh, 7eh, 0c8h + ret +AsmReadMm1 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm2.asm b/MdePkg/Library/BaseLib/X64/ReadMm2.asm new file mode 100644 index 0000000000..b10782e403 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadMm2.asm @@ -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: +; +; ReadMm2.Asm +; +; Abstract: +; +; AsmReadMm2 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm2 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadMm2 PROC + DB 48h, 0fh, 7eh, 0d0h + ret +AsmReadMm2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm3.asm b/MdePkg/Library/BaseLib/X64/ReadMm3.asm new file mode 100644 index 0000000000..15a96475bd --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadMm3.asm @@ -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: +; +; ReadMm3.Asm +; +; Abstract: +; +; AsmReadMm3 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm3 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadMm3 PROC + DB 48h, 0fh, 7eh, 0d8h + ret +AsmReadMm3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm4.asm b/MdePkg/Library/BaseLib/X64/ReadMm4.asm new file mode 100644 index 0000000000..73f528342e --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadMm4.asm @@ -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: +; +; ReadMm4.Asm +; +; Abstract: +; +; AsmReadMm4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm4 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadMm4 PROC + DB 48h, 0fh, 7eh, 0e0h + ret +AsmReadMm4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm5.asm b/MdePkg/Library/BaseLib/X64/ReadMm5.asm new file mode 100644 index 0000000000..a487889480 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadMm5.asm @@ -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: +; +; ReadMm5.Asm +; +; Abstract: +; +; AsmReadMm5 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm5 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadMm5 PROC + DB 48h, 0fh, 7eh, 0e8h + ret +AsmReadMm5 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm6.asm b/MdePkg/Library/BaseLib/X64/ReadMm6.asm new file mode 100644 index 0000000000..56f81bf7b1 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadMm6.asm @@ -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: +; +; ReadMm6.Asm +; +; Abstract: +; +; AsmReadMm6 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm6 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadMm6 PROC + DB 48h, 0fh, 7eh, 0f0h + ret +AsmReadMm6 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm7.asm b/MdePkg/Library/BaseLib/X64/ReadMm7.asm new file mode 100644 index 0000000000..e3ad6bb658 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadMm7.asm @@ -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: +; +; ReadMm7.Asm +; +; Abstract: +; +; AsmReadMm7 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmReadMm7 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadMm7 PROC + DB 48h, 0fh, 7eh, 0f8h + ret +AsmReadMm7 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadMsr32.asm b/MdePkg/Library/BaseLib/X64/ReadMsr32.asm new file mode 100644 index 0000000000..271eabbeae --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadMsr32.asm @@ -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: +; +; ReadMsr32.Asm +; +; Abstract: +; +; AsmReadMsr32 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT32 +; EFIAPI +; AsmReadMsr32 ( +; IN UINT32 Index +; ); +;------------------------------------------------------------------------------ +AsmReadMsr32 PROC + rdmsr + ret +AsmReadMsr32 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadMsr64.asm b/MdePkg/Library/BaseLib/X64/ReadMsr64.asm new file mode 100644 index 0000000000..4444c18676 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadMsr64.asm @@ -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: +; +; ReadMsr64.Asm +; +; Abstract: +; +; AsmReadMsr64 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmReadMsr64 ( +; IN UINT32 Index +; ); +;------------------------------------------------------------------------------ +AsmReadMsr64 PROC + rdmsr + shl rax, 20h + shrd rax, rdx, 20h + ret +AsmReadMsr64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadPmc.asm b/MdePkg/Library/BaseLib/X64/ReadPmc.asm new file mode 100644 index 0000000000..b5004d6f34 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadPmc.asm @@ -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: +; +; ReadPmc.Asm +; +; Abstract: +; +; AsmReadPmc function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmReadPmc ( +; IN UINT32 PmcIndex +; ); +;------------------------------------------------------------------------------ +AsmReadPmc PROC + rdpmc + shl ecx, 1 + jnc @F + shl rax, 20h + shrd rax, rdx, 20h +@@: + ret +AsmReadPmc ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadSs.asm b/MdePkg/Library/BaseLib/X64/ReadSs.asm new file mode 100644 index 0000000000..4aa480d71b --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadSs.asm @@ -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: +; +; ReadSs.Asm +; +; Abstract: +; +; AsmReadSs function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadSs ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadSs PROC + mov ax, ss + ret +AsmReadSs ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadTr.asm b/MdePkg/Library/BaseLib/X64/ReadTr.asm new file mode 100644 index 0000000000..7cf8cdfd43 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadTr.asm @@ -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: +; +; ReadTr.Asm +; +; Abstract: +; +; AsmReadTr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; AsmReadTr ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadTr PROC + str eax + ret +AsmReadTr ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/ReadTsc.asm b/MdePkg/Library/BaseLib/X64/ReadTsc.asm new file mode 100644 index 0000000000..25fa2cc5d8 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/ReadTsc.asm @@ -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: +; +; ReadTsc.Asm +; +; Abstract: +; +; AsmReadTsc function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmReadTsc ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmReadTsc PROC + rdtsc + shl rax, 20h + shrd rax, rdx, 20h + ret +AsmReadTsc ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/SetJump.asm b/MdePkg/Library/BaseLib/X64/SetJump.asm new file mode 100644 index 0000000000..305e721b8b --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/SetJump.asm @@ -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: +; +; SetJump.Asm +; +; Abstract: +; +; Implementation of SetJump() on x64. +; +;------------------------------------------------------------------------------ + + .code + +SetJump PROC + pop rdx + mov [rcx], rbx + mov [rcx + 8], rsp + mov [rcx + 10h], rbp + mov [rcx + 18h], rdi + mov [rcx + 20h], rsi + mov [rcx + 28h], r12 + mov [rcx + 30h], r13 + mov [rcx + 38h], r14 + mov [rcx + 40h], r15 + mov [rcx + 48h], rdx + xor rax, rax + jmp rdx +SetJump ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/SwitchStack.asm b/MdePkg/Library/BaseLib/X64/SwitchStack.asm new file mode 100644 index 0000000000..0dfddc011b --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/SwitchStack.asm @@ -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: +; +; SwitchStack.Asm +; +; Abstract: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; Routine Description: +; +; Routine for switching stacks with 1 parameter +; +; Arguments: +; +; (rcx) EntryPoint - Entry point with new stack. +; (rdx) Context - Parameter for entry point. +; (r8) Context2 - Parameter2 for entry point. +; (r9) NewStack - Pointer to new stack. +; +; Returns: +; +; None +; +;------------------------------------------------------------------------------ +SwitchStack PROC + mov rax, rcx + mov rcx, rdx + mov rdx, r8 + lea rsp, [r9 - 20h] + call rax +SwitchStack ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/Thunk16.asm b/MdePkg/Library/BaseLib/X64/Thunk16.asm new file mode 100644 index 0000000000..f3e80840b3 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/Thunk16.asm @@ -0,0 +1,189 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; Thunk.asm +; +; Abstract: +; +; Real mode thunk +; +;------------------------------------------------------------------------------ + + .data + +NullSegSel DQ 0 +_16CsSegSel LABEL QWORD + DW -1 + DW 0 + DB 0 + DB 9bh + DB 8fh ; 16-bit segment + DB 0 +_16BitDsSel LABEL QWORD + DW -1 + DW 0 + DB 0 + DB 93h + DB 8fh ; 16-bit segment + DB 0 +GdtEnd LABEL QWORD + + .const + +_16Gdtr LABEL FWORD + DW offset GdtEnd - offset NullSegSel - 1 + DQ offset NullSegSel + +_16Idtr FWORD (1 SHL 10) - 1 + + .code + +IA32_REGS STRUC 4t +_EDI DD ? +_ESI DD ? +_EBP DD ? +_ESP DD ? +_EBX DD ? +_EDX DD ? +_ECX DD ? +_EAX DD ? +_DS DW ? +_ES DW ? +_FS DW ? +_GS DW ? +_RFLAGS DQ ? +_EIP DD ? +_CS DW ? +_SS DW ? +IA32_REGS ENDS + +InternalAsmThunk16 PROC USES rbp rbx rsi rdi r12 r13 r14 r15 + mov eax, ds + push rax + mov eax, es + push rax + push fs + push gs + mov rsi, rcx ; rsi <- RegSet + push sizeof (IA32_REGS) + pop rcx + movzx r8, (IA32_REGS ptr [rsi])._SS + xor rdi, rdi + mov edi, (IA32_REGS ptr [rsi])._ESP + sub rdi, rcx ; reserve space on realmode stack + push rdi ; save stack offset + imul rax, r8, 16 + add rdi, rax ; rdi <- linear address of 16-bit stack + rep movsb ; copy RegSet + mov rsi, r8 ; si <- 16-bit stack segment + pop rbx ; rbx <- 16-bit stack offset + mov rdi, rdx ; rdi <- realmode patch + lea eax, @BackToThunk ; rax <- address to back from real mode + push rax ; use in a far return + mov eax, cs + mov [rsp + 4], eax ; save CS + lea eax, @16Return ; thus @Return must < 4GB + stosd ; set ret address offset + xor eax, eax + stosw ; set ret CS base to 0 + mov eax, esp + stosd ; rsp must < 4GB + mov eax, ss + stosd + mov rax, cr0 + mov ecx, eax ; ecx <- CR0 + and ecx, 7ffffffeh ; clear PE, PG bits + stosd + mov rax, cr4 + mov ebp, eax + and ebp, 300h ; clear all but PCE and OSFXSR bits + stosd + sidt fword ptr [rsp + 70h] ; use parameter space to save IDTR + sgdt fword ptr [rdi] + lea edi, _16Idtr + lea eax, @16Start ; rax <- seg:offset of @16Start + push rax + mov dword ptr [rsp + 4], 8 + push 10h + pop rax ; rax <- 10h as dataseg selector + lgdt _16Gdtr + retf +@16Start: ; 16-bit starts here + mov ss, eax ; set SS to be a 16-bit segment + mov cr0, rcx ; disable protected mode + mov cr4, rbp + DB 66h + mov ecx, 0c0000080h + rdmsr + and ah, NOT 1 ; clear LME + wrmsr + mov ss, esi ; set up 16-bit stack + mov sp, bx ; mov esp, ebx actually + lidt fword ptr [edi] + DB 66h, 61h ; popad + DB 1fh ; pop ds + DB 7 ; pop es + pop fs + pop gs + add sp, 8 ; skip _RFLAGS + DB 66h + retf ; transfer control to 16-bit code +@16Return: + DB 66h + push 0 ; high order 32 bits of rflags + pushf ; pushfd actually + push gs + push fs + DB 6 ; push es + DB 1eh ; push ds + DB 66h, 60h ; pushad + DB 67h, 66h, 0c5h, 74h, 24h, 30h ; lds esi, [esp + 12*4] + DB 66h + mov eax, [esi + 12] + mov cr4, rax ; restore CR4 + DB 66h + lgdt fword ptr [esi + 16] + DB 66h + mov ecx, 0c0000080h + rdmsr + or ah, 1 ; set LME + wrmsr + DB 66h + mov eax, [esi + 8] + mov cr0, rax ; restore CR0 + xor ax, ax ; xor eax, eax actually + mov eax, ss + mov dword ptr (IA32_REGS ptr [esp])._SS, eax + shl ax, 4 ; shl eax, 4 actually + add ax, sp ; add eax, esp actually + add sp, sizeof (IA32_REGS) ; add esp, sizeof (IA32_REGS) + DB 66h + mov dword ptr (IA32_REGS ptr [esp - sizeof (IA32_REGS)])._ESP, esp + DB 66h + lss esp, fword ptr [esi] ; restore protected mode stack + DB 66h + retf ; go back to protected mode +@BackToThunk: + lidt fword ptr [rsp + 68h] ; restore protected mode IDTR + shl rax, 32 + shr rax, 32 ; clear high order 32 bits of RAX + pop gs + pop fs + pop rcx + mov es, ecx + pop rcx + mov ds, ecx + ret +InternalAsmThunk16 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/Wbinvd.asm b/MdePkg/Library/BaseLib/X64/Wbinvd.asm new file mode 100644 index 0000000000..ca0cb252b3 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/Wbinvd.asm @@ -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: +; +; Wbinvd.Asm +; +; Abstract: +; +; AsmWbinvd function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWbinvd ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWbinvd PROC + wbinvd + ret +AsmWbinvd ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteCr0.asm b/MdePkg/Library/BaseLib/X64/WriteCr0.asm new file mode 100644 index 0000000000..defc7e7c96 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteCr0.asm @@ -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: +; +; WriteCr0.Asm +; +; Abstract: +; +; AsmWriteCr0 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteCr0 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteCr0 PROC + mov cr0, rcx + ret +AsmWriteCr0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteCr2.asm b/MdePkg/Library/BaseLib/X64/WriteCr2.asm new file mode 100644 index 0000000000..ebe6f89d62 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteCr2.asm @@ -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: +; +; WriteCr2.Asm +; +; Abstract: +; +; AsmWriteCr2 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteCr2 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteCr2 PROC + mov cr2, rcx + ret +AsmWriteCr2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteCr3.asm b/MdePkg/Library/BaseLib/X64/WriteCr3.asm new file mode 100644 index 0000000000..5715dea9b7 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteCr3.asm @@ -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: +; +; WriteCr3.Asm +; +; Abstract: +; +; AsmWriteCr3 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteCr3 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteCr3 PROC + mov cr3, rcx + ret +AsmWriteCr3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteCr4.asm b/MdePkg/Library/BaseLib/X64/WriteCr4.asm new file mode 100644 index 0000000000..210744e16f --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteCr4.asm @@ -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: +; +; WriteCr4.Asm +; +; Abstract: +; +; AsmWriteCr4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteCr4 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteCr4 PROC + mov cr4, rcx + ret +AsmWriteCr4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr0.asm b/MdePkg/Library/BaseLib/X64/WriteDr0.asm new file mode 100644 index 0000000000..2515a20404 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteDr0.asm @@ -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: +; +; WriteDr0.Asm +; +; Abstract: +; +; AsmWriteDr0 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteDr0 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteDr0 PROC + mov dr0, rcx + ret +AsmWriteDr0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr1.asm b/MdePkg/Library/BaseLib/X64/WriteDr1.asm new file mode 100644 index 0000000000..89f36ac3f9 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteDr1.asm @@ -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: +; +; WriteDr1.Asm +; +; Abstract: +; +; AsmWriteDr1 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteDr1 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteDr1 PROC + mov dr1, rcx + ret +AsmWriteDr1 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr2.asm b/MdePkg/Library/BaseLib/X64/WriteDr2.asm new file mode 100644 index 0000000000..820977c2e4 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteDr2.asm @@ -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: +; +; WriteDr2.Asm +; +; Abstract: +; +; AsmWriteDr2 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteDr2 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteDr2 PROC + mov dr2, rcx + ret +AsmWriteDr2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr3.asm b/MdePkg/Library/BaseLib/X64/WriteDr3.asm new file mode 100644 index 0000000000..51c1407277 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteDr3.asm @@ -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: +; +; WriteDr3.Asm +; +; Abstract: +; +; AsmWriteDr3 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteDr3 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteDr3 PROC + mov dr3, rcx + ret +AsmWriteDr3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr4.asm b/MdePkg/Library/BaseLib/X64/WriteDr4.asm new file mode 100644 index 0000000000..12b643825b --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteDr4.asm @@ -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: +; +; WriteDr4.Asm +; +; Abstract: +; +; AsmWriteDr4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteDr4 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteDr4 PROC + DB 0fh, 23h, 0e1h + ret +AsmWriteDr4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr5.asm b/MdePkg/Library/BaseLib/X64/WriteDr5.asm new file mode 100644 index 0000000000..6d454d5267 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteDr5.asm @@ -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: +; +; WriteDr5.Asm +; +; Abstract: +; +; AsmWriteDr5 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteDr5 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteDr5 PROC + DB 0fh, 23h, 0e9h + ret +AsmWriteDr5 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr6.asm b/MdePkg/Library/BaseLib/X64/WriteDr6.asm new file mode 100644 index 0000000000..b7b9f2509d --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteDr6.asm @@ -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: +; +; WriteDr6.Asm +; +; Abstract: +; +; AsmWriteDr6 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteDr6 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteDr6 PROC + mov dr6, rcx + ret +AsmWriteDr6 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr7.asm b/MdePkg/Library/BaseLib/X64/WriteDr7.asm new file mode 100644 index 0000000000..de2237b6e4 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteDr7.asm @@ -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: +; +; WriteDr7.Asm +; +; Abstract: +; +; AsmWriteDr7 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteDr7 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteDr7 PROC + mov dr7, rcx + ret +AsmWriteDr7 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteGdtr.asm b/MdePkg/Library/BaseLib/X64/WriteGdtr.asm new file mode 100644 index 0000000000..1757e3dea4 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteGdtr.asm @@ -0,0 +1,31 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; WriteGdtr.Asm +; +; Abstract: +; +; AsmWriteGdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +InternalX86WriteGdtr PROC + lgdt fword ptr [rcx] + ret +InternalX86WriteGdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteIdtr.asm b/MdePkg/Library/BaseLib/X64/WriteIdtr.asm new file mode 100644 index 0000000000..09fcb9e457 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteIdtr.asm @@ -0,0 +1,31 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation +; All rights reserved. This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Module Name: +; +; WriteIdtr.Asm +; +; Abstract: +; +; AsmWriteIdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +InternalX86WriteIdtr PROC + lidt fword ptr [rcx] + ret +InternalX86WriteIdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteLdtr.asm b/MdePkg/Library/BaseLib/X64/WriteLdtr.asm new file mode 100644 index 0000000000..d85ae38f29 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteLdtr.asm @@ -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: +; +; WriteLdtr.Asm +; +; Abstract: +; +; AsmWriteLdtr function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmWriteLdtr ( +; IN UINT16 Ldtr +; ); +;------------------------------------------------------------------------------ +AsmWriteLdtr PROC + lldt cx + ret +AsmWriteLdtr ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm0.asm b/MdePkg/Library/BaseLib/X64/WriteMm0.asm new file mode 100644 index 0000000000..bb9a576125 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteMm0.asm @@ -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: +; +; WriteMm0.Asm +; +; Abstract: +; +; AsmWriteMm0 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteMm0 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteMm0 PROC + DB 48h, 0fh, 6eh, 0c1h + ret +AsmWriteMm0 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm1.asm b/MdePkg/Library/BaseLib/X64/WriteMm1.asm new file mode 100644 index 0000000000..1bab3bcd8e --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteMm1.asm @@ -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: +; +; WriteMm1.Asm +; +; Abstract: +; +; AsmWriteMm1 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteMm1 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteMm1 PROC + DB 48h, 0fh, 6eh, 0c9h + ret +AsmWriteMm1 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm2.asm b/MdePkg/Library/BaseLib/X64/WriteMm2.asm new file mode 100644 index 0000000000..97e8a6a676 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteMm2.asm @@ -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: +; +; WriteMm2.Asm +; +; Abstract: +; +; AsmWriteMm2 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteMm2 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteMm2 PROC + DB 48h, 0fh, 6eh, 0d1h + ret +AsmWriteMm2 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm3.asm b/MdePkg/Library/BaseLib/X64/WriteMm3.asm new file mode 100644 index 0000000000..d55e19a406 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteMm3.asm @@ -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: +; +; WriteMm3.Asm +; +; Abstract: +; +; AsmWriteMm3 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteMm3 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteMm3 PROC + DB 48h, 0fh, 6eh, 0d9h + ret +AsmWriteMm3 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm4.asm b/MdePkg/Library/BaseLib/X64/WriteMm4.asm new file mode 100644 index 0000000000..2a69b93bcc --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteMm4.asm @@ -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: +; +; WriteMm4.Asm +; +; Abstract: +; +; AsmWriteMm4 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteMm4 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteMm4 PROC + DB 48h, 0fh, 6eh, 0e1h + ret +AsmWriteMm4 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm5.asm b/MdePkg/Library/BaseLib/X64/WriteMm5.asm new file mode 100644 index 0000000000..c4d798bcbd --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteMm5.asm @@ -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: +; +; WriteMm5.Asm +; +; Abstract: +; +; AsmWriteMm5 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteMm5 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteMm5 PROC + DB 48h, 0fh, 6eh, 0e9h + ret +AsmWriteMm5 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm6.asm b/MdePkg/Library/BaseLib/X64/WriteMm6.asm new file mode 100644 index 0000000000..c0164f66da --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteMm6.asm @@ -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: +; +; WriteMm6.Asm +; +; Abstract: +; +; AsmWriteMm6 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteMm6 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteMm6 PROC + DB 48h, 0fh, 6eh, 0f1h + ret +AsmWriteMm6 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm7.asm b/MdePkg/Library/BaseLib/X64/WriteMm7.asm new file mode 100644 index 0000000000..20768e2b78 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteMm7.asm @@ -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: +; +; WriteMm7.Asm +; +; Abstract: +; +; AsmWriteMm7 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINTN +; EFIAPI +; AsmWriteMm7 ( +; VOID +; ); +;------------------------------------------------------------------------------ +AsmWriteMm7 PROC + DB 48h, 0fh, 6eh, 0f9h + ret +AsmWriteMm7 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteMsr32.asm b/MdePkg/Library/BaseLib/X64/WriteMsr32.asm new file mode 100644 index 0000000000..0a74403624 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteMsr32.asm @@ -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: +; +; WriteMsr32.Asm +; +; Abstract: +; +; AsmWriteMsr32 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT32 +; EFIAPI +; AsmWriteMsr32 ( +; IN UINT32 Index, +; IN UINT32 Value +; ); +;------------------------------------------------------------------------------ +AsmWriteMsr32 PROC + mov eax, edx + xor edx, edx + wrmsr + ret +AsmWriteMsr32 ENDP + + END diff --git a/MdePkg/Library/BaseLib/X64/WriteMsr64.asm b/MdePkg/Library/BaseLib/X64/WriteMsr64.asm new file mode 100644 index 0000000000..3337f45891 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/WriteMsr64.asm @@ -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: +; +; WriteMsr64.Asm +; +; Abstract: +; +; AsmWriteMsr64 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; UINT64 +; EFIAPI +; AsmWriteMsr64 ( +; IN UINT32 Index, +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +AsmWriteMsr64 PROC + push rdx + mov eax, edx + shr rdx, 20h + wrmsr + pop rax + ret +AsmWriteMsr64 ENDP + + END diff --git a/MdePkg/Library/BaseLib/ia32/ARShiftU64.asm b/MdePkg/Library/BaseLib/ia32/ARShiftU64.asm deleted file mode 100644 index 6b9cfa18a8..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ARShiftU64.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -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 \ No newline at end of file diff --git a/MdePkg/Library/BaseLib/ia32/ARShiftU64.s b/MdePkg/Library/BaseLib/ia32/ARShiftU64.s deleted file mode 100644 index d6af974d0f..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ARShiftU64.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.global _ARShiftU64 -_ARShiftU64: - movb 12(%esp),%cl - movl 8(%esp),%eax - cltd - testb $32,%cl -# MISMATCH: " cmovz edx, eax" - cmovz %eax, %edx -# MISMATCH: " cmovz eax, [esp + 4]" - cmovz 4(%esp), %eax - shrdl %cl,%edx,%eax - sar %cl,%edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/CpuBreakpoint.asm b/MdePkg/Library/BaseLib/ia32/CpuBreakpoint.asm deleted file mode 100644 index a4d397874d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/CpuBreakpoint.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 diff --git a/MdePkg/Library/BaseLib/ia32/CpuBreakpoint.s b/MdePkg/Library/BaseLib/ia32/CpuBreakpoint.s deleted file mode 100644 index e5d18c35b3..0000000000 --- a/MdePkg/Library/BaseLib/ia32/CpuBreakpoint.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ ; -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# CpuBreakpoint ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _CpuBreakpoint -_CpuBreakpoint: - int 3 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/CpuFlushTlb.asm b/MdePkg/Library/BaseLib/ia32/CpuFlushTlb.asm deleted file mode 100644 index de87ad75e9..0000000000 --- a/MdePkg/Library/BaseLib/ia32/CpuFlushTlb.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuFlushTlb.Asm -; -; Abstract: -; -; CpuFlushTlb function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuFlushTlb ( -; VOID -; ); -;------------------------------------------------------------------------------ -_CpuFlushTlb PROC - mov eax, cr3 - mov cr3, eax - ret -_CpuFlushTlb ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/CpuFlushTlb.s b/MdePkg/Library/BaseLib/ia32/CpuFlushTlb.s deleted file mode 100644 index 1d85fa77da..0000000000 --- a/MdePkg/Library/BaseLib/ia32/CpuFlushTlb.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ ; -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# CpuFlushTlb.Asm -# -# Abstract: -# -# CpuFlushTlb function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# CpuFlushTlb ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _CpuFlushTlb -_CpuFlushTlb: - movl %cr3, %eax - movl %eax, %cr3 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/CpuId.asm b/MdePkg/Library/BaseLib/ia32/CpuId.asm deleted file mode 100644 index 2c94e3a1ae..0000000000 --- a/MdePkg/Library/BaseLib/ia32/CpuId.asm +++ /dev/null @@ -1,66 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 diff --git a/MdePkg/Library/BaseLib/ia32/CpuId.s b/MdePkg/Library/BaseLib/ia32/CpuId.s deleted file mode 100644 index 989daba127..0000000000 --- a/MdePkg/Library/BaseLib/ia32/CpuId.s +++ /dev/null @@ -1,63 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmCpuid ( -# IN UINT32 RegisterInEax, -# OUT UINT32 *RegisterOutEax OPTIONAL, -# OUT UINT32 *RegisterOutEbx OPTIONAL, -# OUT UINT32 *RegisterOutEcx OPTIONAL, -# OUT UINT32 *RegisterOutEdx OPTIONAL -# ) -#------------------------------------------------------------------------------ -.globl _AsmCpuid -_AsmCpuid: - push %ebx - push %edi - movl 12(%esp),%eax - cpuid - movl %ecx,%edi - movl 16(%esp),%ecx - jecxz L1 - movl %eax,(%ecx) -L1: - movl 20(%esp),%ecx - jecxz L2 - movl %ebx,(%ecx) -L2: - movl 24(%esp),%ecx - jecxz L3 - movl %edi,(%ecx) -L3: - movl 28(%esp),%ecx - jecxz L4 - movl %edx,(%ecx) -L4: - pop %edi - pop %ebx - ret diff --git a/MdePkg/Library/BaseLib/ia32/CpuPause.asm b/MdePkg/Library/BaseLib/ia32/CpuPause.asm deleted file mode 100644 index 79a4f2f67b..0000000000 --- a/MdePkg/Library/BaseLib/ia32/CpuPause.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuPause ( -; VOID -; ); -;------------------------------------------------------------------------------ -_CpuPause PROC - pause - ret -_CpuPause ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/CpuPause.s b/MdePkg/Library/BaseLib/ia32/CpuPause.s deleted file mode 100644 index ace2c6764a..0000000000 --- a/MdePkg/Library/BaseLib/ia32/CpuPause.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ ; -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# CpuPause ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _CpuPause -_CpuPause: - pause - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/CpuSleep.asm b/MdePkg/Library/BaseLib/ia32/CpuSleep.asm deleted file mode 100644 index 66fb90e903..0000000000 --- a/MdePkg/Library/BaseLib/ia32/CpuSleep.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuSleep ( -; VOID -; ); -;------------------------------------------------------------------------------ -_CpuSleep PROC - hlt - ret -_CpuSleep ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/CpuSleep.s b/MdePkg/Library/BaseLib/ia32/CpuSleep.s deleted file mode 100644 index 9b7713128f..0000000000 --- a/MdePkg/Library/BaseLib/ia32/CpuSleep.s +++ /dev/null @@ -1,40 +0,0 @@ -#------------------------------------------------------------------------------ ; -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# CpuSleep ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _CpuSleep -_CpuSleep: - hlt - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/DisableInterrupts.asm b/MdePkg/Library/BaseLib/ia32/DisableInterrupts.asm deleted file mode 100644 index 74bdd0bd98..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DisableInterrupts.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; DisableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -_DisableInterrupts PROC - cli - ret -_DisableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/DisableInterrupts.s b/MdePkg/Library/BaseLib/ia32/DisableInterrupts.s deleted file mode 100644 index cc9c95c30f..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DisableInterrupts.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# DisableInterrupts ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _DisableInterrupts -_DisableInterrupts: - cli - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/DisablePaging32.asm b/MdePkg/Library/BaseLib/ia32/DisablePaging32.asm deleted file mode 100644 index 04ae8cf514..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DisablePaging32.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - cli - mov eax, cr0 - btr eax, 31 - mov esp, [esp + 16] - mov cr0, eax - push edi - popfd - push edx - push ecx - call ebx - jmp $ -InternalX86DisablePaging32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/DisablePaging32.s b/MdePkg/Library/BaseLib/ia32/DisablePaging32.s deleted file mode 100644 index 21e8a82c0e..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DisablePaging32.s +++ /dev/null @@ -1,58 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmDisablePaging32 ( -# IN SWITCH_STACK_ENTRY_POINT EntryPoint, -# IN VOID *Context1, OPTIONAL -# IN VOID *Context2, OPTIONAL -# IN VOID *NewStack -# ); -#------------------------------------------------------------------------------ -.global _AsmDisablePaging32 -_AsmDisablePaging32: - movl 4(%esp),%ebx - movl 8(%esp),%ecx - movl 12(%esp),%edx - pushfl - popl %edi - cli - movl %cr0, %eax - btrl $31,%eax - movl 16(%esp),%esp - movl %eax, %cr0 - pushl %edi - popfl - pushl %edx - pushl %ecx - call *%ebx - jmp . - - - diff --git a/MdePkg/Library/BaseLib/ia32/DivS64x64Remainder.c b/MdePkg/Library/BaseLib/ia32/DivS64x64Remainder.c deleted file mode 100644 index 219f48f321..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DivS64x64Remainder.c +++ /dev/null @@ -1,38 +0,0 @@ -/** @file - Integer division worker functions for Ia32. - - Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - Module Name: DivS64x64Remainder.c - -**/ - -#include "../BaseLibInternals.h" - -INT64 -EFIAPI -InternalMathDivRemS64x64 ( - IN INT64 Dividend, - IN INT64 Divisor, - OUT INT64 *Remainder - ) -{ - INT64 Quot; - - Quot = InternalMathDivRemU64x64 ( - Dividend >= 0 ? Dividend : -Dividend, - Divisor >= 0 ? Divisor : -Divisor, - (UINT64 *) Remainder - ); - if (Remainder != NULL && Dividend < 0) { - *Remainder = -*Remainder; - } - return (Dividend ^ Divisor) >= 0 ? Quot : -Quot; -} diff --git a/MdePkg/Library/BaseLib/ia32/DivU64x32.asm b/MdePkg/Library/BaseLib/ia32/DivU64x32.asm deleted file mode 100644 index 1ad5474586..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DivU64x32.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -InternalMathDivU64x32 PROC - mov eax, [esp + 8] - mov ecx, [esp + 12] - xor edx, edx - div ecx - push eax - mov eax, [esp + 8] - div ecx - pop edx - ret -InternalMathDivU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/DivU64x32.s b/MdePkg/Library/BaseLib/ia32/DivU64x32.s deleted file mode 100644 index 689c7092c0..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DivU64x32.s +++ /dev/null @@ -1,39 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.global _DivU64x32 -_DivU64x32: - movl 8(%esp),%eax - movl 12(%esp),%ecx - xorl %edx,%edx - divl %ecx - pushl %eax - movl 8(%esp),%eax - divl %ecx - popl %edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/DivU64x32Remainder.asm b/MdePkg/Library/BaseLib/ia32/DivU64x32Remainder.asm deleted file mode 100644 index f1c6c1f4ac..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DivU64x32Remainder.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -InternalMathDivRemU64x32 PROC - mov ecx, [esp + 12] - mov eax, [esp + 8] - xor edx, edx - div ecx - push eax - mov eax, [esp + 8] - div ecx - mov ecx, [esp + 20] - jecxz @F - mov [ecx], edx -@@: - pop edx - ret -InternalMathDivRemU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/DivU64x32Remainder.s b/MdePkg/Library/BaseLib/ia32/DivU64x32Remainder.s deleted file mode 100644 index 1f34f18255..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DivU64x32Remainder.s +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.global _InternalMathDivRemU64x32 -_InternalMathDivRemU64x32: - movl 12(%esp),%ecx - movl 8(%esp),%eax - xorl %edx,%edx - divl %ecx - pushl %eax - movl 8(%esp),%eax - divl %ecx - movl 20(%esp),%ecx - jecxz L1 - movl %edx,(%ecx) -L1: - popl %edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/DivU64x64Remainder.asm b/MdePkg/Library/BaseLib/ia32/DivU64x64Remainder.asm deleted file mode 100644 index 261211b946..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DivU64x64Remainder.asm +++ /dev/null @@ -1,83 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -InternalMathDivRemU64x64 PROC - mov ecx, [esp + 16] - test ecx, ecx - jnz _@DivRemU64x64 - mov ecx, [esp + 20] - jecxz @F - and dword ptr [ecx + 4], 0 - mov [esp + 16], ecx -@@: - jmp InternalMathDivRemU64x32 -InternalMathDivRemU64x64 ENDP - -_@DivRemU64x64 PROC USES ebx esi edi - mov edx, dword ptr [esp + 20] - mov eax, dword ptr [esp + 16] - mov edi, edx - mov esi, eax - mov ebx, dword ptr [esp + 24] -@@: - shr edx, 1 - rcr eax, 1 - shrd ebx, ecx, 1 - shr ecx, 1 - jnz @B - div ebx - mov ebx, eax - mov ecx, [esp + 28] - mul dword ptr [esp + 24] - imul ecx, ebx - add edx, ecx - mov ecx, dword ptr [esp + 32] - jc @TooLarge - cmp edi, edx - ja @Correct - jb @TooLarge - cmp esi, eax - jae @Correct -@TooLarge: - dec ebx - jecxz @Return - sub eax, dword ptr [esp + 24] - sbb edx, dword ptr [esp + 28] -@Correct: - jecxz @Return - sub esi, eax - sbb edi, edx - mov [ecx], esi - mov [ecx + 4], edi -@Return: - mov eax, ebx - xor edx, edx - ret -_@DivRemU64x64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/DivU64x64Remainder.s b/MdePkg/Library/BaseLib/ia32/DivU64x64Remainder.s deleted file mode 100644 index f604f7c72e..0000000000 --- a/MdePkg/Library/BaseLib/ia32/DivU64x64Remainder.s +++ /dev/null @@ -1,89 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.extern _InternalMathDivRemU64x32 - -.global _InternalMathDivRemU64x64 -_InternalMathDivRemU64x64: - movl 16(%esp),%ecx - testl %ecx,%ecx - jnz _DivRemU64x64 - movl 20(%esp),%ecx - jecxz L1 - and $0,4(%ecx) - movl %ecx,16(%esp) -L1: - jmp _InternalMathDivRemU64x32 - - -.global DivRemU64x64 -DivRemU64x64: -# MISMATCH: "DivRemU64x64: USES ebx esi edi" - 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 - push %edi - push %esi - push %ebx - ret diff --git a/MdePkg/Library/BaseLib/ia32/EnableDisableInterrupts.asm b/MdePkg/Library/BaseLib/ia32/EnableDisableInterrupts.asm deleted file mode 100644 index fe2016da87..0000000000 --- a/MdePkg/Library/BaseLib/ia32/EnableDisableInterrupts.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 diff --git a/MdePkg/Library/BaseLib/ia32/EnableDisableInterrupts.s b/MdePkg/Library/BaseLib/ia32/EnableDisableInterrupts.s deleted file mode 100644 index 80362a95b2..0000000000 --- a/MdePkg/Library/BaseLib/ia32/EnableDisableInterrupts.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# EnableDisableInterrupts ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _EnableDisableInterrupts -_EnableDisableInterrupts: - sti - cli - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/EnableInterrupts.asm b/MdePkg/Library/BaseLib/ia32/EnableInterrupts.asm deleted file mode 100644 index 194dd8f935..0000000000 --- a/MdePkg/Library/BaseLib/ia32/EnableInterrupts.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 diff --git a/MdePkg/Library/BaseLib/ia32/EnableInterrupts.s b/MdePkg/Library/BaseLib/ia32/EnableInterrupts.s deleted file mode 100644 index 74413d83b6..0000000000 --- a/MdePkg/Library/BaseLib/ia32/EnableInterrupts.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# EnableInterrupts ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _EnableInterrupts -_EnableInterrupts: - sti - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/EnablePaging32.asm b/MdePkg/Library/BaseLib/ia32/EnablePaging32.asm deleted file mode 100644 index cf6f2fe458..0000000000 --- a/MdePkg/Library/BaseLib/ia32/EnablePaging32.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - cli - mov eax, cr0 - bts eax, 31 - mov esp, [esp + 16] - mov cr0, eax - push edi - popfd - push edx - push ecx - call ebx - jmp $ -InternalX86EnablePaging32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/EnablePaging32.s b/MdePkg/Library/BaseLib/ia32/EnablePaging32.s deleted file mode 100644 index 6f9befcb4a..0000000000 --- a/MdePkg/Library/BaseLib/ia32/EnablePaging32.s +++ /dev/null @@ -1,58 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmEnablePaging32 ( -# IN SWITCH_STACK_ENTRY_POINT EntryPoint, -# IN VOID *Context1, OPTIONAL -# IN VOID *Context2, OPTIONAL -# IN VOID *NewStack -# ); -#------------------------------------------------------------------------------ -.global _AsmEnablePaging32 -_AsmEnablePaging32: - movl 4(%esp),%ebx - movl 8(%esp),%ecx - movl 12(%esp),%edx - pushfl - popl %edi - cli - movl %cr0, %eax - btsl $31,%eax - movl 16(%esp),%esp - movl %eax, %cr0 - pushl %edi - popfl - pushl %edx - pushl %ecx - call *%ebx - jmp . - - - diff --git a/MdePkg/Library/BaseLib/ia32/EnablePaging64.asm b/MdePkg/Library/BaseLib/ia32/EnablePaging64.asm deleted file mode 100644 index 6c9b0ea76b..0000000000 --- a/MdePkg/Library/BaseLib/ia32/EnablePaging64.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -; AsmEnablePaging64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686p - .model flat,C - .code - -InternalX86EnablePaging64 PROC - cli - mov [esp], @F ; offset for far retf - mov eax, cr4 - or al, (1 SHL 5) - mov cr4, eax ; enable PAE - mov ecx, 0c0000080h - rdmsr - or ah, 1 ; set LME - wrmsr - mov eax, cr0 - bts eax, 31 - mov cr0, eax ; enable paging - retf -@@: ; long mode starts here - DB 67h, 48h - mov ebx, [esp] ; mov rbx, [esp] - DB 67h, 48h - mov ecx, [esp + 8] ; mov rcx, [esp + 8] - DB 67h, 48h - mov edx, [esp + 10h] ; mov rdx, [esp + 10h] - DB 67h, 48h - mov esp, [esp + 18h] ; mov rsp, [esp + 18h] - DB 48h - add esp, -20h ; add rsp, -20h - call ebx ; call rbx - jmp $ -InternalX86EnablePaging64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/EnablePaging64.s b/MdePkg/Library/BaseLib/ia32/EnablePaging64.s deleted file mode 100644 index b365ea762a..0000000000 --- a/MdePkg/Library/BaseLib/ia32/EnablePaging64.s +++ /dev/null @@ -1,66 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -# AsmEnablePaging64 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - #.MODEL flat - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmEnablePaging64 ( -# IN UINT16 CodeSelector, -# IN UINT64 EntryPoint, -# IN UINT64 Context1, OPTIONAL -# IN UINT64 Context2, OPTIONAL -# IN UINT64 NewStack -# ); -#------------------------------------------------------------------------------ -.global _AsmEnablePaging64 -_AsmEnablePaging64: - 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 . diff --git a/MdePkg/Library/BaseLib/ia32/FlushCacheLine.asm b/MdePkg/Library/BaseLib/ia32/FlushCacheLine.asm deleted file mode 100644 index d79f217610..0000000000 --- a/MdePkg/Library/BaseLib/ia32/FlushCacheLine.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmFlushCacheLine ( -; IN VOID *LinearAddress -; ); -;------------------------------------------------------------------------------ -_AsmFlushCacheLine PROC - mov eax, [esp + 4] - clflush [eax] - ret -_AsmFlushCacheLine ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/FlushCacheLine.s b/MdePkg/Library/BaseLib/ia32/FlushCacheLine.s deleted file mode 100644 index c14bd11d68..0000000000 --- a/MdePkg/Library/BaseLib/ia32/FlushCacheLine.s +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmFlushCacheLine ( -# IN VOID *LinearAddress -# ); -#------------------------------------------------------------------------------ -.global _AsmFlushCacheLine -_AsmFlushCacheLine: - movl 4(%esp),%eax - clflush (%eax) - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/FxRestore.asm b/MdePkg/Library/BaseLib/ia32/FxRestore.asm deleted file mode 100644 index e9e37d1384..0000000000 --- a/MdePkg/Library/BaseLib/ia32/FxRestore.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .586P - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86FxRestore ( -; IN CONST IA32_FX_BUFFER *Buffer -; ); -;------------------------------------------------------------------------------ -InternalX86FxRestore PROC - mov eax, [esp + 4] - fxrstor [eax] - ret -InternalX86FxRestore ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/FxRestore.s b/MdePkg/Library/BaseLib/ia32/FxRestore.s deleted file mode 100644 index 631a3ef68a..0000000000 --- a/MdePkg/Library/BaseLib/ia32/FxRestore.s +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmFxRestore ( -# IN CONST IA32_FX_BUFFER *Buffer -# ); -#------------------------------------------------------------------------------ -.global _AsmFxRestore -_AsmFxRestore: - movl 4(%esp),%eax - fxrstor (%eax) - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/FxSave.asm b/MdePkg/Library/BaseLib/ia32/FxSave.asm deleted file mode 100644 index 22496c5e57..0000000000 --- a/MdePkg/Library/BaseLib/ia32/FxSave.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .586P - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86FxSave ( -; OUT IA32_FX_BUFFER *Buffer -; ); -;------------------------------------------------------------------------------ -InternalX86FxSave PROC - mov eax, [esp + 4] - fxsave [eax] - ret -InternalX86FxSave ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/FxSave.s b/MdePkg/Library/BaseLib/ia32/FxSave.s deleted file mode 100644 index 44a55126a9..0000000000 --- a/MdePkg/Library/BaseLib/ia32/FxSave.s +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmFxSave ( -# OUT IA32_FX_BUFFER *Buffer -# ); -#------------------------------------------------------------------------------ -.global _AsmFxSave -_AsmFxSave: - movl 4(%esp),%eax - fxsave (%eax) - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange32.asm b/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange32.asm deleted file mode 100644 index c8c20fbc92..0000000000 --- a/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange32.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 -; InterlockedCompareExchange32 ( -; 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 diff --git a/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange32.s b/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange32.s deleted file mode 100644 index 43bb92526e..0000000000 --- a/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange32.s +++ /dev/null @@ -1,64 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID * -# EFIAPI -# InterlockedCompareExchangePointer ( -# IN VOID **Value, -# IN VOID *CompareValue, -# IN VOID *ExchangeValue -# ); -#------------------------------------------------------------------------------ -.global _InterlockedCompareExchangePointer -_InterlockedCompareExchangePointer: - # - # InterlockedCompareExchangePointer() shares the same code as - # InterlockedCompareExchange32() on IA32 and thus no code inside this - # function - # - - -#------------------------------------------------------------------------------ -# UINT32 -# EFIAPI -# InterlockedCompareExchange32 ( -# IN UINT32 *Value, -# IN UINT32 CompareValue, -# IN UINT32 ExchangeValue -# ); -#------------------------------------------------------------------------------ -.global _InterlockedCompareExchange32 -_InterlockedCompareExchange32: - movl 4(%esp),%ecx - movl 8(%esp),%eax - movl 12(%esp),%edx - lock cmpxchgl %edx,(%ecx) - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange64.asm b/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange64.asm deleted file mode 100644 index cded9206b8..0000000000 --- a/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange64.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 -; InterlockedCompareExchange64 ( -; 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 diff --git a/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange64.s b/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange64.s deleted file mode 100644 index abc51e905b..0000000000 --- a/MdePkg/Library/BaseLib/ia32/InterlockedCompareExchange64.s +++ /dev/null @@ -1,52 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InterlockedCompareExchange64 ( -# IN UINT64 *Value, -# IN UINT64 CompareValue, -# IN UINT64 ExchangeValue -# ); -#------------------------------------------------------------------------------ -.global _InterlockedCompareExchange64 - 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 - - - diff --git a/MdePkg/Library/BaseLib/ia32/InterlockedDecrement.asm b/MdePkg/Library/BaseLib/ia32/InterlockedDecrement.asm deleted file mode 100644 index d8495405c0..0000000000 --- a/MdePkg/Library/BaseLib/ia32/InterlockedDecrement.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 -; InterlockedDecrement ( -; IN UINT32 *Value -; ); -;------------------------------------------------------------------------------ -InternalSyncDecrement PROC - mov eax, [esp + 4] - lock dec dword ptr [eax] - mov eax, [eax] - ret -InternalSyncDecrement ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/InterlockedDecrement.s b/MdePkg/Library/BaseLib/ia32/InterlockedDecrement.s deleted file mode 100644 index a7b653ac20..0000000000 --- a/MdePkg/Library/BaseLib/ia32/InterlockedDecrement.s +++ /dev/null @@ -1,44 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT32 -# EFIAPI -# InterlockedDecrement ( -# IN UINT32 *Value -# ); -#------------------------------------------------------------------------------ -.global _InterlockedDecrement -_InterlockedDecrement: - movl 4(%esp),%eax - lock - decl (%eax) - movl (%eax),%eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/InterlockedIncrement.asm b/MdePkg/Library/BaseLib/ia32/InterlockedIncrement.asm deleted file mode 100644 index a7bfb6fccd..0000000000 --- a/MdePkg/Library/BaseLib/ia32/InterlockedIncrement.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 -; InterlockedIncrement ( -; IN UINT32 *Value -; ); -;------------------------------------------------------------------------------ -InternalSyncIncrement PROC - mov eax, [esp + 4] - lock inc dword ptr [eax] - mov eax, [eax] - ret -InternalSyncIncrement ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/InterlockedIncrement.s b/MdePkg/Library/BaseLib/ia32/InterlockedIncrement.s deleted file mode 100644 index 3f9beec211..0000000000 --- a/MdePkg/Library/BaseLib/ia32/InterlockedIncrement.s +++ /dev/null @@ -1,44 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT32 -# EFIAPI -# InterlockedIncrement ( -# IN UINT32 *Value -# ); -#------------------------------------------------------------------------------ -.global _InterlockedIncrement -_InterlockedIncrement: - movl 4(%esp),%eax - lock - incl (%eax) - movl (%eax),%eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/Invd.asm b/MdePkg/Library/BaseLib/ia32/Invd.asm deleted file mode 100644 index 5767f54848..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Invd.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 diff --git a/MdePkg/Library/BaseLib/ia32/Invd.s b/MdePkg/Library/BaseLib/ia32/Invd.s deleted file mode 100644 index 6d6c8d46cd..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Invd.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmInvd ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmInvd -_AsmInvd: - invd - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/LRotU64.asm b/MdePkg/Library/BaseLib/ia32/LRotU64.asm deleted file mode 100644 index 1d5562a799..0000000000 --- a/MdePkg/Library/BaseLib/ia32/LRotU64.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -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 - cmovnz ecx, eax - cmovnz eax, edx - cmovnz edx, ecx - ret -InternalMathLRotU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/LRotU64.s b/MdePkg/Library/BaseLib/ia32/LRotU64.s deleted file mode 100644 index 9c961ce378..0000000000 --- a/MdePkg/Library/BaseLib/ia32/LRotU64.s +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.global _LRotU64 - 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 - - - diff --git a/MdePkg/Library/BaseLib/ia32/LShiftU64.asm b/MdePkg/Library/BaseLib/ia32/LShiftU64.asm deleted file mode 100644 index 9ce946ddd1..0000000000 --- a/MdePkg/Library/BaseLib/ia32/LShiftU64.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -InternalMathLShiftU64 PROC - mov cl, [esp + 12] - xor eax, eax - mov edx, [esp + 4] - test cl, 32 - cmovz eax, edx - cmovz edx, [esp + 8] - shld edx, eax, cl - shl eax, cl - ret -InternalMathLShiftU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/LShiftU64.s b/MdePkg/Library/BaseLib/ia32/LShiftU64.s deleted file mode 100644 index 94cbc12265..0000000000 --- a/MdePkg/Library/BaseLib/ia32/LShiftU64.s +++ /dev/null @@ -1,39 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.global _LShiftU64 -_LShiftU64: - movb 12(%esp),%cl - xorl %eax,%eax - movl 4(%esp),%edx - testb $32,%cl - cmovz %edx, %eax - cmovz 8(%esp), %edx - shldl %cl,%eax,%edx - shll %cl,%eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/LongJump.asm b/MdePkg/Library/BaseLib/ia32/LongJump.asm deleted file mode 100644 index ff0cef2273..0000000000 --- a/MdePkg/Library/BaseLib/ia32/LongJump.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -_LongJump PROC - pop eax - pop edx - pop eax - mov ebx, [edx] - mov esi, [edx + 4] - mov edi, [edx + 8] - mov ebp, [edx + 12] - mov esp, [edx + 16] - jmp dword ptr [edx + 20] -_LongJump ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/LongJump.s b/MdePkg/Library/BaseLib/ia32/LongJump.s deleted file mode 100644 index 3da09142fc..0000000000 --- a/MdePkg/Library/BaseLib/ia32/LongJump.s +++ /dev/null @@ -1,39 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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. -# -#------------------------------------------------------------------------------ - - - - - -.global _LongJump -_LongJump: - popl %eax - popl %edx - popl %eax - movl (%edx),%ebx - movl 4(%edx),%esi - movl 8(%edx),%edi - movl 12(%edx),%ebp - movl 16(%edx),%esp - jmpl *20(%edx) - - - diff --git a/MdePkg/Library/BaseLib/ia32/ModU64x32.asm b/MdePkg/Library/BaseLib/ia32/ModU64x32.asm deleted file mode 100644 index 62481ce98a..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ModU64x32.asm +++ /dev/null @@ -1,37 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -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 diff --git a/MdePkg/Library/BaseLib/ia32/ModU64x32.s b/MdePkg/Library/BaseLib/ia32/ModU64x32.s deleted file mode 100644 index ed9c2fee25..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ModU64x32.s +++ /dev/null @@ -1,38 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.global _ModU64x32 -_ModU64x32: - movl 8(%esp),%eax - movl 12(%esp),%ecx - xorl %edx,%edx - divl %ecx - movl 4(%esp),%eax - divl %ecx - movl %edx,%eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/Monitor.asm b/MdePkg/Library/BaseLib/ia32/Monitor.asm deleted file mode 100644 index 5d92d26673..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Monitor.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINT64 -; 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 - ret -_AsmMonitor ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/Monitor.s b/MdePkg/Library/BaseLib/ia32/Monitor.s deleted file mode 100644 index 8da0e341ed..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Monitor.s +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmMonitor ( -# IN UINTN Eax, -# IN UINTN Ecx, -# IN UINTN Edx -# ); -#------------------------------------------------------------------------------ -.global _AsmMonitor -_AsmMonitor: - movl 4(%esp),%eax - movl 8(%esp),%ecx - movl 12(%esp),%edx - monitor %eax,%ecx,%edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/MultU64x32.asm b/MdePkg/Library/BaseLib/ia32/MultU64x32.asm deleted file mode 100644 index e2806e3082..0000000000 --- a/MdePkg/Library/BaseLib/ia32/MultU64x32.asm +++ /dev/null @@ -1,35 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -InternalMathMultU64x32 PROC - mov ecx, [esp + 12] - mov eax, ecx - imul ecx, [esp + 8] - mul dword ptr [esp + 4] - add edx, ecx - ret -InternalMathMultU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/MultU64x32.s b/MdePkg/Library/BaseLib/ia32/MultU64x32.s deleted file mode 100644 index 03c520bcf7..0000000000 --- a/MdePkg/Library/BaseLib/ia32/MultU64x32.s +++ /dev/null @@ -1,36 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.global _MultU64x32 -_MultU64x32: - movl 12(%esp),%ecx - movl %ecx,%eax - imull 8(%esp),%ecx - mull 4(%esp) - addl %ecx,%edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/MultU64x64.asm b/MdePkg/Library/BaseLib/ia32/MultU64x64.asm deleted file mode 100644 index 24c6a7daa3..0000000000 --- a/MdePkg/Library/BaseLib/ia32/MultU64x64.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -InternalMathMultU64x64 PROC USES ebx - mov ebx, [esp + 8] - mov edx, [esp + 16] - mov ecx, ebx - mov eax, edx - imul ebx, [esp + 20] - imul edx, [esp + 12] - add ebx, edx - mul ecx - add edx, ebx - ret -InternalMathMultU64x64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/MultU64x64.s b/MdePkg/Library/BaseLib/ia32/MultU64x64.s deleted file mode 100644 index 8841fc44dc..0000000000 --- a/MdePkg/Library/BaseLib/ia32/MultU64x64.s +++ /dev/null @@ -1,49 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.global _MultS64x64 -_MultS64x64: - # - # MultS64x32 shares the same implementation with _MultU64x32, and thus no - # code inside this function. - # - - -.global _MultU64x64 - 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 - - - diff --git a/MdePkg/Library/BaseLib/ia32/Mwait.asm b/MdePkg/Library/BaseLib/ia32/Mwait.asm deleted file mode 100644 index 91d505b4e2..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Mwait.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmMwait ( -; IN UINTN Eax, -; IN UINTN Ecx -; ); -;------------------------------------------------------------------------------ -_AsmMwait PROC - mov eax, [esp + 4] - mov ecx, [esp + 8] - DB 0fh, 1, 0c9h - ret -_AsmMwait ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/Mwait.s b/MdePkg/Library/BaseLib/ia32/Mwait.s deleted file mode 100644 index 7e04453352..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Mwait.s +++ /dev/null @@ -1,44 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmMwait ( -# IN UINTN Eax, -# IN UINTN Ecx -# ); -#------------------------------------------------------------------------------ -.global _AsmMwait -_AsmMwait: - movl 4(%esp),%eax - movl 8(%esp),%ecx - mwait %eax,%ecx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/Non-existing.c b/MdePkg/Library/BaseLib/ia32/Non-existing.c deleted file mode 100644 index 4132d30c31..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Non-existing.c +++ /dev/null @@ -1,30 +0,0 @@ -/** @file - Non-existing BaseLib functions on Ia32 - - Copyright (c) 2006, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - Module Name: Non-existing.c - -**/ - -#include "../BaseLibInternals.h" - -VOID -EFIAPI -InternalX86DisablePaging64 ( - IN UINT16 CodeSelector, - IN UINT32 EntryPoint, - IN UINT32 Context1, OPTIONAL - IN UINT32 Context2, OPTIONAL - IN UINT32 NewStack - ) -{ - ASSERT (FALSE); -} diff --git a/MdePkg/Library/BaseLib/ia32/RRotU64.asm b/MdePkg/Library/BaseLib/ia32/RRotU64.asm deleted file mode 100644 index 062e201e8d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/RRotU64.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -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 - cmovnz ecx, eax - cmovnz eax, edx - cmovnz edx, ecx - ret -InternalMathRRotU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/RRotU64.s b/MdePkg/Library/BaseLib/ia32/RRotU64.s deleted file mode 100644 index 541e420a3c..0000000000 --- a/MdePkg/Library/BaseLib/ia32/RRotU64.s +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.global _RRotU64 - 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 - - - diff --git a/MdePkg/Library/BaseLib/ia32/RShiftU64.asm b/MdePkg/Library/BaseLib/ia32/RShiftU64.asm deleted file mode 100644 index effbc55e1c..0000000000 --- a/MdePkg/Library/BaseLib/ia32/RShiftU64.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -InternalMathRShiftU64 PROC - mov cl, [esp + 12] - xor edx, edx - mov eax, [esp + 8] - test cl, 32 - cmovz edx, eax - cmovz eax, [esp + 4] - shrd eax, edx, cl - shr edx, cl - ret -InternalMathRShiftU64 ENDP - - END \ No newline at end of file diff --git a/MdePkg/Library/BaseLib/ia32/RShiftU64.s b/MdePkg/Library/BaseLib/ia32/RShiftU64.s deleted file mode 100644 index 5b681e391b..0000000000 --- a/MdePkg/Library/BaseLib/ia32/RShiftU64.s +++ /dev/null @@ -1,39 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ - - - - - -.global _RShiftU64 -_RShiftU64: - movb 12(%esp),%cl - xorl %edx,%edx - movl 8(%esp),%eax - testb $32,%cl - cmovz %eax, %edx - cmovz 4(%esp), %eax - shrdl %cl,%edx,%eax - shrl %cl,%edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadCr0.asm b/MdePkg/Library/BaseLib/ia32/ReadCr0.asm deleted file mode 100644 index 579cee2377..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadCr0.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadCr0 PROC - mov eax, cr0 - ret -_AsmReadCr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadCr0.s b/MdePkg/Library/BaseLib/ia32/ReadCr0.s deleted file mode 100644 index 3108b71eeb..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadCr0.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadCr0 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadCr0 -_AsmReadCr0: - movl %cr0, %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadCr2.asm b/MdePkg/Library/BaseLib/ia32/ReadCr2.asm deleted file mode 100644 index 3e4a926abd..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadCr2.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadCr2 PROC - mov eax, cr2 - ret -_AsmReadCr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadCr2.s b/MdePkg/Library/BaseLib/ia32/ReadCr2.s deleted file mode 100644 index 3ce287a252..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadCr2.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadCr2 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadCr2 -_AsmReadCr2: - movl %cr2, %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadCr3.asm b/MdePkg/Library/BaseLib/ia32/ReadCr3.asm deleted file mode 100644 index c24ded8051..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadCr3.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadCr3 PROC - mov eax, cr3 - ret -_AsmReadCr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadCr3.s b/MdePkg/Library/BaseLib/ia32/ReadCr3.s deleted file mode 100644 index 2bd63c725a..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadCr3.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadCr3 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadCr3 -_AsmReadCr3: - movl %cr3, %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadCr4.asm b/MdePkg/Library/BaseLib/ia32/ReadCr4.asm deleted file mode 100644 index 258f37a97f..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadCr4.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadCr4 PROC - mov eax, cr4 - ret -_AsmReadCr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadCr4.s b/MdePkg/Library/BaseLib/ia32/ReadCr4.s deleted file mode 100644 index 4d746d807b..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadCr4.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadCr4 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadCr4 -_AsmReadCr4: - movl %cr4, %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadCs.asm b/MdePkg/Library/BaseLib/ia32/ReadCs.asm deleted file mode 100644 index 5972d66754..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadCs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadCs ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadCs PROC - mov ax, cs - ret -_AsmReadCs ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadCs.s b/MdePkg/Library/BaseLib/ia32/ReadCs.s deleted file mode 100644 index 66bf4b9eeb..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadCs.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT16 -# EFIAPI -# AsmReadCs ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadCs -_AsmReadCs: - movw %cs,%ax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr0.asm b/MdePkg/Library/BaseLib/ia32/ReadDr0.asm deleted file mode 100644 index 4da1dd8d0d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr0.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadDr0 PROC - mov eax, dr0 - ret -_AsmReadDr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr0.s b/MdePkg/Library/BaseLib/ia32/ReadDr0.s deleted file mode 100644 index 00c521b51d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr0.s +++ /dev/null @@ -1,40 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadDr0 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadDr0 -_AsmReadDr0: - movl %dr0, %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr1.asm b/MdePkg/Library/BaseLib/ia32/ReadDr1.asm deleted file mode 100644 index 8724dd228b..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr1.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadDr1 PROC - mov eax, dr1 - ret -_AsmReadDr1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr1.s b/MdePkg/Library/BaseLib/ia32/ReadDr1.s deleted file mode 100644 index 81d0e54919..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr1.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadDr1 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadDr1 -_AsmReadDr1: - movl %dr1, %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr2.asm b/MdePkg/Library/BaseLib/ia32/ReadDr2.asm deleted file mode 100644 index 9122d42545..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr2.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadDr2 PROC - mov eax, dr2 - ret -_AsmReadDr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr2.s b/MdePkg/Library/BaseLib/ia32/ReadDr2.s deleted file mode 100644 index 296fff699e..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr2.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadDr2 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadDr2 -_AsmReadDr2: - movl %dr2, %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr3.asm b/MdePkg/Library/BaseLib/ia32/ReadDr3.asm deleted file mode 100644 index 7c1ee9826d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr3.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadDr3 PROC - mov eax, dr3 - ret -_AsmReadDr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr3.s b/MdePkg/Library/BaseLib/ia32/ReadDr3.s deleted file mode 100644 index e99391de81..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr3.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadDr3 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadDr3 -_AsmReadDr3: - movl %dr3, %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr4.asm b/MdePkg/Library/BaseLib/ia32/ReadDr4.asm deleted file mode 100644 index 01724555d2..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr4.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadDr4 PROC - DB 0fh, 21h, 0e0h - ret -_AsmReadDr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr5.asm b/MdePkg/Library/BaseLib/ia32/ReadDr5.asm deleted file mode 100644 index a95527e44c..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr5.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadDr5 PROC - DB 0fh, 21h, 0e8h - ret -_AsmReadDr5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr6.asm b/MdePkg/Library/BaseLib/ia32/ReadDr6.asm deleted file mode 100644 index b2d9a3d252..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr6.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadDr6 PROC - mov eax, dr6 - ret -_AsmReadDr6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr6.s b/MdePkg/Library/BaseLib/ia32/ReadDr6.s deleted file mode 100644 index bdadd80672..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr6.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadDr6 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadDr6 -_AsmReadDr6: - movl %dr6, %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr7.asm b/MdePkg/Library/BaseLib/ia32/ReadDr7.asm deleted file mode 100644 index 23924b1184..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr7.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadDr7 PROC - mov eax, dr7 - ret -_AsmReadDr7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadDr7.s b/MdePkg/Library/BaseLib/ia32/ReadDr7.s deleted file mode 100644 index cf213caac9..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDr7.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadDr7 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadDr7 -_AsmReadDr7: - movl %dr7, %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadDs.asm b/MdePkg/Library/BaseLib/ia32/ReadDs.asm deleted file mode 100644 index 6992766e58..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadDs ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadDs PROC - mov ax, ds - ret -_AsmReadDs ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadDs.s b/MdePkg/Library/BaseLib/ia32/ReadDs.s deleted file mode 100644 index ca1e37937a..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadDs.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT16 -# EFIAPI -# AsmReadDs ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadDs -_AsmReadDs: - movw %ds,%ax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadEflags.asm b/MdePkg/Library/BaseLib/ia32/ReadEflags.asm deleted file mode 100644 index 365b1dee87..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadEflags.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadEflags ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadEflags PROC - pushfd - pop eax - ret -_AsmReadEflags ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadEflags.s b/MdePkg/Library/BaseLib/ia32/ReadEflags.s deleted file mode 100644 index a70a209ffb..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadEflags.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadEflags ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadEflags -_AsmReadEflags: - pushfl - popl %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadEs.asm b/MdePkg/Library/BaseLib/ia32/ReadEs.asm deleted file mode 100644 index 0ced46aa62..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadEs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadEs ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadEs PROC - mov ax, es - ret -_AsmReadEs ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadEs.s b/MdePkg/Library/BaseLib/ia32/ReadEs.s deleted file mode 100644 index 69727b5afc..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadEs.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT16 -# EFIAPI -# AsmReadEs ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadEs -_AsmReadEs: - movw %es,%ax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadFs.asm b/MdePkg/Library/BaseLib/ia32/ReadFs.asm deleted file mode 100644 index f1790c6e9e..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadFs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .386 - .model flat - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadFs ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadFs PROC - mov ax, fs - ret -_AsmReadFs ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadFs.s b/MdePkg/Library/BaseLib/ia32/ReadFs.s deleted file mode 100644 index 7f4fdfa77c..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadFs.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT16 -# EFIAPI -# AsmReadFs ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadFs -_AsmReadFs: - movw %fs,%ax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadGdtr.asm b/MdePkg/Library/BaseLib/ia32/ReadGdtr.asm deleted file mode 100644 index beacb62b0d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadGdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadGdtr.Asm -; -; Abstract: -; -; AsmReadGdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86ReadGdtr ( -; OUT IA32_DESCRIPTOR *Gdtr -; ); -;------------------------------------------------------------------------------ -InternalX86ReadGdtr PROC - mov eax, [esp + 4] - sgdt fword ptr [eax] - ret -InternalX86ReadGdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadGdtr.s b/MdePkg/Library/BaseLib/ia32/ReadGdtr.s deleted file mode 100644 index f03a05696d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadGdtr.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadGdtr.Asm -# -# Abstract: -# -# AsmReadGdtr function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmReadGdtr ( -# OUT IA32_DESCRIPTOR *Gdtr -# ); -#------------------------------------------------------------------------------ -.global _AsmReadGdtr -_AsmReadGdtr: - movl 4(%esp),%eax - sgdt (%eax) - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadGs.asm b/MdePkg/Library/BaseLib/ia32/ReadGs.asm deleted file mode 100644 index 1de0ebfc88..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadGs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadGs.Asm -; -; Abstract: -; -; AsmReadGs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadGs ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadGs PROC - mov ax, gs - ret -_AsmReadGs ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadGs.s b/MdePkg/Library/BaseLib/ia32/ReadGs.s deleted file mode 100644 index 0d88a60a52..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadGs.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadGs.Asm -# -# Abstract: -# -# AsmReadGs function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT16 -# EFIAPI -# AsmReadGs ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadGs -_AsmReadGs: - movw %gs,%ax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadIdtr.asm b/MdePkg/Library/BaseLib/ia32/ReadIdtr.asm deleted file mode 100644 index 95158be903..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadIdtr.asm +++ /dev/null @@ -1,34 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadIdtr.Asm -; -; Abstract: -; -; AsmReadIdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -InternalX86ReadIdtr PROC - mov eax, [esp + 4] - sidt fword ptr [eax] - ret -InternalX86ReadIdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadIdtr.s b/MdePkg/Library/BaseLib/ia32/ReadIdtr.s deleted file mode 100644 index fa72d3ba7d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadIdtr.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadIdtr.Asm -# -# Abstract: -# -# AsmReadIdtr function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmReadIdtr ( -# OUT IA32_DESCRIPTOR *Idtr -# ); -#------------------------------------------------------------------------------ -.global _AsmReadIdtr -_AsmReadIdtr: - movl 4(%esp),%eax - sidt (%eax) - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadLdtr.asm b/MdePkg/Library/BaseLib/ia32/ReadLdtr.asm deleted file mode 100644 index a859a0e553..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadLdtr.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadLdtr.Asm -; -; Abstract: -; -; AsmReadLdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadLdtr ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadLdtr PROC - sldt ax - ret -_AsmReadLdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadLdtr.s b/MdePkg/Library/BaseLib/ia32/ReadLdtr.s deleted file mode 100644 index aea1d9265c..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadLdtr.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadLdtr.Asm -# -# Abstract: -# -# AsmReadLdtr function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT16 -# EFIAPI -# AsmReadLdtr ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadLdtr -_AsmReadLdtr: - sldt %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm0.asm b/MdePkg/Library/BaseLib/ia32/ReadMm0.asm deleted file mode 100644 index c45895b2a8..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm0.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm0.Asm -; -; Abstract: -; -; AsmReadMm0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadMm0 PROC - push eax - push eax - movq [esp], mm0 - pop eax - pop edx - ret -_AsmReadMm0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm0.s b/MdePkg/Library/BaseLib/ia32/ReadMm0.s deleted file mode 100644 index dd6b846836..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm0.s +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadMm0.Asm -# -# Abstract: -# -# AsmReadMm0 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadMm0 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadMm0 -_AsmReadMm0: - pushl %eax - pushl %eax - movq %mm0,(%esp) - popl %eax - popl %edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm1.asm b/MdePkg/Library/BaseLib/ia32/ReadMm1.asm deleted file mode 100644 index ea748cbd7e..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm1.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm1.Asm -; -; Abstract: -; -; AsmReadMm1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadMm1 PROC - push eax - push eax - movq [esp], mm1 - pop eax - pop edx - ret -_AsmReadMm1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm1.s b/MdePkg/Library/BaseLib/ia32/ReadMm1.s deleted file mode 100644 index cbaafff0f3..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm1.s +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadMm1.Asm -# -# Abstract: -# -# AsmReadMm1 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadMm1 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadMm1 -_AsmReadMm1: - pushl %eax - pushl %eax - movq %mm1,(%esp) - popl %eax - popl %edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm2.asm b/MdePkg/Library/BaseLib/ia32/ReadMm2.asm deleted file mode 100644 index ab16c513f3..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm2.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm2.Asm -; -; Abstract: -; -; AsmReadMm2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadMm2 PROC - push eax - push eax - movq [esp], mm2 - pop eax - pop edx - ret -_AsmReadMm2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm2.s b/MdePkg/Library/BaseLib/ia32/ReadMm2.s deleted file mode 100644 index 22a5d71ebc..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm2.s +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadMm2.Asm -# -# Abstract: -# -# AsmReadMm2 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadMm2 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadMm2 -_AsmReadMm2: - pushl %eax - pushl %eax - movq %mm2,(%esp) - popl %eax - popl %edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm3.asm b/MdePkg/Library/BaseLib/ia32/ReadMm3.asm deleted file mode 100644 index 3c4bf34492..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm3.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm3.Asm -; -; Abstract: -; -; AsmReadMm3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadMm3 PROC - push eax - push eax - movq [esp], mm3 - pop eax - pop edx - ret -_AsmReadMm3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm3.s b/MdePkg/Library/BaseLib/ia32/ReadMm3.s deleted file mode 100644 index dae267af7a..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm3.s +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadMm3.Asm -# -# Abstract: -# -# AsmReadMm3 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadMm3 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadMm3 -_AsmReadMm3: - pushl %eax - pushl %eax - movq %mm3,(%esp) - popl %eax - popl %edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm4.asm b/MdePkg/Library/BaseLib/ia32/ReadMm4.asm deleted file mode 100644 index 4c2beb885b..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm4.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm4.Asm -; -; Abstract: -; -; AsmReadMm4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadMm4 PROC - push eax - push eax - movq [esp], mm4 - pop eax - pop edx - ret -_AsmReadMm4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm4.s b/MdePkg/Library/BaseLib/ia32/ReadMm4.s deleted file mode 100644 index 0ae1afcedd..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm4.s +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadMm4.Asm -# -# Abstract: -# -# AsmReadMm4 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadMm4 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadMm4 -_AsmReadMm4: - pushl %eax - pushl %eax - movq %mm4,(%esp) - popl %eax - popl %edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm5.asm b/MdePkg/Library/BaseLib/ia32/ReadMm5.asm deleted file mode 100644 index 66e38265c6..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm5.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm5.Asm -; -; Abstract: -; -; AsmReadMm5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadMm5 PROC - push eax - push eax - movq [esp], mm5 - pop eax - pop edx - ret -_AsmReadMm5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm5.s b/MdePkg/Library/BaseLib/ia32/ReadMm5.s deleted file mode 100644 index 2fad14a7e0..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm5.s +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadMm5.Asm -# -# Abstract: -# -# AsmReadMm5 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadMm5 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadMm5 -_AsmReadMm5: - pushl %eax - pushl %eax - movq %mm5,(%esp) - popl %eax - popl %edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm6.asm b/MdePkg/Library/BaseLib/ia32/ReadMm6.asm deleted file mode 100644 index 69d9e13f6b..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm6.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm6.Asm -; -; Abstract: -; -; AsmReadMm6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadMm6 PROC - push eax - push eax - movq [esp], mm6 - pop eax - pop edx - ret -_AsmReadMm6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm6.s b/MdePkg/Library/BaseLib/ia32/ReadMm6.s deleted file mode 100644 index 22cddfa486..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm6.s +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadMm6.Asm -# -# Abstract: -# -# AsmReadMm6 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadMm6 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadMm6 -_AsmReadMm6: - pushl %eax - pushl %eax - movq %mm6,(%esp) - popl %eax - popl %edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm7.asm b/MdePkg/Library/BaseLib/ia32/ReadMm7.asm deleted file mode 100644 index a8788cbf7a..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm7.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm7.Asm -; -; Abstract: -; -; AsmReadMm7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadMm7 PROC - push eax - push eax - movq [esp], mm7 - pop eax - pop edx - ret -_AsmReadMm7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadMm7.s b/MdePkg/Library/BaseLib/ia32/ReadMm7.s deleted file mode 100644 index fb485a00c9..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMm7.s +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadMm7.Asm -# -# Abstract: -# -# AsmReadMm7 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmReadMm7 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadMm7 -_AsmReadMm7: - pushl %eax - pushl %eax - movq %mm7,(%esp) - popl %eax - popl %edx - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadMsr64.asm b/MdePkg/Library/BaseLib/ia32/ReadMsr64.asm deleted file mode 100644 index 6c9fe00033..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMsr64.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMsr64.Asm -; -; Abstract: -; -; AsmReadMsr64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; AsmReadMsr32 ( -; IN UINT32 Index -; ); -;------------------------------------------------------------------------------ -_AsmReadMsr32 PROC - ; - ; AsmReadMsr32 shares the same implementation with AsmReadMsr64 and thus no - ; code inside this function - ; -_AsmReadMsr32 ENDP - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMsr64 ( -; IN UINT64 Index -; ); -;------------------------------------------------------------------------------ -_AsmReadMsr64 PROC - mov ecx, [esp + 4] - rdmsr - ret -_AsmReadMsr64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadMsr64.s b/MdePkg/Library/BaseLib/ia32/ReadMsr64.s deleted file mode 100644 index 6a2c9c6688..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadMsr64.s +++ /dev/null @@ -1,57 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadMsr64.Asm -# -# Abstract: -# -# AsmReadMsr64 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT32 -# EFIAPI -# AsmReadMsr32 ( -# IN UINT32 Index -# ); -#------------------------------------------------------------------------------ -.global _AsmReadMsr32 -_AsmReadMsr32: - # - # AsmReadMsr32 shares the same implementation with AsmReadMsr64 and thus no - # code inside this function - # - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmReadMsr64 ( -# IN UINT64 Index -# ); -#------------------------------------------------------------------------------ -.global _AsmReadMsr64 -_AsmReadMsr64: - movl 4(%esp),%ecx - rdmsr - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadPmc.asm b/MdePkg/Library/BaseLib/ia32/ReadPmc.asm deleted file mode 100644 index 1fe598158d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadPmc.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadPmc.Asm -; -; Abstract: -; -; AsmReadPmc function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadPmc ( -; IN UINT32 PmcIndex -; ); -;------------------------------------------------------------------------------ -_AsmReadPmc PROC - mov ecx, [esp + 4] - rdpmc - ret -_AsmReadPmc ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadPmc.s b/MdePkg/Library/BaseLib/ia32/ReadPmc.s deleted file mode 100644 index 868e85c23d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadPmc.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadPmc.Asm -# -# Abstract: -# -# AsmReadPmc function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmReadPmc ( -# IN UINT32 PmcIndex -# ); -#------------------------------------------------------------------------------ -.global _AsmReadPmc -_AsmReadPmc: - movl 4(%esp),%ecx - rdpmc - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadSs.asm b/MdePkg/Library/BaseLib/ia32/ReadSs.asm deleted file mode 100644 index 6d0cd9f2a0..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadSs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadSs.Asm -; -; Abstract: -; -; AsmReadSs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadSs ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadSs PROC - mov ax, ss - ret -_AsmReadSs ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadSs.s b/MdePkg/Library/BaseLib/ia32/ReadSs.s deleted file mode 100644 index 7db65c1490..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadSs.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadSs.Asm -# -# Abstract: -# -# AsmReadSs function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT16 -# EFIAPI -# AsmReadSs ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadSs -_AsmReadSs: - movw %ss,%ax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadTr.asm b/MdePkg/Library/BaseLib/ia32/ReadTr.asm deleted file mode 100644 index d77ee89123..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadTr.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadTr.Asm -; -; Abstract: -; -; AsmReadTr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadTr ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadTr PROC - str ax - ret -_AsmReadTr ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadTr.s b/MdePkg/Library/BaseLib/ia32/ReadTr.s deleted file mode 100644 index 8c31e9d9fa..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadTr.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadTr.Asm -# -# Abstract: -# -# AsmReadTr function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT16 -# EFIAPI -# AsmReadTr ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadTr -_AsmReadTr: - str %eax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/ReadTsc.asm b/MdePkg/Library/BaseLib/ia32/ReadTsc.asm deleted file mode 100644 index ea3c164ecd..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadTsc.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadTsc.Asm -; -; Abstract: -; -; AsmReadTsc function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadTsc ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmReadTsc PROC - rdtsc - ret -_AsmReadTsc ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/ReadTsc.s b/MdePkg/Library/BaseLib/ia32/ReadTsc.s deleted file mode 100644 index e7981c05b0..0000000000 --- a/MdePkg/Library/BaseLib/ia32/ReadTsc.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ReadTsc.Asm -# -# Abstract: -# -# AsmReadTsc function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmReadTsc ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmReadTsc -_AsmReadTsc: - rdtsc - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/SetJump.asm b/MdePkg/Library/BaseLib/ia32/SetJump.asm deleted file mode 100644 index 41277cd20f..0000000000 --- a/MdePkg/Library/BaseLib/ia32/SetJump.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetJump.Asm -; -; Abstract: -; -; Implementation of SetJump() on IA-32. -; -;------------------------------------------------------------------------------ - - .386 - .model flat - .code - -_SetJump PROC - pop ecx - mov edx, [esp] - mov [edx], ebx - mov [edx + 4], esi - mov [edx + 8], edi - mov [edx + 12], ebp - mov [edx + 16], esp - mov [edx + 20], ecx - xor eax, eax - jmp ecx -_SetJump ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/SetJump.s b/MdePkg/Library/BaseLib/ia32/SetJump.s deleted file mode 100644 index b1b6a84f63..0000000000 --- a/MdePkg/Library/BaseLib/ia32/SetJump.s +++ /dev/null @@ -1,40 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# SetJump.Asm -# -# Abstract: -# -# Implementation of SetJump() on IA-32. -# -#------------------------------------------------------------------------------ - - - - - -.global _SetJump -_SetJump: - popl %ecx - movl (%esp),%edx - movl %ebx,(%edx) - movl %esi,4(%edx) - movl %edi,8(%edx) - movl %ebp,12(%edx) - movl %esp,16(%edx) - movl %ecx,20(%edx) - xorl %eax,%eax - jmp *%ecx - - - diff --git a/MdePkg/Library/BaseLib/ia32/SwapBytes64.asm b/MdePkg/Library/BaseLib/ia32/SwapBytes64.asm deleted file mode 100644 index 72e366bd4d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/SwapBytes64.asm +++ /dev/null @@ -1,36 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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 - -InternalMathSwapBytes64 PROC - mov eax, [esp + 8] - mov edx, [esp + 4] - bswap eax - bswap edx - ret -InternalMathSwapBytes64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/SwitchStack.c b/MdePkg/Library/BaseLib/ia32/SwitchStack.c deleted file mode 100644 index 77800e35dd..0000000000 --- a/MdePkg/Library/BaseLib/ia32/SwitchStack.c +++ /dev/null @@ -1,57 +0,0 @@ -/** @file - SwitchStack() function for IA-32. - - Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - Module Name: SwitchStack.c - -**/ - -/** - Transfers control to a function starting with a new stack. - - Transfers control to the function specified by EntryPoint using the new stack - specified by NewStack and passing in the parameters specified by Context1 and - Context2. Context1 and Context2 are optional and may be NULL. The function - EntryPoint must never return. - - If EntryPoint is NULL, then ASSERT(). - If NewStack is NULL, then ASSERT(). - - @param EntryPoint A pointer to function to call with the new stack. - @param Context1 A pointer to the context to pass into the EntryPoint - function. - @param Context2 A pointer to the context to pass into the EntryPoint - function. - @param NewStack A pointer to the new stack to use for the EntryPoint - function. - -**/ -VOID -EFIAPI -SwitchStack ( - IN SWITCH_STACK_ENTRY_POINT EntryPoint, - IN VOID *Context1, - IN VOID *Context2, - IN VOID *NewStack - ) -{ - BASE_LIBRARY_JUMP_BUFFER JumpBuffer; - - ASSERT (EntryPoint != NULL && NewStack != NULL); - - JumpBuffer.Eip = (UINTN)EntryPoint; - JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*); - JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2); - ((VOID**)JumpBuffer.Esp)[1] = Context1; - ((VOID**)JumpBuffer.Esp)[2] = Context2; - - LongJump (&JumpBuffer, (UINTN)-1); -} diff --git a/MdePkg/Library/BaseLib/ia32/Thunk16.asm b/MdePkg/Library/BaseLib/ia32/Thunk16.asm deleted file mode 100644 index 2d62d72aef..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Thunk16.asm +++ /dev/null @@ -1,163 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Thunk.asm -; -; Abstract: -; -; Real mode thunk -; -;------------------------------------------------------------------------------ - - .686p - .model flat,C - - .data - -NullSegSel DQ 0 -_16BitCsSel LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 9bh - DB 8fh ; 16-bit segment - DB 0 -_16BitDsSel LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 93h - DB 8fh ; 16-bit segment - DB 0 -GdtEnd LABEL QWORD - - .const - -_16Gdtr LABEL FWORD - DW offset GdtEnd - offset NullSegSel - 1 - DD offset NullSegSel - -_16Idtr FWORD (1 SHL 10) - 1 - - .code - -IA32_REGS STRUC 4t -_EDI DD ? -_ESI DD ? -_EBP DD ? -_ESP DD ? -_EBX DD ? -_EDX DD ? -_ECX DD ? -_EAX DD ? -_DS DW ? -_ES DW ? -_FS DW ? -_GS DW ? -_EFLAGS DD ? -_EIP DD ? -_CS DW ? -_SS DW ? -IA32_REGS ENDS - -InternalAsmThunk16 PROC USES ebp ebx esi edi ds es fs gs - mov esi, [esp + 36] ; esi <- RegSet - push sizeof (IA32_REGS) - pop ecx - movzx edx, (IA32_REGS ptr [esi])._SS - mov edi, (IA32_REGS ptr [esi])._ESP - sub edi, ecx ; reserve space on realmode stack - push edi ; save stack offset - imul eax, edx, 16 ; eax <- edx * 16 - add edi, eax ; edi <- linear address of 16-bit stack - rep movsb ; copy RegSet - mov esi, edx ; esi <- 16-bit stack segment - pop ebx ; ebx <- 16-bit stack offset - mov edi, [esp + 40] ; edi <- realmode patch - push cs ; save CS segment selector - push offset @BackToThunk ; offset to back from real mode - mov eax, offset @16Return - stosd - xor eax, eax - stosw ; set CS base to 0 - mov eax, esp - stosd - mov eax, ss - stosd - mov eax, cr0 - mov ecx, eax ; ecx <- CR0 - and ecx, 7ffffffeh ; clear PE, PG bits - stosd - mov eax, cr4 - mov ebp, eax - and ebp, 300h ; clear all but PCE and OSFXSR bits - stosd - sidt fword ptr [esp + 44] ; use parameter space to save IDTR - sgdt fword ptr [edi] - lidt _16Idtr - push 10h - pop eax - push 8 - push offset @16Start - lgdt _16Gdtr - retf -@16Start: ; 16-bit starts here - mov ss, eax ; set SS to be a 16-bit segment - mov cr0, ecx - mov cr4, ebp - mov ss, esi ; set up 16-bit stack - mov sp, bx ; mov esp, ebx actually - popaw ; popad actually - pop ds - pop es - pop fs - pop gs - add sp, 4 ; skip _EFLAGS - DB 66h - retf ; transfer control to 16-bit code -@16Return: - pushf ; pushfd actually - push gs - push fs - push es - push ds - pushaw ; pushad actually - DB 67h, 66h - lds esi, fword ptr (IA32_REGS ptr [esp])._EIP - DB 67h, 66h - mov eax, [esi + 12] - mov cr4, eax ; restore CR4 - DB 67h, 66h - lgdt fword ptr [esi + 16] - DB 67h, 66h - mov eax, [esi + 8] - mov cr0, eax ; restore CR0 - xor ax, ax ; xor eax, eax actually - mov eax, ss - DB 67h - mov dword ptr (IA32_REGS ptr [esp])._SS, eax - shl ax, 4 ; shl eax, 4 actually - add ax, sp ; add eax, esp actually - add sp, sizeof (IA32_REGS) ; add esp, sizeof (IA32_REGS) - DB 67h, 66h - mov dword ptr (IA32_REGS ptr [esp - sizeof (IA32_REGS)])._ESP, esp - DB 67h, 66h - lss esp, fword ptr [esi] ; restore protected mode stack - DB 66h - retf ; go back to protected mode -@BackToThunk: - lidt fword ptr [esp + 36] ; restore protected mode IDTR - ret -InternalAsmThunk16 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/Thunk16.s b/MdePkg/Library/BaseLib/ia32/Thunk16.s deleted file mode 100644 index 4236996226..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Thunk16.s +++ /dev/null @@ -1,191 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# Thunk.asm -# -# Abstract: -# -# Real mode thunk -# -#------------------------------------------------------------------------------ - - - -MISMATCH: "EXTERNDEF C mCode16Size:DWORD" - -MISMATCH: "CONST SEGMENT FLAT "DATA" READONLY" - -MISMATCH: "mCode16Size DD _TEXT16SIZE" - -MISMATCH: "CONSTS" - -MISMATCH: "_DATA SEGMENT FLAT "DATA"" - -MISMATCH: "NullSegSel DQ 0" -MISMATCH: "_16BitCsSel LABEL QWORD" - .word -1 - .word 0 - .byte 0 - .byte 0x9b - .byte 0x8f # 16-bit segment - .byte 0 - -MISMATCH: "_16Gdtr LABEL FWORD" -MISMATCH: " DW $ - offset NullSegSel - 1" -MISMATCH: " DD offset NullSegSel" - -MISMATCH: "_DATAS" - -MISMATCH: "_TEXT SEGMENT FLAT "CODE" PARA" - -MISMATCH: "IA32_REGS STRUC 4t" -MISMATCH: "_EDI DD ?" -MISMATCH: "_ESI DD ?" -MISMATCH: "_EBP DD ?" -MISMATCH: "_ESP DD ?" -MISMATCH: "_EBX DD ?" -MISMATCH: "_EDX DD ?" -MISMATCH: "_ECX DD ?" -MISMATCH: "_EAX DD ?" -MISMATCH: "_DS DW ?" -MISMATCH: "_ES DW ?" -MISMATCH: "_FS DW ?" -MISMATCH: "_GS DW ?" -MISMATCH: "_EFLAGS DD ?" -MISMATCH: "_EIP DD ?" -MISMATCH: "_CS DW ?" -MISMATCH: "_SS DW ?" -MISMATCH: "IA32_REGSS" - -MISMATCH: "_STK16 STRUC 1t" -MISMATCH: "RetEip DD ?" -MISMATCH: "RetCs DW ?" -MISMATCH: "ThunkFlags DW ?" -MISMATCH: "SavedEsp DD ?" -MISMATCH: "SavedSs DW ?" -MISMATCH: "SavedGdtr FWORD ?" -MISMATCH: "SavedCr0 DD ?" -MISMATCH: "SavedCr4 DD ?" -MISMATCH: "_STK16S" - -.global _InternalAsmThunk16 -MISMATCH: "_InternalAsmThunk16: USES ebp ebx esi edi ds es fs gs" -MISMATCH: " ASSUME esi:PTR IA32_REGS" - movl 36(%esp),%esi -MISMATCH: " movzx edx, [esi]._SS" - movl $[esi]._ESP, %edi -MISMATCH: " add edi, - sizeof (_STK16) - sizeof (IA32_REGS)" - pushl %edi # save stack offset - imull $16,%edx,%eax # eax <- edx*16 - addl %eax,%edi # edi <- linear address of 16-bit stack -MISMATCH: " push sizeof (IA32_REGS) / 4" - popl %ecx - rep - movsl # copy context to 16-bit stack - popl %ebx # ebx <- 16-bit stack offset -MISMATCH: " mov eax, offset @F " - stosl - movl %cs,%eax # return segment - stosw - movl 40(%esp),%eax # THUNK flags - stosw - movl %esp,%eax - stosl # save esp - movl %ss,%eax # save ss - stosw -MISMATCH: " sgdt fword ptr [edi] " -MISMATCH: " sidt fword ptr [esp + 36] " - movl %cr0, %esi - movl %esi,6(%edi) # save CR0 -MISMATCH: " and esi, NOT 80000001h " - movl %cr4, %eax - movl %eax,10(%edi) # save CR4 -MISMATCH: " and al, NOT 30h " - movl %edx,%edi # edi <- 16-bit stack segment - movl 44(%esp),%edx - shll $16,%edx - pushl %edx -MISMATCH: " lgdt _16Gdtr " - .byte 0xea -MISMATCH: " DD offset @16Bit" - .word 8 # jmp far 8:@16Bit -@16Bit: - movl %esi, %cr0 # disable protected mode - movl %eax, %cr4 # disable PAE & PSE - lret -@@: - movl %ss,%eax - shll $4,%eax - addl %esp,%eax # eax <- address of 16-bit stack -MISMATCH: " lss esp, fword ptr (_STK16 ptr [esp + sizeof (IA32_REGS)]).SavedEsp" -MISMATCH: " lidt fword ptr [esp + 36] " - ret - - -MISMATCH: "_TEXTS" - -MISMATCH: "_TEXT16 SEGMENT USE16 "CODE" PARA" - -.global _Code16Addr -MISMATCH: "_Code16Addr: C" - - -.global RealMode -RealMode: -MISMATCH: " ASSUME bp:PTR _STK16" - movw %di,%ss # set up stack - movl %ebx,%esp -MISMATCH: " lidt fword ptr cs:[_16Idtr - _Code16Addr]" - popal - popl %ds - popl %es - popl %fs - popl %gs - addw $4,%sp # skip EFlags -MISMATCH: " test (_STK16 ptr [esp + 8]).ThunkFlags, 1" - jz @F - pushf -@@: - pushw %cs -MISMATCH: " push @FarCallRet - _Code16Addr" - jz @F -MISMATCH: " jmp fword ptr [esp + 6]" -@@: -MISMATCH: " jmp fword ptr [esp + 4]" -@FarCallRet: - pushfl - pushw %gs - pushw %fs - pushw %es - pushw %ds - pushal - cli -MISMATCH: " lea bp, [esp + sizeof (IA32_REGS)]" - .byte 0x66 -MISMATCH: " lgdt [bp].SavedGdtr" - movl $[bp].SavedCr4, %eax - movl %eax, %cr4 - movl $[bp].SavedCr0, %eax - movl %eax, %cr0 # restore CR0 -MISMATCH: " jmp fword ptr [bp].RetEip" - - -MISMATCH: "_16Idtr FWORD (1 SHL 10) - 1" - -_TEXT16: - -MISMATCH: "_TEXT16SIZE = _TEXT16- _Code16Addr" - -MISMATCH: "_TEXT16S" - - diff --git a/MdePkg/Library/BaseLib/ia32/Wbinvd.asm b/MdePkg/Library/BaseLib/ia32/Wbinvd.asm deleted file mode 100644 index 07258fb9e9..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Wbinvd.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Wbinvd.Asm -; -; Abstract: -; -; AsmWbinvd function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWbinvd ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmWbinvd PROC - wbinvd - ret -_AsmWbinvd ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/Wbinvd.s b/MdePkg/Library/BaseLib/ia32/Wbinvd.s deleted file mode 100644 index e9f6c0ce6b..0000000000 --- a/MdePkg/Library/BaseLib/ia32/Wbinvd.s +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# Wbinvd.Asm -# -# Abstract: -# -# AsmWbinvd function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWbinvd ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmWbinvd -_AsmWbinvd: - wbinvd - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteCr0.asm b/MdePkg/Library/BaseLib/ia32/WriteCr0.asm deleted file mode 100644 index d64d621cd5..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteCr0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr0.Asm -; -; Abstract: -; -; AsmWriteCr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmWriteCr0 PROC - mov eax, [esp + 4] - mov cr0, eax - ret -_AsmWriteCr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteCr0.s b/MdePkg/Library/BaseLib/ia32/WriteCr0.s deleted file mode 100644 index 6e3ad50765..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteCr0.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteCr0.Asm -# -# Abstract: -# -# AsmWriteCr0 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteCr0 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteCr0 -_AsmWriteCr0: - movl 4(%esp),%eax - movl %eax, %cr0 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteCr2.asm b/MdePkg/Library/BaseLib/ia32/WriteCr2.asm deleted file mode 100644 index 7ab5b0f64f..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteCr2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr2.Asm -; -; Abstract: -; -; AsmWriteCr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmWriteCr2 PROC - mov eax, [esp + 4] - mov cr2, eax - ret -_AsmWriteCr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteCr2.s b/MdePkg/Library/BaseLib/ia32/WriteCr2.s deleted file mode 100644 index cf45e01a24..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteCr2.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteCr2.Asm -# -# Abstract: -# -# AsmWriteCr2 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteCr2 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteCr2 -_AsmWriteCr2: - movl 4(%esp),%eax - movl %eax, %cr2 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteCr3.asm b/MdePkg/Library/BaseLib/ia32/WriteCr3.asm deleted file mode 100644 index 9753de1abe..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteCr3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr3.Asm -; -; Abstract: -; -; AsmWriteCr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmWriteCr3 PROC - mov eax, [esp + 4] - mov cr3, eax - ret -_AsmWriteCr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteCr3.s b/MdePkg/Library/BaseLib/ia32/WriteCr3.s deleted file mode 100644 index 1c55581905..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteCr3.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteCr3.Asm -# -# Abstract: -# -# AsmWriteCr3 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteCr3 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteCr3 -_AsmWriteCr3: - movl 4(%esp),%eax - movl %eax, %cr3 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteCr4.asm b/MdePkg/Library/BaseLib/ia32/WriteCr4.asm deleted file mode 100644 index 60bfe78cb6..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteCr4.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr4.Asm -; -; Abstract: -; -; AsmWriteCr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -_AsmWriteCr4 PROC - mov eax, [esp + 4] - mov cr4, eax - ret -_AsmWriteCr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteCr4.s b/MdePkg/Library/BaseLib/ia32/WriteCr4.s deleted file mode 100644 index fbe48c1cd0..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteCr4.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteCr4.Asm -# -# Abstract: -# -# AsmWriteCr4 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteCr4 ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteCr4 -_AsmWriteCr4: - movl 4(%esp),%eax - movl %eax, %cr4 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr0.asm b/MdePkg/Library/BaseLib/ia32/WriteDr0.asm deleted file mode 100644 index 3dab544c49..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr0.Asm -; -; Abstract: -; -; AsmWriteDr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteDr0 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteDr0 PROC - mov eax, [esp + 4] - mov dr0, eax - ret -_AsmWriteDr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr0.s b/MdePkg/Library/BaseLib/ia32/WriteDr0.s deleted file mode 100644 index a5a84de6b4..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr0.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteDr0.Asm -# -# Abstract: -# -# AsmWriteDr0 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteDr0 ( -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteDr0 -_AsmWriteDr0: - movl 4(%esp),%eax - movl %eax, %dr0 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr1.asm b/MdePkg/Library/BaseLib/ia32/WriteDr1.asm deleted file mode 100644 index 5898206c53..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr1.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr1.Asm -; -; Abstract: -; -; AsmWriteDr1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteDr1 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteDr1 PROC - mov eax, [esp + 4] - mov dr1, eax - ret -_AsmWriteDr1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr1.s b/MdePkg/Library/BaseLib/ia32/WriteDr1.s deleted file mode 100644 index 66fc2c7cf3..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr1.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteDr1.Asm -# -# Abstract: -# -# AsmWriteDr1 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteDr1 ( -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteDr1 -_AsmWriteDr1: - movl 4(%esp),%eax - movl %eax, %dr1 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr2.asm b/MdePkg/Library/BaseLib/ia32/WriteDr2.asm deleted file mode 100644 index 3ed25fc8ef..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr2.Asm -; -; Abstract: -; -; AsmWriteDr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteDr2 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteDr2 PROC - mov eax, [esp + 4] - mov dr2, eax - ret -_AsmWriteDr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr2.s b/MdePkg/Library/BaseLib/ia32/WriteDr2.s deleted file mode 100644 index 7b3f780510..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr2.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteDr2.Asm -# -# Abstract: -# -# AsmWriteDr2 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteDr2 ( -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteDr2 -_AsmWriteDr2: - movl 4(%esp),%eax - movl %eax, %dr2 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr3.asm b/MdePkg/Library/BaseLib/ia32/WriteDr3.asm deleted file mode 100644 index c1dbc826b3..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr3.Asm -; -; Abstract: -; -; AsmWriteDr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteDr3 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteDr3 PROC - mov eax, [esp + 4] - mov dr3, eax - ret -_AsmWriteDr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr3.s b/MdePkg/Library/BaseLib/ia32/WriteDr3.s deleted file mode 100644 index 34d3e4f0cb..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr3.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteDr3.Asm -# -# Abstract: -# -# AsmWriteDr3 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteDr3 ( -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteDr3 -_AsmWriteDr3: - movl 4(%esp),%eax - movl %eax, %dr3 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr4.asm b/MdePkg/Library/BaseLib/ia32/WriteDr4.asm deleted file mode 100644 index 2c82512acc..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr4.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr4.Asm -; -; Abstract: -; -; AsmWriteDr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteDr4 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteDr4 PROC - mov eax, [esp + 4] - DB 0fh, 23h, 0e0h - ret -_AsmWriteDr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr5.asm b/MdePkg/Library/BaseLib/ia32/WriteDr5.asm deleted file mode 100644 index dc074244a1..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr5.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr5.Asm -; -; Abstract: -; -; AsmWriteDr5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteDr5 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteDr5 PROC - mov eax, [esp + 4] - DB 0fh, 23h, 0e8h - ret -_AsmWriteDr5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr6.asm b/MdePkg/Library/BaseLib/ia32/WriteDr6.asm deleted file mode 100644 index e307e827dd..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr6.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr6.Asm -; -; Abstract: -; -; AsmWriteDr6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteDr6 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteDr6 PROC - mov eax, [esp + 4] - mov dr6, eax - ret -_AsmWriteDr6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr6.s b/MdePkg/Library/BaseLib/ia32/WriteDr6.s deleted file mode 100644 index 7d7726be64..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr6.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteDr6.Asm -# -# Abstract: -# -# AsmWriteDr6 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteDr6 ( -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteDr6 -_AsmWriteDr6: - movl 4(%esp),%eax - movl %eax, %dr6 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr7.asm b/MdePkg/Library/BaseLib/ia32/WriteDr7.asm deleted file mode 100644 index 55dbdc9c52..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr7.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr7.Asm -; -; Abstract: -; -; AsmWriteDr7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteDr7 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteDr7 PROC - mov eax, [esp + 4] - mov dr7, eax - ret -_AsmWriteDr7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteDr7.s b/MdePkg/Library/BaseLib/ia32/WriteDr7.s deleted file mode 100644 index a96f445632..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteDr7.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteDr7.Asm -# -# Abstract: -# -# AsmWriteDr7 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteDr7 ( -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteDr7 -_AsmWriteDr7: - movl 4(%esp),%eax - movl %eax, %dr7 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteGdtr.asm b/MdePkg/Library/BaseLib/ia32/WriteGdtr.asm deleted file mode 100644 index a317e75388..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteGdtr.asm +++ /dev/null @@ -1,34 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteGdtr.Asm -; -; Abstract: -; -; AsmWriteGdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686P - .model flat,C - .code - -InternalX86WriteGdtr PROC - mov eax, [esp + 4] - lgdt fword ptr [eax] - ret -InternalX86WriteGdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteGdtr.s b/MdePkg/Library/BaseLib/ia32/WriteGdtr.s deleted file mode 100644 index c3eb63d9e4..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteGdtr.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteGdtr.Asm -# -# Abstract: -# -# AsmWriteGdtr function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteGdtr ( -# OUT IA32_DESCRIPTOR *Gdtr -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteGdtr -_AsmWriteGdtr: - movl 4(%esp),%eax - lgdt (%eax) - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteIdtr.asm b/MdePkg/Library/BaseLib/ia32/WriteIdtr.asm deleted file mode 100644 index d4b3b51a04..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteIdtr.asm +++ /dev/null @@ -1,34 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteIdtr.Asm -; -; Abstract: -; -; AsmWriteIdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686P - .model flat,C - .code - -InternalX86WriteIdtr PROC - mov eax, [esp + 4] - lidt fword ptr [eax] - ret -InternalX86WriteIdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteIdtr.s b/MdePkg/Library/BaseLib/ia32/WriteIdtr.s deleted file mode 100644 index f71b696d97..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteIdtr.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteIdtr.Asm -# -# Abstract: -# -# AsmWriteIdtr function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteIdtr ( -# OUT IA32_DESCRIPTOR *Idtr -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteIdtr -_AsmWriteIdtr: - movl 4(%esp),%eax - lidt (%eax) - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteLdtr.asm b/MdePkg/Library/BaseLib/ia32/WriteLdtr.asm deleted file mode 100644 index 39f8b2ed5e..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteLdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteLdtr.Asm -; -; Abstract: -; -; AsmWriteLdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteLdtr ( -; IN UINT16 Ldtr -; ); -;------------------------------------------------------------------------------ -_AsmWriteLdtr PROC - mov eax, [esp + 4] - lldt ax - ret -_AsmWriteLdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteLdtr.s b/MdePkg/Library/BaseLib/ia32/WriteLdtr.s deleted file mode 100644 index 3797bd547d..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteLdtr.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteLdtr.Asm -# -# Abstract: -# -# AsmWriteLdtr function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteLdtr ( -# IN UINT16 Ldtr -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteLdtr -_AsmWriteLdtr: - movl 4(%esp),%eax - lldtw %ax - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm0.asm b/MdePkg/Library/BaseLib/ia32/WriteMm0.asm deleted file mode 100644 index e924dbdb61..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm0.Asm -; -; Abstract: -; -; AsmWriteMm0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMm0 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteMm0 PROC - movq mm0, [esp + 4] - ret -_AsmWriteMm0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm0.s b/MdePkg/Library/BaseLib/ia32/WriteMm0.s deleted file mode 100644 index c4444219a9..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm0.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm0.Asm -# -# Abstract: -# -# AsmWriteMm0 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmWriteMm0 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteMm0 -_AsmWriteMm0: - movq 4(%esp),%mm0 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm1.asm b/MdePkg/Library/BaseLib/ia32/WriteMm1.asm deleted file mode 100644 index 1f1d8ce8dc..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm1.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm1.Asm -; -; Abstract: -; -; AsmWriteMm1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMm1 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteMm1 PROC - movq mm1, [esp + 4] - ret -_AsmWriteMm1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm1.s b/MdePkg/Library/BaseLib/ia32/WriteMm1.s deleted file mode 100644 index e3a492f9ec..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm1.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm1.Asm -# -# Abstract: -# -# AsmWriteMm1 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmWriteMm1 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteMm1 -_AsmWriteMm1: - movq 4(%esp),%mm1 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm2.asm b/MdePkg/Library/BaseLib/ia32/WriteMm2.asm deleted file mode 100644 index a18417a0d1..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm2.Asm -; -; Abstract: -; -; AsmWriteMm2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMm2 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteMm2 PROC - movq mm2, [esp + 4] - ret -_AsmWriteMm2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm2.s b/MdePkg/Library/BaseLib/ia32/WriteMm2.s deleted file mode 100644 index eaebb37636..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm2.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm2.Asm -# -# Abstract: -# -# AsmWriteMm2 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmWriteMm2 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteMm2 -_AsmWriteMm2: - movq 4(%esp),%mm2 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm3.asm b/MdePkg/Library/BaseLib/ia32/WriteMm3.asm deleted file mode 100644 index 7aad49f77f..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm3.Asm -; -; Abstract: -; -; AsmWriteMm3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMm3 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteMm3 PROC - movq mm3, [esp + 4] - ret -_AsmWriteMm3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm3.s b/MdePkg/Library/BaseLib/ia32/WriteMm3.s deleted file mode 100644 index a514091732..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm3.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm3.Asm -# -# Abstract: -# -# AsmWriteMm3 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmWriteMm3 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteMm3 -_AsmWriteMm3: - movq 4(%esp),%mm3 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm4.asm b/MdePkg/Library/BaseLib/ia32/WriteMm4.asm deleted file mode 100644 index 8be9c4beb8..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm4.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm4.Asm -; -; Abstract: -; -; AsmWriteMm4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMm4 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteMm4 PROC - movq mm4, [esp + 4] - ret -_AsmWriteMm4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm4.s b/MdePkg/Library/BaseLib/ia32/WriteMm4.s deleted file mode 100644 index 6d4a6cdce1..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm4.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm4.Asm -# -# Abstract: -# -# AsmWriteMm4 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmWriteMm4 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteMm4 -_AsmWriteMm4: - movq 4(%esp),%mm4 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm5.asm b/MdePkg/Library/BaseLib/ia32/WriteMm5.asm deleted file mode 100644 index bc501b397c..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm5.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm5.Asm -; -; Abstract: -; -; AsmWriteMm5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMm5 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteMm5 PROC - movq mm5, [esp + 4] - ret -_AsmWriteMm5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm5.s b/MdePkg/Library/BaseLib/ia32/WriteMm5.s deleted file mode 100644 index 15d433271f..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm5.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm5.Asm -# -# Abstract: -# -# AsmWriteMm5 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmWriteMm5 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteMm5 -_AsmWriteMm5: - movq 4(%esp),%mm5 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm6.asm b/MdePkg/Library/BaseLib/ia32/WriteMm6.asm deleted file mode 100644 index 4a6445cb63..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm6.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm6.Asm -; -; Abstract: -; -; AsmWriteMm6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMm6 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteMm6 PROC - movq mm6, [esp + 4] - ret -_AsmWriteMm6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm6.s b/MdePkg/Library/BaseLib/ia32/WriteMm6.s deleted file mode 100644 index 6b1361e7a3..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm6.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm6.Asm -# -# Abstract: -# -# AsmWriteMm6 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmWriteMm6 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteMm6 -_AsmWriteMm6: - movq 4(%esp),%mm6 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm7.asm b/MdePkg/Library/BaseLib/ia32/WriteMm7.asm deleted file mode 100644 index 3bc73fed27..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm7.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm7.Asm -; -; Abstract: -; -; AsmWriteMm7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMm7 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteMm7 PROC - movq mm7, [esp + 4] - ret -_AsmWriteMm7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteMm7.s b/MdePkg/Library/BaseLib/ia32/WriteMm7.s deleted file mode 100644 index d702fbb242..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMm7.s +++ /dev/null @@ -1,42 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm7.Asm -# -# Abstract: -# -# AsmWriteMm7 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmWriteMm7 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteMm7 -_AsmWriteMm7: - movq 4(%esp),%mm7 - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteMsr32.asm b/MdePkg/Library/BaseLib/ia32/WriteMsr32.asm deleted file mode 100644 index ba14514c93..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMsr32.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMsr32.Asm -; -; Abstract: -; -; AsmWriteMsr32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; AsmWriteMsr32 ( -; IN UINT32 Index, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteMsr32 PROC - mov eax, [esp + 8] - xor edx, edx - mov ecx, [esp + 4] - wrmsr - ret -_AsmWriteMsr32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteMsr32.s b/MdePkg/Library/BaseLib/ia32/WriteMsr32.s deleted file mode 100644 index 450b3b7b9f..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMsr32.s +++ /dev/null @@ -1,45 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMsr32.Asm -# -# Abstract: -# -# AsmWriteMsr32 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT32 -# EFIAPI -# AsmWriteMsr32 ( -# IN UINT32 Index, -# IN UINT32 Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteMsr32 -_AsmWriteMsr32: - movl 8(%esp),%eax - xorl %edx,%edx - movl 4(%esp),%ecx - wrmsr - ret - - - diff --git a/MdePkg/Library/BaseLib/ia32/WriteMsr64.asm b/MdePkg/Library/BaseLib/ia32/WriteMsr64.asm deleted file mode 100644 index 5afc074291..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMsr64.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMsr64.Asm -; -; Abstract: -; -; AsmWriteMsr64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMsr64 ( -; IN UINT32 Index, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -_AsmWriteMsr64 PROC - mov edx, [esp + 12] - mov eax, [esp + 8] - mov ecx, [esp + 4] - wrmsr - ret -_AsmWriteMsr64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/ia32/WriteMsr64.s b/MdePkg/Library/BaseLib/ia32/WriteMsr64.s deleted file mode 100644 index 802aad7803..0000000000 --- a/MdePkg/Library/BaseLib/ia32/WriteMsr64.s +++ /dev/null @@ -1,45 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMsr64.Asm -# -# Abstract: -# -# AsmWriteMsr64 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmWriteMsr64 ( -# IN UINT32 Index, -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global _AsmWriteMsr64 -_AsmWriteMsr64: - movl 12(%esp),%edx - movl 8(%esp),%eax - movl 4(%esp),%ecx - wrmsr - ret - - - diff --git a/MdePkg/Library/BaseLib/x64/CpuBreakpoint.asm b/MdePkg/Library/BaseLib/x64/CpuBreakpoint.asm deleted file mode 100644 index f1ebe47b21..0000000000 --- a/MdePkg/Library/BaseLib/x64/CpuBreakpoint.asm +++ /dev/null @@ -1,37 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuBreakpoint ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuBreakpoint PROC - int 3 - ret -CpuBreakpoint ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/CpuFlushTlb.asm b/MdePkg/Library/BaseLib/x64/CpuFlushTlb.asm deleted file mode 100644 index c2c4490e9d..0000000000 --- a/MdePkg/Library/BaseLib/x64/CpuFlushTlb.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuFlushTlb.Asm -; -; Abstract: -; -; CpuFlushTlb function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuFlushTlb ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuFlushTlb PROC - mov rax, cr3 - mov cr3, rax - ret -CpuFlushTlb ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/CpuId.asm b/MdePkg/Library/BaseLib/x64/CpuId.asm deleted file mode 100644 index 867e92a677..0000000000 --- a/MdePkg/Library/BaseLib/x64/CpuId.asm +++ /dev/null @@ -1,62 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .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 rbx - mov eax, ecx - push rdx - push rax ; save Index on stack - cpuid - test r9, r9 - jz @F - mov [r9], ecx -@@: - pop rcx - jrcxz @F - mov [rcx], eax -@@: - mov rcx, r8 - jrcxz @F - mov [rcx], ebx -@@: - mov rcx, [rsp + 30h] - jrcxz @F - mov [rcx], edx -@@: - pop rax ; restore Index to rax as return value - ret -AsmCpuid ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/CpuPause.asm b/MdePkg/Library/BaseLib/x64/CpuPause.asm deleted file mode 100644 index d16da37712..0000000000 --- a/MdePkg/Library/BaseLib/x64/CpuPause.asm +++ /dev/null @@ -1,37 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuPause ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuPause PROC - pause - ret -CpuPause ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/CpuSleep.asm b/MdePkg/Library/BaseLib/x64/CpuSleep.asm deleted file mode 100644 index b2c4907032..0000000000 --- a/MdePkg/Library/BaseLib/x64/CpuSleep.asm +++ /dev/null @@ -1,37 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuSleep ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuSleep PROC - hlt - ret -CpuSleep ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/DisableInterrupts.asm b/MdePkg/Library/BaseLib/x64/DisableInterrupts.asm deleted file mode 100644 index 586832c1a2..0000000000 --- a/MdePkg/Library/BaseLib/x64/DisableInterrupts.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; DisableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -DisableInterrupts PROC - cli - ret -DisableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/DisablePaging64.asm b/MdePkg/Library/BaseLib/x64/DisablePaging64.asm deleted file mode 100644 index 3134e42571..0000000000 --- a/MdePkg/Library/BaseLib/x64/DisablePaging64.asm +++ /dev/null @@ -1,54 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DisablePaging64.Asm -; -; Abstract: -; -; AsmDisablePaging64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -InternalX86DisablePaging64 PROC - cli - shl rcx, 32 - lea ecx, @F - push rcx - mov ebx, edx - mov esi, r8d - mov edi, r9d - mov eax, [rsp + 28h] - retf -@@: - mov esp, eax ; set up new stack - mov rax, cr0 - btr eax, 31 - mov cr0, rax ; disable paging - mov ecx, 0c0000080h - rdmsr - and ah, NOT 1 ; clear LME - wrmsr - mov rax, cr4 - and al, NOT (1 SHL 5) ; clear PAE - mov cr4, rax - push rdi - push rsi - call rbx - jmp $ -InternalX86DisablePaging64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/EnableDisableInterrupts.asm b/MdePkg/Library/BaseLib/x64/EnableDisableInterrupts.asm deleted file mode 100644 index 0d0400f007..0000000000 --- a/MdePkg/Library/BaseLib/x64/EnableDisableInterrupts.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; EnableDisableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -EnableDisableInterrupts PROC - sti - cli - ret -EnableDisableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/EnableInterrupts.asm b/MdePkg/Library/BaseLib/x64/EnableInterrupts.asm deleted file mode 100644 index 8fb4adfe37..0000000000 --- a/MdePkg/Library/BaseLib/x64/EnableInterrupts.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; EnableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -EnableInterrupts PROC - sti - ret -EnableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/FlushCacheLine.asm b/MdePkg/Library/BaseLib/x64/FlushCacheLine.asm deleted file mode 100644 index 1d470e8753..0000000000 --- a/MdePkg/Library/BaseLib/x64/FlushCacheLine.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmFlushCacheLine ( -; IN VOID *LinearAddress -; ); -;------------------------------------------------------------------------------ -AsmFlushCacheLine PROC - clflush [rcx] - ret -AsmFlushCacheLine ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/FxRestore.asm b/MdePkg/Library/BaseLib/x64/FxRestore.asm deleted file mode 100644 index 8acfc2f00f..0000000000 --- a/MdePkg/Library/BaseLib/x64/FxRestore.asm +++ /dev/null @@ -1,31 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -InternalX86FxRestore PROC - fxrstor [rcx] - ret -InternalX86FxRestore ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/FxSave.asm b/MdePkg/Library/BaseLib/x64/FxSave.asm deleted file mode 100644 index cacb1f5283..0000000000 --- a/MdePkg/Library/BaseLib/x64/FxSave.asm +++ /dev/null @@ -1,31 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -InternalX86FxSave PROC - fxsave [rcx] - ret -InternalX86FxSave ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/InterlockedCompareExchange32.asm b/MdePkg/Library/BaseLib/x64/InterlockedCompareExchange32.asm deleted file mode 100644 index 55b055453f..0000000000 --- a/MdePkg/Library/BaseLib/x64/InterlockedCompareExchange32.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InterlockedCompareExchange32 ( -; IN UINT32 *Value, -; IN UINT32 CompareValue, -; IN UINT32 ExchangeValue -; ); -;------------------------------------------------------------------------------ -InternalSyncCompareExchange32 PROC - mov eax, edx - lock cmpxchg [rcx], r8d - ret -InternalSyncCompareExchange32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/InterlockedCompareExchange64.asm b/MdePkg/Library/BaseLib/x64/InterlockedCompareExchange64.asm deleted file mode 100644 index 88c25a56de..0000000000 --- a/MdePkg/Library/BaseLib/x64/InterlockedCompareExchange64.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InterlockedCompareExchange64 ( -; IN UINT64 *Value, -; IN UINT64 CompareValue, -; IN UINT64 ExchangeValue -; ); -;------------------------------------------------------------------------------ -InternalSyncCompareExchange64 PROC - mov rax, rdx - lock cmpxchg [rcx], r8 - ret -InternalSyncCompareExchange64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/InterlockedDecrement.asm b/MdePkg/Library/BaseLib/x64/InterlockedDecrement.asm deleted file mode 100644 index f907fed4a8..0000000000 --- a/MdePkg/Library/BaseLib/x64/InterlockedDecrement.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InterlockedDecrement ( -; IN UINT32 *Value -; ); -;------------------------------------------------------------------------------ -InternalSyncDecrement PROC - lock dec dword ptr [rcx] - mov eax, [rcx] - ret -InternalSyncDecrement ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/InterlockedIncrement.asm b/MdePkg/Library/BaseLib/x64/InterlockedIncrement.asm deleted file mode 100644 index f5a4130bf1..0000000000 --- a/MdePkg/Library/BaseLib/x64/InterlockedIncrement.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InterlockedIncrement ( -; IN UINT32 *Value -; ); -;------------------------------------------------------------------------------ -InternalSyncIncrement PROC - lock inc dword ptr [rcx] - mov eax, [rcx] - ret -InternalSyncIncrement ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/Invd.asm b/MdePkg/Library/BaseLib/x64/Invd.asm deleted file mode 100644 index 446587923b..0000000000 --- a/MdePkg/Library/BaseLib/x64/Invd.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmInvd ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmInvd PROC - invd - ret -AsmInvd ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/LongJump.asm b/MdePkg/Library/BaseLib/x64/LongJump.asm deleted file mode 100644 index 6634778592..0000000000 --- a/MdePkg/Library/BaseLib/x64/LongJump.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; LongJump.Asm -; -; Abstract: -; -; Implementation of LongJump() on x64. -; -;------------------------------------------------------------------------------ - - .code - -LongJump PROC - mov rbx, [rcx] - mov rsp, [rcx + 8] - mov rbp, [rcx + 10h] - mov rdi, [rcx + 18h] - mov rsi, [rcx + 20h] - mov r12, [rcx + 28h] - mov r13, [rcx + 30h] - mov r14, [rcx + 38h] - mov r15, [rcx + 40h] - mov rax, rdx - jmp qword ptr [rcx + 48h] -LongJump ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/Monitor.asm b/MdePkg/Library/BaseLib/x64/Monitor.asm deleted file mode 100644 index 0140494d30..0000000000 --- a/MdePkg/Library/BaseLib/x64/Monitor.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmMonitor ( -; IN UINTN Eax, -; IN UINTN Ecx, -; IN UINTN Edx -; ); -;------------------------------------------------------------------------------ -AsmMonitor PROC - mov eax, ecx - mov ecx, edx - mov edx, r8d - DB 0fh, 1, 0c8h - ret -AsmMonitor ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/Mwait.asm b/MdePkg/Library/BaseLib/x64/Mwait.asm deleted file mode 100644 index 8f76d944f1..0000000000 --- a/MdePkg/Library/BaseLib/x64/Mwait.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmMwait ( -; IN UINTN Eax, -; IN UINTN Ecx -; ); -;------------------------------------------------------------------------------ -AsmMwait PROC - mov eax, ecx - mov ecx, edx - DB 0fh, 1, 0c9h - ret -AsmMwait ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/Non-existing.c b/MdePkg/Library/BaseLib/x64/Non-existing.c deleted file mode 100644 index b2c737857d..0000000000 --- a/MdePkg/Library/BaseLib/x64/Non-existing.c +++ /dev/null @@ -1,54 +0,0 @@ -/** @file - Non-existing BaseLib functions on x64 - - Copyright (c) 2006, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - Module Name: Non-existing.c - -**/ - -#include "../BaseLibInternals.h" - -VOID -EFIAPI -InternalX86EnablePaging32 ( - IN SWITCH_STACK_ENTRY_POINT EntryPoint, - IN VOID *Context1, OPTIONAL - IN VOID *Context2, OPTIONAL - IN VOID *NewStack - ) -{ - ASSERT (FALSE); -} - -VOID -EFIAPI -InternalX86DisablePaging32 ( - IN SWITCH_STACK_ENTRY_POINT EntryPoint, - IN VOID *Context1, OPTIONAL - IN VOID *Context2, OPTIONAL - IN VOID *NewStack - ) -{ - ASSERT (FALSE); -} - -VOID -EFIAPI -InternalX86EnablePaging64 ( - IN UINT16 Cs, - IN UINT64 EntryPoint, - IN UINT64 Context1, OPTIONAL - IN UINT64 Context2, OPTIONAL - IN UINT64 NewStack - ) -{ - ASSERT (FALSE); -} diff --git a/MdePkg/Library/BaseLib/x64/ReadCr0.asm b/MdePkg/Library/BaseLib/x64/ReadCr0.asm deleted file mode 100644 index 3e369c3a81..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadCr0.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr0 PROC - mov rax, cr0 - ret -AsmReadCr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadCr2.asm b/MdePkg/Library/BaseLib/x64/ReadCr2.asm deleted file mode 100644 index 8476f5af18..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadCr2.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr2 PROC - mov rax, cr2 - ret -AsmReadCr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadCr3.asm b/MdePkg/Library/BaseLib/x64/ReadCr3.asm deleted file mode 100644 index af54d46373..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadCr3.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr3 PROC - mov rax, cr3 - ret -AsmReadCr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadCr4.asm b/MdePkg/Library/BaseLib/x64/ReadCr4.asm deleted file mode 100644 index c8a881db9e..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadCr4.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr4 PROC - mov rax, cr4 - ret -AsmReadCr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadCs.asm b/MdePkg/Library/BaseLib/x64/ReadCs.asm deleted file mode 100644 index 126149a47c..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadCs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadCs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCs PROC - mov ax, cs - ret -AsmReadCs ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadDr0.asm b/MdePkg/Library/BaseLib/x64/ReadDr0.asm deleted file mode 100644 index 7e0d6b714a..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadDr0.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr0 PROC - mov rax, dr0 - ret -AsmReadDr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadDr1.asm b/MdePkg/Library/BaseLib/x64/ReadDr1.asm deleted file mode 100644 index 22f11c4e0f..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadDr1.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr1 PROC - mov rax, dr1 - ret -AsmReadDr1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadDr2.asm b/MdePkg/Library/BaseLib/x64/ReadDr2.asm deleted file mode 100644 index 3b81605861..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadDr2.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr2 PROC - mov rax, dr2 - ret -AsmReadDr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadDr3.asm b/MdePkg/Library/BaseLib/x64/ReadDr3.asm deleted file mode 100644 index 1968fd0d67..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadDr3.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr3 PROC - mov rax, dr3 - ret -AsmReadDr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadDr4.asm b/MdePkg/Library/BaseLib/x64/ReadDr4.asm deleted file mode 100644 index 97740016b3..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadDr4.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr4 PROC - DB 0fh, 21h, 0e0h - ret -AsmReadDr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadDr5.asm b/MdePkg/Library/BaseLib/x64/ReadDr5.asm deleted file mode 100644 index 0582502220..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadDr5.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr5 PROC - DB 0fh, 21h, 0e8h - ret -AsmReadDr5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadDr6.asm b/MdePkg/Library/BaseLib/x64/ReadDr6.asm deleted file mode 100644 index a3dafb9b9f..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadDr6.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr6 PROC - mov rax, dr6 - ret -AsmReadDr6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadDr7.asm b/MdePkg/Library/BaseLib/x64/ReadDr7.asm deleted file mode 100644 index 0cff14b5c4..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadDr7.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr7 PROC - mov rax, dr7 - ret -AsmReadDr7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadDs.asm b/MdePkg/Library/BaseLib/x64/ReadDs.asm deleted file mode 100644 index bdcddb65d8..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadDs.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadDs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDs PROC - mov ax, ds - ret -AsmReadDs ENDP - - END - diff --git a/MdePkg/Library/BaseLib/x64/ReadEflags.asm b/MdePkg/Library/BaseLib/x64/ReadEflags.asm deleted file mode 100644 index 174ae95887..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadEflags.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadEflags ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadEflags PROC - pushfq - pop rax - ret -AsmReadEflags ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadEs.asm b/MdePkg/Library/BaseLib/x64/ReadEs.asm deleted file mode 100644 index 40384bcd71..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadEs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadEs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadEs PROC - mov ax, es - ret -AsmReadEs ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadFs.asm b/MdePkg/Library/BaseLib/x64/ReadFs.asm deleted file mode 100644 index b63e474023..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadFs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM 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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadFs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadFs PROC - mov ax, fs - ret -AsmReadFs ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadGdtr.asm b/MdePkg/Library/BaseLib/x64/ReadGdtr.asm deleted file mode 100644 index 2d40599a8b..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadGdtr.asm +++ /dev/null @@ -1,31 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadGdtr.Asm -; -; Abstract: -; -; AsmReadGdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -InternalX86ReadGdtr PROC - sgdt fword ptr [rcx] - ret -InternalX86ReadGdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadGs.asm b/MdePkg/Library/BaseLib/x64/ReadGs.asm deleted file mode 100644 index 02d140e670..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadGs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadGs.Asm -; -; Abstract: -; -; AsmReadGs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadGs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadGs PROC - mov ax, gs - ret -AsmReadGs ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadIdtr.asm b/MdePkg/Library/BaseLib/x64/ReadIdtr.asm deleted file mode 100644 index 260f697178..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadIdtr.asm +++ /dev/null @@ -1,31 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadIdtr.Asm -; -; Abstract: -; -; AsmReadIdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -InternalX86ReadIdtr PROC - sidt fword ptr [rcx] - ret -InternalX86ReadIdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadLdtr.asm b/MdePkg/Library/BaseLib/x64/ReadLdtr.asm deleted file mode 100644 index 3d6a2f8843..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadLdtr.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadLdtr.Asm -; -; Abstract: -; -; AsmReadLdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadLdtr ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadLdtr PROC - sldt eax - ret -AsmReadLdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadMm0.asm b/MdePkg/Library/BaseLib/x64/ReadMm0.asm deleted file mode 100644 index 1239bcacd6..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadMm0.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm0.Asm -; -; Abstract: -; -; AsmReadMm0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm0 PROC - DB 48h, 0fh, 7eh, 0c0h - ret -AsmReadMm0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadMm1.asm b/MdePkg/Library/BaseLib/x64/ReadMm1.asm deleted file mode 100644 index b42bd7f63f..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadMm1.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm1.Asm -; -; Abstract: -; -; AsmReadMm1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm1 PROC - DB 48h, 0fh, 7eh, 0c8h - ret -AsmReadMm1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadMm2.asm b/MdePkg/Library/BaseLib/x64/ReadMm2.asm deleted file mode 100644 index b10782e403..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadMm2.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm2.Asm -; -; Abstract: -; -; AsmReadMm2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm2 PROC - DB 48h, 0fh, 7eh, 0d0h - ret -AsmReadMm2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadMm3.asm b/MdePkg/Library/BaseLib/x64/ReadMm3.asm deleted file mode 100644 index 15a96475bd..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadMm3.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm3.Asm -; -; Abstract: -; -; AsmReadMm3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm3 PROC - DB 48h, 0fh, 7eh, 0d8h - ret -AsmReadMm3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadMm4.asm b/MdePkg/Library/BaseLib/x64/ReadMm4.asm deleted file mode 100644 index 73f528342e..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadMm4.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm4.Asm -; -; Abstract: -; -; AsmReadMm4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm4 PROC - DB 48h, 0fh, 7eh, 0e0h - ret -AsmReadMm4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadMm5.asm b/MdePkg/Library/BaseLib/x64/ReadMm5.asm deleted file mode 100644 index a487889480..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadMm5.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm5.Asm -; -; Abstract: -; -; AsmReadMm5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm5 PROC - DB 48h, 0fh, 7eh, 0e8h - ret -AsmReadMm5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadMm6.asm b/MdePkg/Library/BaseLib/x64/ReadMm6.asm deleted file mode 100644 index 56f81bf7b1..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadMm6.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm6.Asm -; -; Abstract: -; -; AsmReadMm6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm6 PROC - DB 48h, 0fh, 7eh, 0f0h - ret -AsmReadMm6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadMm7.asm b/MdePkg/Library/BaseLib/x64/ReadMm7.asm deleted file mode 100644 index e3ad6bb658..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadMm7.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm7.Asm -; -; Abstract: -; -; AsmReadMm7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadMm7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm7 PROC - DB 48h, 0fh, 7eh, 0f8h - ret -AsmReadMm7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadMsr32.asm b/MdePkg/Library/BaseLib/x64/ReadMsr32.asm deleted file mode 100644 index 271eabbeae..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadMsr32.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMsr32.Asm -; -; Abstract: -; -; AsmReadMsr32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; AsmReadMsr32 ( -; IN UINT32 Index -; ); -;------------------------------------------------------------------------------ -AsmReadMsr32 PROC - rdmsr - ret -AsmReadMsr32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadMsr64.asm b/MdePkg/Library/BaseLib/x64/ReadMsr64.asm deleted file mode 100644 index 4444c18676..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadMsr64.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMsr64.Asm -; -; Abstract: -; -; AsmReadMsr64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMsr64 ( -; IN UINT32 Index -; ); -;------------------------------------------------------------------------------ -AsmReadMsr64 PROC - rdmsr - shl rax, 20h - shrd rax, rdx, 20h - ret -AsmReadMsr64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadPmc.asm b/MdePkg/Library/BaseLib/x64/ReadPmc.asm deleted file mode 100644 index b5004d6f34..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadPmc.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadPmc.Asm -; -; Abstract: -; -; AsmReadPmc function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadPmc ( -; IN UINT32 PmcIndex -; ); -;------------------------------------------------------------------------------ -AsmReadPmc PROC - rdpmc - shl ecx, 1 - jnc @F - shl rax, 20h - shrd rax, rdx, 20h -@@: - ret -AsmReadPmc ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadSs.asm b/MdePkg/Library/BaseLib/x64/ReadSs.asm deleted file mode 100644 index 4aa480d71b..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadSs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadSs.Asm -; -; Abstract: -; -; AsmReadSs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadSs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadSs PROC - mov ax, ss - ret -AsmReadSs ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadTr.asm b/MdePkg/Library/BaseLib/x64/ReadTr.asm deleted file mode 100644 index 7cf8cdfd43..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadTr.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadTr.Asm -; -; Abstract: -; -; AsmReadTr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadTr ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadTr PROC - str eax - ret -AsmReadTr ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/ReadTsc.asm b/MdePkg/Library/BaseLib/x64/ReadTsc.asm deleted file mode 100644 index 25fa2cc5d8..0000000000 --- a/MdePkg/Library/BaseLib/x64/ReadTsc.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadTsc.Asm -; -; Abstract: -; -; AsmReadTsc function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadTsc ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadTsc PROC - rdtsc - shl rax, 20h - shrd rax, rdx, 20h - ret -AsmReadTsc ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/SetJump.asm b/MdePkg/Library/BaseLib/x64/SetJump.asm deleted file mode 100644 index 305e721b8b..0000000000 --- a/MdePkg/Library/BaseLib/x64/SetJump.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetJump.Asm -; -; Abstract: -; -; Implementation of SetJump() on x64. -; -;------------------------------------------------------------------------------ - - .code - -SetJump PROC - pop rdx - mov [rcx], rbx - mov [rcx + 8], rsp - mov [rcx + 10h], rbp - mov [rcx + 18h], rdi - mov [rcx + 20h], rsi - mov [rcx + 28h], r12 - mov [rcx + 30h], r13 - mov [rcx + 38h], r14 - mov [rcx + 40h], r15 - mov [rcx + 48h], rdx - xor rax, rax - jmp rdx -SetJump ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/SwitchStack.asm b/MdePkg/Library/BaseLib/x64/SwitchStack.asm deleted file mode 100644 index 0dfddc011b..0000000000 --- a/MdePkg/Library/BaseLib/x64/SwitchStack.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SwitchStack.Asm -; -; Abstract: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; Routine Description: -; -; Routine for switching stacks with 1 parameter -; -; Arguments: -; -; (rcx) EntryPoint - Entry point with new stack. -; (rdx) Context - Parameter for entry point. -; (r8) Context2 - Parameter2 for entry point. -; (r9) NewStack - Pointer to new stack. -; -; Returns: -; -; None -; -;------------------------------------------------------------------------------ -SwitchStack PROC - mov rax, rcx - mov rcx, rdx - mov rdx, r8 - lea rsp, [r9 - 20h] - call rax -SwitchStack ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/Thunk16.asm b/MdePkg/Library/BaseLib/x64/Thunk16.asm deleted file mode 100644 index f3e80840b3..0000000000 --- a/MdePkg/Library/BaseLib/x64/Thunk16.asm +++ /dev/null @@ -1,189 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Thunk.asm -; -; Abstract: -; -; Real mode thunk -; -;------------------------------------------------------------------------------ - - .data - -NullSegSel DQ 0 -_16CsSegSel LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 9bh - DB 8fh ; 16-bit segment - DB 0 -_16BitDsSel LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 93h - DB 8fh ; 16-bit segment - DB 0 -GdtEnd LABEL QWORD - - .const - -_16Gdtr LABEL FWORD - DW offset GdtEnd - offset NullSegSel - 1 - DQ offset NullSegSel - -_16Idtr FWORD (1 SHL 10) - 1 - - .code - -IA32_REGS STRUC 4t -_EDI DD ? -_ESI DD ? -_EBP DD ? -_ESP DD ? -_EBX DD ? -_EDX DD ? -_ECX DD ? -_EAX DD ? -_DS DW ? -_ES DW ? -_FS DW ? -_GS DW ? -_RFLAGS DQ ? -_EIP DD ? -_CS DW ? -_SS DW ? -IA32_REGS ENDS - -InternalAsmThunk16 PROC USES rbp rbx rsi rdi r12 r13 r14 r15 - mov eax, ds - push rax - mov eax, es - push rax - push fs - push gs - mov rsi, rcx ; rsi <- RegSet - push sizeof (IA32_REGS) - pop rcx - movzx r8, (IA32_REGS ptr [rsi])._SS - xor rdi, rdi - mov edi, (IA32_REGS ptr [rsi])._ESP - sub rdi, rcx ; reserve space on realmode stack - push rdi ; save stack offset - imul rax, r8, 16 - add rdi, rax ; rdi <- linear address of 16-bit stack - rep movsb ; copy RegSet - mov rsi, r8 ; si <- 16-bit stack segment - pop rbx ; rbx <- 16-bit stack offset - mov rdi, rdx ; rdi <- realmode patch - lea eax, @BackToThunk ; rax <- address to back from real mode - push rax ; use in a far return - mov eax, cs - mov [rsp + 4], eax ; save CS - lea eax, @16Return ; thus @Return must < 4GB - stosd ; set ret address offset - xor eax, eax - stosw ; set ret CS base to 0 - mov eax, esp - stosd ; rsp must < 4GB - mov eax, ss - stosd - mov rax, cr0 - mov ecx, eax ; ecx <- CR0 - and ecx, 7ffffffeh ; clear PE, PG bits - stosd - mov rax, cr4 - mov ebp, eax - and ebp, 300h ; clear all but PCE and OSFXSR bits - stosd - sidt fword ptr [rsp + 70h] ; use parameter space to save IDTR - sgdt fword ptr [rdi] - lea edi, _16Idtr - lea eax, @16Start ; rax <- seg:offset of @16Start - push rax - mov dword ptr [rsp + 4], 8 - push 10h - pop rax ; rax <- 10h as dataseg selector - lgdt _16Gdtr - retf -@16Start: ; 16-bit starts here - mov ss, eax ; set SS to be a 16-bit segment - mov cr0, rcx ; disable protected mode - mov cr4, rbp - DB 66h - mov ecx, 0c0000080h - rdmsr - and ah, NOT 1 ; clear LME - wrmsr - mov ss, esi ; set up 16-bit stack - mov sp, bx ; mov esp, ebx actually - lidt fword ptr [edi] - DB 66h, 61h ; popad - DB 1fh ; pop ds - DB 7 ; pop es - pop fs - pop gs - add sp, 8 ; skip _RFLAGS - DB 66h - retf ; transfer control to 16-bit code -@16Return: - DB 66h - push 0 ; high order 32 bits of rflags - pushf ; pushfd actually - push gs - push fs - DB 6 ; push es - DB 1eh ; push ds - DB 66h, 60h ; pushad - DB 67h, 66h, 0c5h, 74h, 24h, 30h ; lds esi, [esp + 12*4] - DB 66h - mov eax, [esi + 12] - mov cr4, rax ; restore CR4 - DB 66h - lgdt fword ptr [esi + 16] - DB 66h - mov ecx, 0c0000080h - rdmsr - or ah, 1 ; set LME - wrmsr - DB 66h - mov eax, [esi + 8] - mov cr0, rax ; restore CR0 - xor ax, ax ; xor eax, eax actually - mov eax, ss - mov dword ptr (IA32_REGS ptr [esp])._SS, eax - shl ax, 4 ; shl eax, 4 actually - add ax, sp ; add eax, esp actually - add sp, sizeof (IA32_REGS) ; add esp, sizeof (IA32_REGS) - DB 66h - mov dword ptr (IA32_REGS ptr [esp - sizeof (IA32_REGS)])._ESP, esp - DB 66h - lss esp, fword ptr [esi] ; restore protected mode stack - DB 66h - retf ; go back to protected mode -@BackToThunk: - lidt fword ptr [rsp + 68h] ; restore protected mode IDTR - shl rax, 32 - shr rax, 32 ; clear high order 32 bits of RAX - pop gs - pop fs - pop rcx - mov es, ecx - pop rcx - mov ds, ecx - ret -InternalAsmThunk16 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/Wbinvd.asm b/MdePkg/Library/BaseLib/x64/Wbinvd.asm deleted file mode 100644 index ca0cb252b3..0000000000 --- a/MdePkg/Library/BaseLib/x64/Wbinvd.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Wbinvd.Asm -; -; Abstract: -; -; AsmWbinvd function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWbinvd ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWbinvd PROC - wbinvd - ret -AsmWbinvd ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteCr0.asm b/MdePkg/Library/BaseLib/x64/WriteCr0.asm deleted file mode 100644 index defc7e7c96..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteCr0.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr0.Asm -; -; Abstract: -; -; AsmWriteCr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteCr0 PROC - mov cr0, rcx - ret -AsmWriteCr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteCr2.asm b/MdePkg/Library/BaseLib/x64/WriteCr2.asm deleted file mode 100644 index ebe6f89d62..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteCr2.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr2.Asm -; -; Abstract: -; -; AsmWriteCr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteCr2 PROC - mov cr2, rcx - ret -AsmWriteCr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteCr3.asm b/MdePkg/Library/BaseLib/x64/WriteCr3.asm deleted file mode 100644 index 5715dea9b7..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteCr3.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr3.Asm -; -; Abstract: -; -; AsmWriteCr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteCr3 PROC - mov cr3, rcx - ret -AsmWriteCr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteCr4.asm b/MdePkg/Library/BaseLib/x64/WriteCr4.asm deleted file mode 100644 index 210744e16f..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteCr4.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr4.Asm -; -; Abstract: -; -; AsmWriteCr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteCr4 PROC - mov cr4, rcx - ret -AsmWriteCr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteDr0.asm b/MdePkg/Library/BaseLib/x64/WriteDr0.asm deleted file mode 100644 index 2515a20404..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteDr0.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr0.Asm -; -; Abstract: -; -; AsmWriteDr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteDr0 PROC - mov dr0, rcx - ret -AsmWriteDr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteDr1.asm b/MdePkg/Library/BaseLib/x64/WriteDr1.asm deleted file mode 100644 index 89f36ac3f9..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteDr1.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr1.Asm -; -; Abstract: -; -; AsmWriteDr1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteDr1 PROC - mov dr1, rcx - ret -AsmWriteDr1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteDr2.asm b/MdePkg/Library/BaseLib/x64/WriteDr2.asm deleted file mode 100644 index 820977c2e4..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteDr2.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr2.Asm -; -; Abstract: -; -; AsmWriteDr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteDr2 PROC - mov dr2, rcx - ret -AsmWriteDr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteDr3.asm b/MdePkg/Library/BaseLib/x64/WriteDr3.asm deleted file mode 100644 index 51c1407277..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteDr3.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr3.Asm -; -; Abstract: -; -; AsmWriteDr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteDr3 PROC - mov dr3, rcx - ret -AsmWriteDr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteDr4.asm b/MdePkg/Library/BaseLib/x64/WriteDr4.asm deleted file mode 100644 index 12b643825b..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteDr4.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr4.Asm -; -; Abstract: -; -; AsmWriteDr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteDr4 PROC - DB 0fh, 23h, 0e1h - ret -AsmWriteDr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteDr5.asm b/MdePkg/Library/BaseLib/x64/WriteDr5.asm deleted file mode 100644 index 6d454d5267..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteDr5.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr5.Asm -; -; Abstract: -; -; AsmWriteDr5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteDr5 PROC - DB 0fh, 23h, 0e9h - ret -AsmWriteDr5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteDr6.asm b/MdePkg/Library/BaseLib/x64/WriteDr6.asm deleted file mode 100644 index b7b9f2509d..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteDr6.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr6.Asm -; -; Abstract: -; -; AsmWriteDr6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteDr6 PROC - mov dr6, rcx - ret -AsmWriteDr6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteDr7.asm b/MdePkg/Library/BaseLib/x64/WriteDr7.asm deleted file mode 100644 index de2237b6e4..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteDr7.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr7.Asm -; -; Abstract: -; -; AsmWriteDr7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteDr7 PROC - mov dr7, rcx - ret -AsmWriteDr7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteGdtr.asm b/MdePkg/Library/BaseLib/x64/WriteGdtr.asm deleted file mode 100644 index 1757e3dea4..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteGdtr.asm +++ /dev/null @@ -1,31 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteGdtr.Asm -; -; Abstract: -; -; AsmWriteGdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -InternalX86WriteGdtr PROC - lgdt fword ptr [rcx] - ret -InternalX86WriteGdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteIdtr.asm b/MdePkg/Library/BaseLib/x64/WriteIdtr.asm deleted file mode 100644 index 09fcb9e457..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteIdtr.asm +++ /dev/null @@ -1,31 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteIdtr.Asm -; -; Abstract: -; -; AsmWriteIdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -InternalX86WriteIdtr PROC - lidt fword ptr [rcx] - ret -InternalX86WriteIdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteLdtr.asm b/MdePkg/Library/BaseLib/x64/WriteLdtr.asm deleted file mode 100644 index d85ae38f29..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteLdtr.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteLdtr.Asm -; -; Abstract: -; -; AsmWriteLdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteLdtr ( -; IN UINT16 Ldtr -; ); -;------------------------------------------------------------------------------ -AsmWriteLdtr PROC - lldt cx - ret -AsmWriteLdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteMm0.asm b/MdePkg/Library/BaseLib/x64/WriteMm0.asm deleted file mode 100644 index bb9a576125..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteMm0.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm0.Asm -; -; Abstract: -; -; AsmWriteMm0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteMm0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteMm0 PROC - DB 48h, 0fh, 6eh, 0c1h - ret -AsmWriteMm0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteMm1.asm b/MdePkg/Library/BaseLib/x64/WriteMm1.asm deleted file mode 100644 index 1bab3bcd8e..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteMm1.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm1.Asm -; -; Abstract: -; -; AsmWriteMm1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteMm1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteMm1 PROC - DB 48h, 0fh, 6eh, 0c9h - ret -AsmWriteMm1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteMm2.asm b/MdePkg/Library/BaseLib/x64/WriteMm2.asm deleted file mode 100644 index 97e8a6a676..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteMm2.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm2.Asm -; -; Abstract: -; -; AsmWriteMm2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteMm2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteMm2 PROC - DB 48h, 0fh, 6eh, 0d1h - ret -AsmWriteMm2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteMm3.asm b/MdePkg/Library/BaseLib/x64/WriteMm3.asm deleted file mode 100644 index d55e19a406..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteMm3.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm3.Asm -; -; Abstract: -; -; AsmWriteMm3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteMm3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteMm3 PROC - DB 48h, 0fh, 6eh, 0d9h - ret -AsmWriteMm3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteMm4.asm b/MdePkg/Library/BaseLib/x64/WriteMm4.asm deleted file mode 100644 index 2a69b93bcc..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteMm4.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm4.Asm -; -; Abstract: -; -; AsmWriteMm4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteMm4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteMm4 PROC - DB 48h, 0fh, 6eh, 0e1h - ret -AsmWriteMm4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteMm5.asm b/MdePkg/Library/BaseLib/x64/WriteMm5.asm deleted file mode 100644 index c4d798bcbd..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteMm5.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm5.Asm -; -; Abstract: -; -; AsmWriteMm5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteMm5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteMm5 PROC - DB 48h, 0fh, 6eh, 0e9h - ret -AsmWriteMm5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteMm6.asm b/MdePkg/Library/BaseLib/x64/WriteMm6.asm deleted file mode 100644 index c0164f66da..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteMm6.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm6.Asm -; -; Abstract: -; -; AsmWriteMm6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteMm6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteMm6 PROC - DB 48h, 0fh, 6eh, 0f1h - ret -AsmWriteMm6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteMm7.asm b/MdePkg/Library/BaseLib/x64/WriteMm7.asm deleted file mode 100644 index 20768e2b78..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteMm7.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm7.Asm -; -; Abstract: -; -; AsmWriteMm7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteMm7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWriteMm7 PROC - DB 48h, 0fh, 6eh, 0f9h - ret -AsmWriteMm7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteMsr32.asm b/MdePkg/Library/BaseLib/x64/WriteMsr32.asm deleted file mode 100644 index 0a74403624..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteMsr32.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMsr32.Asm -; -; Abstract: -; -; AsmWriteMsr32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; AsmWriteMsr32 ( -; IN UINT32 Index, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMsr32 PROC - mov eax, edx - xor edx, edx - wrmsr - ret -AsmWriteMsr32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/x64/WriteMsr64.asm b/MdePkg/Library/BaseLib/x64/WriteMsr64.asm deleted file mode 100644 index 3337f45891..0000000000 --- a/MdePkg/Library/BaseLib/x64/WriteMsr64.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMsr64.Asm -; -; Abstract: -; -; AsmWriteMsr64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMsr64 ( -; IN UINT32 Index, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMsr64 PROC - push rdx - mov eax, edx - shr rdx, 20h - wrmsr - pop rax - ret -AsmWriteMsr64 ENDP - - END -- cgit v1.2.3