]> git.proxmox.com Git - mirror_edk2.git/commitdiff
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/*:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 May 2008 23:37:38 +0000 (23:37 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 May 2008 23:37:38 +0000 (23:37 +0000)
  Merge from edk2/MdePkg/Library/BaseLib to achieve better
  support for additional compilers.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5278 6f19259b-4bc3-4df7-8a09-765794883524

274 files changed:
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/BaseLib.inf
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/ChkStkGcc.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ARShiftU64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ARShiftU64.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuBreakpoint.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuBreakpoint.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuId.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuId.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuPause.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuPause.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuSleep.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuSleep.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisableInterrupts.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisableInterrupts.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisablePaging32.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisablePaging32.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32Remainder.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32Remainder.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x64Remainder.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x64Remainder.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableDisableInterrupts.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableDisableInterrupts.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableInterrupts.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableInterrupts.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging32.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging32.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FlushCacheLine.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FlushCacheLine.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxRestore.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxRestore.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxSave.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxSave.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange32.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedDecrement.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedDecrement.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedIncrement.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedIncrement.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Invd.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Invd.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LRotU64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LRotU64.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ModU64x32.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ModU64x32.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Monitor.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Monitor.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x64.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Mwait.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Mwait.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RRotU64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RRotU64.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr0.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr2.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr3.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr4.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCs.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr0.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr1.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr1.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr2.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr3.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr4.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr5.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr5.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr6.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr6.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr7.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr7.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDs.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEflags.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEflags.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEs.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadFs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadFs.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGdtr.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGs.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadIdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadIdtr.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadLdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadLdtr.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm0.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm1.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm1.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm2.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm3.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm4.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm5.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm5.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm6.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm6.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm7.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm7.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMsr64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMsr64.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadPmc.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadPmc.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadSs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadSs.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTr.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTsc.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTsc.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SetJump.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SetJump.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Wbinvd.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Wbinvd.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr0.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr2.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr3.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr4.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr0.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr1.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr1.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr2.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr3.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr4.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr5.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr5.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr6.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr6.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr7.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr7.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteGdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteGdtr.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteIdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteIdtr.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteLdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteLdtr.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm0.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm1.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm1.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm2.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm3.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm4.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm5.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm5.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm6.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm6.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm7.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm7.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMsr64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMsr64.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/SynchronizationGcc.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S [new file with mode: 0644]

index 42e167a89bbfd05f183e76f5bfe8b2a9ff86b015..ce3ccd6f9f78e13718b6aad9f24b6679f47e0bb7 100644 (file)
 BASE_NAME       = EdkIIGlueBaseLib\r
 COMPONENT_TYPE  = LIBRARY\r
 \r
-[sources.common]\r
-  String.c\r
-  LinkedList.c\r
-  Cpu.c\r
-  CpuDeadLoop.c\r
-  BitField.c\r
-  ARShiftU64.c\r
-  DivS64x64Remainder.c\r
-  DivU64x32.c\r
-  DivU64x32Remainder.c\r
-  DivU64x64Remainder.c\r
-  GetPowerOfTwo32.c\r
-  GetPowerOfTwo64.c\r
-  HighBitSet32.c\r
-  HighBitSet64.c\r
-  LowBitSet32.c\r
-  LowBitSet64.c\r
-  LRotU32.c\r
-  LRotU64.c\r
-  LShiftU64.c\r
-  ModU64x32.c\r
-  MultS64x64.c\r
-  MultU64x32.c\r
-  MultU64x64.c\r
-  RRotU32.c\r
-  RRotU64.c\r
-  RShiftU64.c\r
-  SetJump.c\r
-  LongJump.c\r
-  SwapBytes16.c\r
-  SwapBytes32.c\r
-  SwapBytes64.c\r
-  SwitchStack.c\r
+[Sources.common]\r
   CheckSum.c\r
+  SwitchStack.c\r
+  SwapBytes64.c\r
+  SwapBytes32.c\r
+  SwapBytes16.c\r
+  LongJump.c\r
+  SetJump.c\r
+  RShiftU64.c\r
+  RRotU64.c\r
+  RRotU32.c\r
+  MultU64x64.c\r
+  MultU64x32.c\r
+  MultS64x64.c\r
+  ModU64x32.c\r
+  LShiftU64.c\r
+  LRotU64.c\r
+  LRotU32.c\r
+  LowBitSet64.c\r
+  LowBitSet32.c\r
+  HighBitSet64.c\r
+  HighBitSet32.c\r
+  GetPowerOfTwo64.c\r
+  GetPowerOfTwo32.c\r
+  DivU64x64Remainder.c\r
+  DivU64x32Remainder.c\r
+  DivU64x32.c\r
+  DivS64x64Remainder.c\r
+  ARShiftU64.c\r
+  BitField.c\r
+  CpuDeadLoop.c\r
+  Cpu.c\r
+  LinkedList.c\r
+  String.c\r
+\r
+[Sources.Ia32]\r
+  Ia32/Wbinvd.c | MSFT \r
+  Ia32/WriteMm7.c | MSFT \r
+  Ia32/WriteMm6.c | MSFT \r
+  Ia32/WriteMm5.c | MSFT \r
+  Ia32/WriteMm4.c | MSFT \r
+  Ia32/WriteMm3.c | MSFT \r
+  Ia32/WriteMm2.c | MSFT \r
+  Ia32/WriteMm1.c | MSFT \r
+  Ia32/WriteMm0.c | MSFT \r
+  Ia32/WriteLdtr.c | MSFT \r
+  Ia32/WriteIdtr.c | MSFT \r
+  Ia32/WriteGdtr.c | MSFT \r
+  Ia32/WriteDr7.c | MSFT \r
+  Ia32/WriteDr6.c | MSFT \r
+  Ia32/WriteDr5.c | MSFT \r
+  Ia32/WriteDr4.c | MSFT \r
+  Ia32/WriteDr3.c | MSFT \r
+  Ia32/WriteDr2.c | MSFT \r
+  Ia32/WriteDr1.c | MSFT \r
+  Ia32/WriteDr0.c | MSFT \r
+  Ia32/WriteCr4.c | MSFT \r
+  Ia32/WriteCr3.c | MSFT \r
+  Ia32/WriteCr2.c | MSFT \r
+  Ia32/WriteCr0.c | MSFT \r
+  Ia32/WriteMsr64.c | MSFT \r
+  Ia32/SwapBytes64.c | MSFT \r
+  Ia32/SetJump.c | MSFT \r
+  Ia32/RRotU64.c | MSFT \r
+  Ia32/RShiftU64.c | MSFT \r
+  Ia32/ReadPmc.c | MSFT \r
+  Ia32/ReadTsc.c | MSFT \r
+  Ia32/ReadLdtr.c | MSFT \r
+  Ia32/ReadIdtr.c | MSFT \r
+  Ia32/ReadGdtr.c | MSFT \r
+  Ia32/ReadTr.c | MSFT \r
+  Ia32/ReadSs.c | MSFT \r
+  Ia32/ReadGs.c | MSFT \r
+  Ia32/ReadFs.c | MSFT \r
+  Ia32/ReadEs.c | MSFT \r
+  Ia32/ReadDs.c | MSFT \r
+  Ia32/ReadCs.c | MSFT \r
+  Ia32/ReadMsr64.c | MSFT \r
+  Ia32/ReadMm7.c | MSFT \r
+  Ia32/ReadMm6.c | MSFT \r
+  Ia32/ReadMm5.c | MSFT \r
+  Ia32/ReadMm4.c | MSFT \r
+  Ia32/ReadMm3.c | MSFT \r
+  Ia32/ReadMm2.c | MSFT \r
+  Ia32/ReadMm1.c | MSFT \r
+  Ia32/ReadMm0.c | MSFT \r
+  Ia32/ReadEflags.c | MSFT \r
+  Ia32/ReadDr7.c | MSFT \r
+  Ia32/ReadDr6.c | MSFT \r
+  Ia32/ReadDr5.c | MSFT \r
+  Ia32/ReadDr4.c | MSFT \r
+  Ia32/ReadDr3.c | MSFT \r
+  Ia32/ReadDr2.c | MSFT \r
+  Ia32/ReadDr1.c | MSFT \r
+  Ia32/ReadDr0.c | MSFT \r
+  Ia32/ReadCr4.c | MSFT \r
+  Ia32/ReadCr3.c | MSFT \r
+  Ia32/ReadCr2.c | MSFT \r
+  Ia32/ReadCr0.c | MSFT \r
+  Ia32/Mwait.c | MSFT \r
+  Ia32/Monitor.c | MSFT \r
+  Ia32/ModU64x32.c | MSFT \r
+  Ia32/MultU64x64.c | MSFT \r
+  Ia32/MultU64x32.c | MSFT \r
+  Ia32/LShiftU64.c | MSFT \r
+  Ia32/LRotU64.c | MSFT \r
+  Ia32/LongJump.c | MSFT \r
+  Ia32/Invd.c | MSFT \r
+  Ia32/InterlockedCompareExchange64.c | MSFT \r
+  Ia32/InterlockedCompareExchange32.c | MSFT \r
+  Ia32/InterlockedDecrement.c | MSFT \r
+  Ia32/InterlockedIncrement.c | MSFT \r
+  Ia32/FxRestore.c | MSFT \r
+  Ia32/FxSave.c | MSFT \r
+  Ia32/FlushCacheLine.c | MSFT \r
+  Ia32/EnablePaging32.c | MSFT \r
+  Ia32/EnableInterrupts.c | MSFT \r
+  Ia32/EnableDisableInterrupts.c | MSFT \r
+  Ia32/DivU64x64Remainder.asm | MSFT \r
+  Ia32/DivU64x32Remainder.c | MSFT \r
+  Ia32/DivU64x32.c | MSFT \r
+  Ia32/DisablePaging32.c | MSFT \r
+  Ia32/DisableInterrupts.c | MSFT \r
+  Ia32/CpuPause.c | MSFT \r
+  Ia32/CpuIdEx.c | MSFT \r
+  Ia32/CpuId.c | MSFT \r
+  Ia32/CpuBreakpoint.c | MSFT \r
+  Ia32/ARShiftU64.c | MSFT \r
+  SynchronizationMsc.c  | MSFT\r
+\r
+  Ia32/Wbinvd.asm | INTEL \r
+  Ia32/WriteMm7.asm | INTEL \r
+  Ia32/WriteMm6.asm | INTEL \r
+  Ia32/WriteMm5.asm | INTEL \r
+  Ia32/WriteMm4.asm | INTEL \r
+  Ia32/WriteMm3.asm | INTEL \r
+  Ia32/WriteMm2.asm | INTEL \r
+  Ia32/WriteMm1.asm | INTEL \r
+  Ia32/WriteMm0.asm | INTEL \r
+  Ia32/WriteLdtr.asm | INTEL \r
+  Ia32/WriteIdtr.asm | INTEL \r
+  Ia32/WriteGdtr.asm | INTEL \r
+  Ia32/WriteDr7.asm | INTEL \r
+  Ia32/WriteDr6.asm | INTEL \r
+  Ia32/WriteDr5.asm | INTEL \r
+  Ia32/WriteDr4.asm | INTEL \r
+  Ia32/WriteDr3.asm | INTEL \r
+  Ia32/WriteDr2.asm | INTEL \r
+  Ia32/WriteDr1.asm | INTEL \r
+  Ia32/WriteDr0.asm | INTEL \r
+  Ia32/WriteCr4.asm | INTEL \r
+  Ia32/WriteCr3.asm | INTEL \r
+  Ia32/WriteCr2.asm | INTEL \r
+  Ia32/WriteCr0.asm | INTEL \r
+  Ia32/WriteMsr64.asm | INTEL \r
+  Ia32/SwapBytes64.asm | INTEL \r
+  Ia32/SetJump.asm | INTEL \r
+  Ia32/RRotU64.asm | INTEL \r
+  Ia32/RShiftU64.asm | INTEL \r
+  Ia32/ReadPmc.asm | INTEL \r
+  Ia32/ReadTsc.asm | INTEL \r
+  Ia32/ReadLdtr.asm | INTEL \r
+  Ia32/ReadIdtr.asm | INTEL \r
+  Ia32/ReadGdtr.asm | INTEL \r
+  Ia32/ReadTr.asm | INTEL \r
+  Ia32/ReadSs.asm | INTEL \r
+  Ia32/ReadGs.asm | INTEL \r
+  Ia32/ReadFs.asm | INTEL \r
+  Ia32/ReadEs.asm | INTEL \r
+  Ia32/ReadDs.asm | INTEL \r
+  Ia32/ReadCs.asm | INTEL \r
+  Ia32/ReadMsr64.asm | INTEL \r
+  Ia32/ReadMm7.asm | INTEL \r
+  Ia32/ReadMm6.asm | INTEL \r
+  Ia32/ReadMm5.asm | INTEL \r
+  Ia32/ReadMm4.asm | INTEL \r
+  Ia32/ReadMm3.asm | INTEL \r
+  Ia32/ReadMm2.asm | INTEL \r
+  Ia32/ReadMm1.asm | INTEL \r
+  Ia32/ReadMm0.asm | INTEL \r
+  Ia32/ReadEflags.asm | INTEL \r
+  Ia32/ReadDr7.asm | INTEL \r
+  Ia32/ReadDr6.asm | INTEL \r
+  Ia32/ReadDr5.asm | INTEL \r
+  Ia32/ReadDr4.asm | INTEL \r
+  Ia32/ReadDr3.asm | INTEL \r
+  Ia32/ReadDr2.asm | INTEL \r
+  Ia32/ReadDr1.asm | INTEL \r
+  Ia32/ReadDr0.asm | INTEL \r
+  Ia32/ReadCr4.asm | INTEL \r
+  Ia32/ReadCr3.asm | INTEL \r
+  Ia32/ReadCr2.asm | INTEL \r
+  Ia32/ReadCr0.asm | INTEL \r
+  Ia32/Mwait.asm | INTEL \r
+  Ia32/Monitor.asm | INTEL \r
+  Ia32/ModU64x32.asm | INTEL \r
+  Ia32/MultU64x64.asm | INTEL \r
+  Ia32/MultU64x32.asm | INTEL \r
+  Ia32/LShiftU64.asm | INTEL \r
+  Ia32/LRotU64.asm | INTEL \r
+  Ia32/LongJump.asm | INTEL \r
+  Ia32/Invd.asm | INTEL \r
+  Ia32/InterlockedCompareExchange64.asm | INTEL \r
+  Ia32/InterlockedCompareExchange32.asm | INTEL \r
+  Ia32/InterlockedDecrement.asm | INTEL \r
+  Ia32/InterlockedIncrement.asm | INTEL \r
+  Ia32/FxRestore.asm | INTEL \r
+  Ia32/FxSave.asm | INTEL \r
+  Ia32/FlushCacheLine.asm | INTEL \r
+  Ia32/EnablePaging32.asm | INTEL \r
+  Ia32/EnableInterrupts.asm | INTEL \r
+  Ia32/EnableDisableInterrupts.asm | INTEL \r
+  Ia32/DivU64x64Remainder.asm | INTEL \r
+  Ia32/DivU64x32Remainder.asm | INTEL \r
+  Ia32/DivU64x32.asm | INTEL \r
+  Ia32/DisablePaging32.asm | INTEL \r
+  Ia32/DisableInterrupts.asm | INTEL \r
+  Ia32/CpuPause.asm | INTEL \r
+  Ia32/CpuIdEx.asm | INTEL \r
+  Ia32/CpuId.asm | INTEL \r
+  Ia32/CpuBreakpoint.asm | INTEL \r
+  Ia32/ARShiftU64.asm | INTEL \r
+  Synchronization.c | INTEL\r
 \r
-[sources.ia32]\r
-  SynchronizationMsc.c\r
-  x86DisablePaging32.c\r
-  x86DisablePaging64.c\r
-  x86EnablePaging32.c\r
-  x86EnablePaging64.c\r
-  x86FxRestore.c\r
-  x86FxSave.c\r
-  x86GetInterruptState.c\r
-  x86MemoryFence.c\r
-  x86Msr.c\r
-  x86ReadGdtr.c\r
-  x86ReadIdtr.c\r
-  x86Thunk.c\r
-  x86WriteGdtr.c\r
-  x86WriteIdtr.c\r
-  Unaligned.c\r
-  Ia32/Non-existing.c\r
-  Ia32/InternalSwitchStack.c\r
-  Ia32/DivS64x64Remainder.c\r
-  Ia32/ARShiftU64.c\r
-  Ia32/CpuBreakpoint.c\r
-  Ia32/CpuFlushTlb.c\r
-  Ia32/CpuSleep.c\r
-  Ia32/CpuId.c\r
-  Ia32/CpuIdEx.c\r
-  Ia32/CpuPause.c\r
-  Ia32/DisableInterrupts.c\r
-  Ia32/DisablePaging32.c\r
-  Ia32/DivU64x32.c\r
-  Ia32/DivU64x32Remainder.c\r
-  Ia32/DivU64x64Remainder.c\r
-  Ia32/EnableDisableInterrupts.c\r
-  Ia32/EnableInterrupts.c\r
-  Ia32/EnablePaging32.c\r
-  Ia32/EnablePaging64.asm\r
-  Ia32/FlushCacheLine.c\r
-  Ia32/FxSave.c\r
-  Ia32/FxRestore.c\r
-  Ia32/InterlockedIncrement.c\r
-  Ia32/InterlockedDecrement.c\r
-  Ia32/InterlockedCompareExchange32.c\r
-  Ia32/InterlockedCompareExchange64.c\r
-  Ia32/Invd.c\r
-  Ia32/LongJump.c\r
-  Ia32/LRotU64.c\r
-  Ia32/LShiftU64.c\r
-  Ia32/MultU64x32.c\r
-  Ia32/MultU64x64.c\r
-  Ia32/ModU64x32.c\r
-  Ia32/Monitor.c\r
-  Ia32/Mwait.c\r
-  Ia32/ReadCr0.c\r
-  Ia32/ReadCr2.c\r
-  Ia32/ReadCr3.c\r
-  Ia32/ReadCr4.c\r
-  Ia32/ReadDr0.c\r
-  Ia32/ReadDr1.c\r
-  Ia32/ReadDr2.c\r
-  Ia32/ReadDr3.c\r
-  Ia32/ReadDr4.c\r
-  Ia32/ReadDr5.c\r
-  Ia32/ReadDr6.c\r
-  Ia32/ReadDr7.c\r
-  Ia32/ReadEflags.c\r
-  Ia32/ReadMm0.c\r
-  Ia32/ReadMm1.c\r
-  Ia32/ReadMm2.c\r
-  Ia32/ReadMm3.c\r
-  Ia32/ReadMm4.c\r
-  Ia32/ReadMm5.c\r
-  Ia32/ReadMm6.c\r
-  Ia32/ReadMm7.c\r
-  Ia32/ReadMsr64.c\r
-  Ia32/ReadCs.c\r
-  Ia32/ReadDs.c\r
-  Ia32/ReadEs.c\r
-  Ia32/ReadFs.c\r
-  Ia32/ReadGs.c\r
-  Ia32/ReadSs.c\r
-  Ia32/ReadTr.c\r
-  Ia32/ReadGdtr.c\r
-  Ia32/ReadIdtr.c\r
-  Ia32/ReadLdtr.c\r
-  Ia32/ReadTsc.c\r
-  Ia32/ReadPmc.c\r
-  Ia32/RShiftU64.c\r
-  Ia32/RRotU64.c\r
-  Ia32/SetJump.c\r
-  Ia32/SwapBytes64.c\r
   Ia32/Thunk16.asm\r
-  Ia32/WriteMsr64.c\r
-  Ia32/WriteCr0.c\r
-  Ia32/WriteCr2.c\r
-  Ia32/WriteCr3.c\r
-  Ia32/WriteCr4.c\r
-  Ia32/WriteDr0.c\r
-  Ia32/WriteDr1.c\r
-  Ia32/WriteDr2.c\r
-  Ia32/WriteDr3.c\r
-  Ia32/WriteDr4.c\r
-  Ia32/WriteDr5.c\r
-  Ia32/WriteDr6.c\r
-  Ia32/WriteDr7.c\r
-  Ia32/WriteGdtr.c\r
-  Ia32/WriteIdtr.c\r
-  Ia32/WriteLdtr.c\r
-  Ia32/WriteMm0.c\r
-  Ia32/WriteMm1.c\r
-  Ia32/WriteMm2.c\r
-  Ia32/WriteMm3.c\r
-  Ia32/WriteMm4.c\r
-  Ia32/WriteMm5.c\r
-  Ia32/WriteMm6.c\r
-  Ia32/WriteMm7.c\r
-  Ia32/Wbinvd.c\r
+  Ia32/EnablePaging64.asm\r
 \r
-  \r
-[sources.x64]\r
-  SynchronizationMsc.c\r
-  x86DisablePaging32.c\r
-  x86DisablePaging64.c\r
-  x86EnablePaging32.c\r
-  x86EnablePaging64.c\r
-  x86FxRestore.c\r
-  x86FxSave.c\r
-  x86GetInterruptState.c\r
-  x86MemoryFence.c\r
-  x86Msr.c\r
-  x86ReadGdtr.c\r
-  x86ReadIdtr.c\r
-  x86Thunk.c\r
-  x86WriteGdtr.c\r
-  x86WriteIdtr.c\r
+  Ia32/Thunk16.S | GCC \r
+  Ia32/CpuBreakpoint.S | GCC \r
+  Ia32/CpuPause.S | GCC \r
+  Ia32/EnableDisableInterrupts.S | GCC \r
+  Ia32/DisableInterrupts.S | GCC \r
+  Ia32/EnableInterrupts.S | GCC \r
+  Ia32/InterlockedCompareExchange64.S | GCC \r
+  Ia32/InterlockedCompareExchange32.S | GCC \r
+  Ia32/InterlockedDecrement.S | GCC \r
+  Ia32/InterlockedIncrement.S | GCC \r
+  Ia32/FlushCacheLine.S | GCC \r
+  Ia32/Invd.S | GCC \r
+  Ia32/Wbinvd.S | GCC \r
+  Ia32/EnablePaging64.S | GCC \r
+  Ia32/DisablePaging32.S | GCC \r
+  Ia32/EnablePaging32.S | GCC \r
+  Ia32/Mwait.S | GCC \r
+  Ia32/Monitor.S | GCC \r
+  Ia32/ReadPmc.S | GCC \r
+  Ia32/ReadTsc.S | GCC \r
+  Ia32/WriteMm7.S | GCC \r
+  Ia32/WriteMm6.S | GCC \r
+  Ia32/WriteMm5.S | GCC \r
+  Ia32/WriteMm4.S | GCC \r
+  Ia32/WriteMm3.S | GCC \r
+  Ia32/WriteMm2.S | GCC \r
+  Ia32/WriteMm1.S | GCC \r
+  Ia32/WriteMm0.S | GCC \r
+  Ia32/ReadMm7.S | GCC \r
+  Ia32/ReadMm6.S | GCC \r
+  Ia32/ReadMm5.S | GCC \r
+  Ia32/ReadMm4.S | GCC \r
+  Ia32/ReadMm3.S | GCC \r
+  Ia32/ReadMm2.S | GCC \r
+  Ia32/ReadMm1.S | GCC \r
+  Ia32/ReadMm0.S | GCC \r
+  Ia32/FxRestore.S | GCC \r
+  Ia32/FxSave.S | GCC \r
+  Ia32/WriteLdtr.S | GCC \r
+  Ia32/ReadLdtr.S | GCC \r
+  Ia32/WriteIdtr.S | GCC \r
+  Ia32/ReadIdtr.S | GCC \r
+  Ia32/WriteGdtr.S | GCC \r
+  Ia32/ReadGdtr.S | GCC \r
+  Ia32/ReadTr.S | GCC \r
+  Ia32/ReadSs.S | GCC \r
+  Ia32/ReadGs.S | GCC \r
+  Ia32/ReadFs.S | GCC \r
+  Ia32/ReadEs.S | GCC \r
+  Ia32/ReadDs.S | GCC \r
+  Ia32/ReadCs.S | GCC \r
+  Ia32/WriteDr7.S | GCC \r
+  Ia32/WriteDr6.S | GCC \r
+  Ia32/WriteDr5.S | GCC \r
+  Ia32/WriteDr4.S | GCC \r
+  Ia32/WriteDr3.S | GCC \r
+  Ia32/WriteDr2.S | GCC \r
+  Ia32/WriteDr1.S | GCC \r
+  Ia32/WriteDr0.S | GCC \r
+  Ia32/ReadDr7.S | GCC \r
+  Ia32/ReadDr6.S | GCC \r
+  Ia32/ReadDr5.S | GCC \r
+  Ia32/ReadDr4.S | GCC \r
+  Ia32/ReadDr3.S | GCC \r
+  Ia32/ReadDr2.S | GCC \r
+  Ia32/ReadDr1.S | GCC \r
+  Ia32/ReadDr0.S | GCC \r
+  Ia32/WriteCr4.S | GCC \r
+  Ia32/WriteCr3.S | GCC \r
+  Ia32/WriteCr2.S | GCC \r
+  Ia32/WriteCr0.S | GCC \r
+  Ia32/ReadCr4.S | GCC \r
+  Ia32/ReadCr3.S | GCC \r
+  Ia32/ReadCr2.S | GCC \r
+  Ia32/ReadCr0.S | GCC \r
+  Ia32/WriteMsr64.S | GCC \r
+  Ia32/ReadMsr64.S | GCC \r
+  Ia32/ReadEflags.S | GCC \r
+  Ia32/CpuIdEx.S | GCC \r
+  Ia32/CpuId.S | GCC \r
+  Ia32/LongJump.S | GCC \r
+  Ia32/SetJump.S | GCC \r
+  Ia32/SwapBytes64.S | GCC \r
+  Ia32/DivU64x64Remainder.S | GCC \r
+  Ia32/DivU64x32Remainder.S | GCC \r
+  Ia32/ModU64x32.S | GCC \r
+  Ia32/DivU64x32.S | GCC \r
+  Ia32/MultU64x64.S | GCC \r
+  Ia32/MultU64x32.S | GCC \r
+  Ia32/RRotU64.S | GCC \r
+  Ia32/LRotU64.S | GCC \r
+  Ia32/ARShiftU64.S | GCC \r
+  Ia32/RShiftU64.S | GCC \r
+  Ia32/LShiftU64.S | GCC \r
+  SynchronizationGcc.c  | GCC\r
+\r
+  Ia32/DivS64x64Remainder.c\r
+  Ia32/InternalSwitchStack.c\r
+  Ia32/Non-existing.c\r
   Unaligned.c\r
-  Math64.c\r
-  X64/Non-existing.c\r
-  X64/SwitchStack.asm\r
-  X64/SetJump.asm\r
-  X64/LongJump.asm\r
-  X64/CpuId.asm\r
-  X64/CpuIdEx.asm\r
-  X64/ReadEflags.asm\r
-  X64/ReadMsr64.c\r
-  X64/WriteMsr64.c\r
-  X64/ReadCr0.asm\r
-  X64/ReadCr2.asm\r
-  X64/ReadCr3.asm\r
-  X64/ReadCr4.asm\r
-  X64/WriteCr0.asm\r
-  X64/WriteCr2.asm\r
-  X64/WriteCr3.asm\r
-  X64/WriteCr4.asm\r
-  X64/ReadDr0.asm\r
-  X64/ReadDr1.asm\r
-  X64/ReadDr2.asm\r
-  X64/ReadDr3.asm\r
-  X64/ReadDr4.asm\r
-  X64/ReadDr5.asm\r
-  X64/ReadDr6.asm\r
-  X64/ReadDr7.asm\r
-  X64/WriteDr0.asm\r
-  X64/WriteDr1.asm\r
-  X64/WriteDr2.asm\r
-  X64/WriteDr3.asm\r
-  X64/WriteDr4.asm\r
-  X64/WriteDr5.asm\r
-  X64/WriteDr6.asm\r
-  X64/WriteDr7.asm\r
-  X64/ReadCs.asm\r
-  X64/ReadDs.asm\r
-  X64/ReadEs.asm\r
-  X64/ReadFs.asm\r
-  X64/ReadGs.asm\r
-  X64/ReadSs.asm\r
-  X64/ReadTr.asm\r
-  X64/ReadGdtr.asm\r
-  X64/WriteGdtr.asm\r
-  X64/ReadIdtr.asm\r
-  X64/WriteIdtr.asm\r
-  X64/ReadLdtr.asm\r
-  X64/WriteLdtr.asm\r
-  X64/FxSave.asm\r
-  X64/FxRestore.asm\r
-  X64/ReadMm0.asm\r
-  X64/ReadMm1.asm\r
-  X64/ReadMm2.asm\r
-  X64/ReadMm3.asm\r
-  X64/ReadMm4.asm\r
-  X64/ReadMm5.asm\r
-  X64/ReadMm6.asm\r
-  X64/ReadMm7.asm\r
-  X64/WriteMm0.asm\r
-  X64/WriteMm1.asm\r
-  X64/WriteMm2.asm\r
-  X64/WriteMm3.asm\r
-  X64/WriteMm4.asm\r
-  X64/WriteMm5.asm\r
-  X64/WriteMm6.asm\r
-  X64/WriteMm7.asm\r
-  X64/ReadTsc.asm\r
-  X64/ReadPmc.asm\r
-  X64/Monitor.asm\r
-  X64/Mwait.asm\r
-  X64/EnablePaging64.asm\r
-  X64/DisablePaging64.asm\r
-  X64/Wbinvd.asm\r
-  X64/Invd.asm\r
-  X64/FlushCacheLine.asm\r
-  X64/InterlockedIncrement.c\r
-  X64/InterlockedDecrement.c\r
-  X64/InterlockedCompareExchange32.asm\r
-  X64/InterlockedCompareExchange64.asm\r
-  X64/EnableInterrupts.asm\r
-  X64/DisableInterrupts.asm\r
-  X64/EnableDisableInterrupts.asm\r
-  X64/CpuSleep.asm\r
+  x86WriteIdtr.c\r
+  x86WriteGdtr.c\r
+  x86Thunk.c\r
+  x86ReadIdtr.c\r
+  x86ReadGdtr.c\r
+  x86Msr.c\r
+  x86MemoryFence.c\r
+  x86GetInterruptState.c\r
+  x86FxSave.c\r
+  x86FxRestore.c\r
+  x86EnablePaging64.c\r
+  x86EnablePaging32.c\r
+  x86DisablePaging64.c\r
+  x86DisablePaging32.c\r
+\r
+[Sources.X64]\r
+  X64/Thunk16.asm\r
   X64/CpuPause.asm\r
-  X64/CpuBreakpoint.c\r
-  X64/CpuFlushTlb.asm\r
-  X64/Thunk16.asm  \r
+  X64/EnableDisableInterrupts.asm\r
+  X64/DisableInterrupts.asm\r
+  X64/EnableInterrupts.asm\r
+  X64/FlushCacheLine.asm\r
+  X64/Invd.asm\r
+  X64/Wbinvd.asm\r
+  X64/DisablePaging64.asm\r
+  X64/EnablePaging64.asm\r
+  X64/Mwait.asm\r
+  X64/Monitor.asm\r
+  X64/ReadPmc.asm\r
+  X64/ReadTsc.asm\r
+  X64/WriteMm7.asm\r
+  X64/WriteMm6.asm\r
+  X64/WriteMm5.asm\r
+  X64/WriteMm4.asm\r
+  X64/WriteMm3.asm\r
+  X64/WriteMm2.asm\r
+  X64/WriteMm1.asm\r
+  X64/WriteMm0.asm\r
+  X64/ReadMm7.asm\r
+  X64/ReadMm6.asm\r
+  X64/ReadMm5.asm\r
+  X64/ReadMm4.asm\r
+  X64/ReadMm3.asm\r
+  X64/ReadMm2.asm\r
+  X64/ReadMm1.asm\r
+  X64/ReadMm0.asm\r
+  X64/FxRestore.asm\r
+  X64/FxSave.asm\r
+  X64/WriteLdtr.asm\r
+  X64/ReadLdtr.asm\r
+  X64/WriteIdtr.asm\r
+  X64/ReadIdtr.asm\r
+  X64/WriteGdtr.asm\r
+  X64/ReadGdtr.asm\r
+  X64/ReadTr.asm\r
+  X64/ReadSs.asm\r
+  X64/ReadGs.asm\r
+  X64/ReadFs.asm\r
+  X64/ReadEs.asm\r
+  X64/ReadDs.asm\r
+  X64/ReadCs.asm\r
+  X64/WriteDr7.asm\r
+  X64/WriteDr6.asm\r
+  X64/WriteDr5.asm\r
+  X64/WriteDr4.asm\r
+  X64/WriteDr3.asm\r
+  X64/WriteDr2.asm\r
+  X64/WriteDr1.asm\r
+  X64/WriteDr0.asm\r
+  X64/ReadDr7.asm\r
+  X64/ReadDr6.asm\r
+  X64/ReadDr5.asm\r
+  X64/ReadDr4.asm\r
+  X64/ReadDr3.asm\r
+  X64/ReadDr2.asm\r
+  X64/ReadDr1.asm\r
+  X64/ReadDr0.asm\r
+  X64/WriteCr4.asm\r
+  X64/WriteCr3.asm\r
+  X64/WriteCr2.asm\r
+  X64/WriteCr0.asm\r
+  X64/ReadCr4.asm\r
+  X64/ReadCr3.asm\r
+  X64/ReadCr2.asm\r
+  X64/ReadCr0.asm\r
+  X64/ReadEflags.asm\r
+  X64/CpuIdEx.asm\r
+  X64/CpuId.asm\r
+  X64/LongJump.asm\r
+  X64/SetJump.asm\r
+  X64/SwitchStack.asm\r
+  X64/InterlockedCompareExchange64.asm \r
+  X64/InterlockedCompareExchange32.asm \r
+\r
+  X64/InterlockedDecrement.c | MSFT \r
+  X64/InterlockedIncrement.c | MSFT \r
+  X64/CpuBreakpoint.c | MSFT \r
+  X64/WriteMsr64.c | MSFT \r
+  X64/ReadMsr64.c | MSFT \r
+  SynchronizationMsc.c | MSFT \r
+\r
+  X64/InterlockedDecrement.asm | INTEL \r
+  X64/InterlockedIncrement.asm | INTEL \r
+  X64/CpuBreakpoint.asm | INTEL \r
+  X64/WriteMsr64.asm | INTEL \r
+  X64/ReadMsr64.asm | INTEL \r
+  Synchronization.c | INTEL \r
+\r
+  X64/Non-existing.c\r
+  Math64.c\r
+  Unaligned.c\r
+  x86WriteIdtr.c\r
+  x86WriteGdtr.c\r
+  x86Thunk.c\r
+  x86ReadIdtr.c\r
+  x86ReadGdtr.c\r
+  x86Msr.c\r
+  x86MemoryFence.c\r
+  x86GetInterruptState.c\r
+  x86FxSave.c\r
+  x86FxRestore.c\r
+  x86EnablePaging64.c\r
+  x86EnablePaging32.c\r
+  x86DisablePaging64.c\r
+  x86DisablePaging32.c\r
+  X64/WriteMsr64.S | GCC \r
+  X64/WriteMm7.S | GCC \r
+  X64/WriteMm6.S | GCC \r
+  X64/WriteMm5.S | GCC \r
+  X64/WriteMm4.S | GCC \r
+  X64/WriteMm3.S | GCC \r
+  X64/WriteMm2.S | GCC \r
+  X64/WriteMm1.S | GCC \r
+  X64/WriteMm0.S | GCC \r
+  X64/WriteLdtr.S | GCC \r
+  X64/WriteIdtr.S | GCC \r
+  X64/WriteGdtr.S | GCC \r
+  X64/WriteDr7.S | GCC \r
+  X64/WriteDr6.S | GCC \r
+  X64/WriteDr5.S | GCC \r
+  X64/WriteDr4.S | GCC \r
+  X64/WriteDr3.S | GCC \r
+  X64/WriteDr2.S | GCC \r
+  X64/WriteDr1.S | GCC \r
+  X64/WriteDr0.S | GCC \r
+  X64/WriteCr4.S | GCC \r
+  X64/WriteCr3.S | GCC \r
+  X64/WriteCr2.S | GCC \r
+  X64/WriteCr0.S | GCC \r
+  X64/Wbinvd.S | GCC \r
+  X64/Thunk16.S | GCC \r
+  X64/SwitchStack.S | GCC \r
+  X64/SetJump.S | GCC \r
+  X64/ReadTsc.S | GCC \r
+  X64/ReadTr.S | GCC \r
+  X64/ReadSs.S | GCC \r
+  X64/ReadPmc.S | GCC \r
+  X64/ReadMsr64.S | GCC \r
+  X64/ReadMm7.S | GCC \r
+  X64/ReadMm6.S | GCC \r
+  X64/ReadMm5.S | GCC \r
+  X64/ReadMm4.S | GCC \r
+  X64/ReadMm3.S | GCC \r
+  X64/ReadMm2.S | GCC \r
+  X64/ReadMm1.S | GCC \r
+  X64/ReadMm0.S | GCC \r
+  X64/ReadLdtr.S | GCC \r
+  X64/ReadIdtr.S | GCC \r
+  X64/ReadGs.S | GCC \r
+  X64/ReadGdtr.S | GCC \r
+  X64/ReadFs.S | GCC \r
+  X64/ReadEs.S | GCC \r
+  X64/ReadEflags.S | GCC \r
+  X64/ReadDs.S | GCC \r
+  X64/ReadDr7.S | GCC \r
+  X64/ReadDr6.S | GCC \r
+  X64/ReadDr5.S | GCC \r
+  X64/ReadDr4.S | GCC \r
+  X64/ReadDr3.S | GCC \r
+  X64/ReadDr2.S | GCC \r
+  X64/ReadDr1.S | GCC \r
+  X64/ReadDr0.S | GCC \r
+  X64/ReadCs.S | GCC \r
+  X64/ReadCr4.S | GCC \r
+  X64/ReadCr3.S | GCC \r
+  X64/ReadCr2.S | GCC \r
+  X64/ReadCr0.S | GCC \r
+  X64/Mwait.S | GCC \r
+  X64/Monitor.S | GCC \r
+  X64/LongJump.S | GCC \r
+  X64/Invd.S | GCC \r
+  X64/InterlockedIncrement.S | GCC \r
+  X64/InterlockedDecrement.S | GCC \r
+  X64/InterlockedCompareExchange64.S | GCC \r
+  X64/InterlockedCompareExchange32.S | GCC \r
+  X64/FxSave.S | GCC \r
+  X64/FxRestore.S | GCC \r
+  X64/FlushCacheLine.S | GCC \r
+  X64/EnablePaging64.S | GCC \r
+  X64/EnableInterrupts.S | GCC \r
+  X64/EnableDisableInterrupts.S | GCC \r
+  X64/DisablePaging64.S | GCC \r
+  X64/DisableInterrupts.S | GCC \r
+  X64/CpuPause.S | GCC \r
+  X64/CpuId.S | GCC \r
+  X64/CpuIdEx.S | GCC \r
+  X64/CpuBreakpoint.S | GCC \r
+  SynchronizationGcc.c  | GCC \r
+  ChkStkGcc.c  | GCC \r
 \r
-[sources.ipf]\r
+[Sources.IPF]\r
   SynchronizationMsc.c\r
   Math64.c\r
   Ipf/asm.h\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/ChkStkGcc.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/ChkStkGcc.c
new file mode 100644 (file)
index 0000000..f6ae9b0
--- /dev/null
@@ -0,0 +1,24 @@
+/** @file\r
+  Implementation of synchronization functions.\r
+\r
+  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+//\r
+// Include common header file for this module.\r
+//\r
+\r
+\r
+#include "BaseLibInternals.h"\r
+\r
+VOID __chkstk() {\r
+}\r
+\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ARShiftU64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ARShiftU64.S
new file mode 100644 (file)
index 0000000..5498d2e
--- /dev/null
@@ -0,0 +1,41 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ARShiftU64.asm\r
+#\r
+# Abstract:\r
+#\r
+#   64-bit arithmetic right shift function for IA-32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalMathARShiftU64)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# InternalMathARShiftU64 (\r
+#   IN      UINT64                    Operand,\r
+#   IN      UINTN                     Count\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalMathARShiftU64):\r
+    movb    12(%esp), %cl\r
+    movl    8(%esp), %eax\r
+    cltd\r
+    testb   $32, %cl\r
+    cmovz   %eax, %edx\r
+    cmovz   4(%esp), %eax\r
+    shrdl   %cl, %edx, %eax\r
+    sar     %cl, %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ARShiftU64.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ARShiftU64.asm
new file mode 100644 (file)
index 0000000..17f07bb
--- /dev/null
@@ -0,0 +1,46 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ARShiftU64.asm\r
+;\r
+; Abstract:\r
+;\r
+;   64-bit arithmetic right shift function for IA-32\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathARShiftU64 (\r
+;   IN      UINT64                    Operand,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathARShiftU64  PROC\r
+    mov     cl, [esp + 12]\r
+    mov     eax, [esp + 8]\r
+    cdq\r
+    test    cl, 32\r
+    cmovz   edx, eax\r
+    cmovz   eax, [esp + 4]\r
+    shrd    eax, edx, cl\r
+    sar     edx, cl\r
+    ret\r
+InternalMathARShiftU64  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuBreakpoint.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuBreakpoint.S
new file mode 100644 (file)
index 0000000..e82434b
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   CpuBreakpoint.s\r
+#\r
+# Abstract:\r
+#\r
+#   CpuBreakpoint function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(CpuBreakpoint)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuBreakpoint (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(CpuBreakpoint):\r
+    int  $3\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuBreakpoint.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuBreakpoint.asm
new file mode 100644 (file)
index 0000000..a4d3978
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   CpuBreakpoint.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   CpuBreakpoint function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat\r
+    .xmm\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuBreakpoint (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+_CpuBreakpoint   PROC\r
+    int  3\r
+    ret\r
+_CpuBreakpoint   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuId.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuId.S
new file mode 100644 (file)
index 0000000..6f41e72
--- /dev/null
@@ -0,0 +1,63 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   CpuId.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmCpuid function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl  ASM_PFX(AsmCpuid)\r
+\r
+#------------------------------------------------------------------------------\r
+#  VOID\r
+#  EFIAPI\r
+#  AsmCpuid (\r
+#    IN   UINT32  RegisterInEax,\r
+#    OUT  UINT32  *RegisterOutEax  OPTIONAL,\r
+#    OUT  UINT32  *RegisterOutEbx  OPTIONAL,\r
+#    OUT  UINT32  *RegisterOutEcx  OPTIONAL,\r
+#    OUT  UINT32  *RegisterOutEdx  OPTIONAL\r
+#    )\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmCpuid):\r
+    push    %ebx\r
+    push    %ebp\r
+    movl    %esp, %ebp\r
+    movl    12(%ebp), %eax\r
+    cpuid\r
+    push    %ecx\r
+    movl    16(%ebp), %ecx\r
+    jecxz   L1\r
+    movl    %eax, (%ecx)\r
+L1:\r
+    movl    20(%ebp), %ecx\r
+    jecxz   L2\r
+    movl    %ebx, (%ecx)\r
+L2:\r
+    movl    24(%ebp), %ecx\r
+    jecxz   L3\r
+    popl    (%ecx)\r
+L3:\r
+    movl    28(%ebp), %ecx\r
+    jecxz   L4\r
+    movl    %edx, (%ecx)\r
+L4:\r
+    movl    12(%ebp), %eax\r
+    leave\r
+    pop     %ebx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuId.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuId.asm
new file mode 100644 (file)
index 0000000..5c0eb1f
--- /dev/null
@@ -0,0 +1,66 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   CpuId.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmCpuid function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586P\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EFIAPI\r
+;  AsmCpuid (\r
+;    IN   UINT32  RegisterInEax,\r
+;    OUT  UINT32  *RegisterOutEax  OPTIONAL,\r
+;    OUT  UINT32  *RegisterOutEbx  OPTIONAL,\r
+;    OUT  UINT32  *RegisterOutEcx  OPTIONAL,\r
+;    OUT  UINT32  *RegisterOutEdx  OPTIONAL\r
+;    );\r
+;------------------------------------------------------------------------------\r
+AsmCpuid    PROC    USES    ebx\r
+    push    ebp\r
+    mov     ebp, esp\r
+    mov     eax, [ebp + 12]\r
+    cpuid\r
+    push    ecx\r
+    mov     ecx, [ebp + 16]\r
+    jecxz   @F\r
+    mov     [ecx], eax\r
+@@:\r
+    mov     ecx, [ebp + 20]\r
+    jecxz   @F\r
+    mov     [ecx], ebx\r
+@@:\r
+    mov     ecx, [ebp + 24]\r
+    jecxz   @F\r
+    pop     [ecx]\r
+@@:\r
+    mov     ecx, [ebp + 28]\r
+    jecxz   @F\r
+    mov     [ecx], edx\r
+@@:\r
+    mov     eax, [ebp + 12]\r
+    leave\r
+    ret\r
+AsmCpuid    ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.S
new file mode 100644 (file)
index 0000000..48554cc
--- /dev/null
@@ -0,0 +1,67 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   CpuIdEx.Asm
+#
+# Abstract:
+#
+#   AsmCpuidEx function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+    .686:
+    .code:
+
+#------------------------------------------------------------------------------
+#  UINT32
+#  EFIAPI
+#  AsmCpuidEx (
+#    IN   UINT32  RegisterInEax,
+#    IN   UINT32  RegisterInEcx,
+#    OUT  UINT32  *RegisterOutEax  OPTIONAL,
+#    OUT  UINT32  *RegisterOutEbx  OPTIONAL,
+#    OUT  UINT32  *RegisterOutEcx  OPTIONAL,
+#    OUT  UINT32  *RegisterOutEdx  OPTIONAL
+#    )
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmCpuidEx)
+ASM_PFX(AsmCpuidEx):
+    push    %ebx
+    push    %ebp
+    movl    %esp, %ebp
+    movl    12(%ebp), %eax
+    movl    16(%ebp), %ecx
+    cpuid
+    push    %ecx
+    movl    20(%ebp), %ecx
+    jecxz   L1
+    movl    %eax, (%ecx)
+L1:
+    movl    24(%ebp), %ecx
+    jecxz   L2
+    movl    %ebx, (%ecx)
+L2:
+    movl    28(%ebp), %ecx
+    jecxz   L3
+    popl    (%ecx)
+L3:
+    movl    32(%ebp), %edx
+    jecxz   L4
+    movl    %edx, (%ecx)
+L4:
+    movl    12(%ebp), %eax
+    leave
+    pop     %ebx
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.asm
new file mode 100644 (file)
index 0000000..cdebec2
--- /dev/null
@@ -0,0 +1,68 @@
+;------------------------------------------------------------------------------
+;
+; Copyright (c) 2006, Intel Corporation
+; All rights reserved. This program and the accompanying materials
+; are licensed and made available under the terms and conditions of the BSD License
+; which accompanies this distribution.  The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php
+;
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+; Module Name:
+;
+;   CpuIdEx.Asm\r
+;
+; Abstract:
+;
+;   AsmCpuidEx function\r
+;
+; Notes:
+;
+;------------------------------------------------------------------------------
+
+    .686\r
+    .model  flat,C\r
+    .code
+
+;------------------------------------------------------------------------------
+;  UINT32
+;  EFIAPI
+;  AsmCpuidEx (\r
+;    IN   UINT32  RegisterInEax,
+;    IN   UINT32  RegisterInEcx,
+;    OUT  UINT32  *RegisterOutEax  OPTIONAL,
+;    OUT  UINT32  *RegisterOutEbx  OPTIONAL,
+;    OUT  UINT32  *RegisterOutEcx  OPTIONAL,
+;    OUT  UINT32  *RegisterOutEdx  OPTIONAL
+;    )
+;------------------------------------------------------------------------------
+AsmCpuidEx  PROC    USES    ebx\r
+    push    ebp\r
+    mov     ebp, esp\r
+    mov     eax, [ebp + 12]\r
+    mov     ecx, [ebp + 16]\r
+    cpuid\r
+    push    ecx\r
+    mov     ecx, [ebp + 20]\r
+    jecxz   @F\r
+    mov     [ecx], eax\r
+@@:\r
+    mov     ecx, [ebp + 24]\r
+    jecxz   @F\r
+    mov     [ecx], ebx\r
+@@:\r
+    mov     ecx, [ebp + 28]\r
+    jecxz   @F\r
+    pop     [ecx]\r
+@@:\r
+    mov     edx, [ebp + 32]\r
+    jecxz   @F\r
+    mov     [ecx], edx\r
+@@:\r
+    mov     eax, [ebp + 12]\r
+    leave\r
+    ret\r
+AsmCpuidEx  ENDP\r
+
+    END
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuPause.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuPause.S
new file mode 100644 (file)
index 0000000..5fef9c8
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   CpuPause.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   CpuPause function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(CpuPause)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuPause (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(CpuPause):\r
+    pause\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuPause.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuPause.asm
new file mode 100644 (file)
index 0000000..4c7135f
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   CpuPause.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   CpuPause function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .xmm\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuPause (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+CpuPause    PROC\r
+    pause\r
+    ret\r
+CpuPause    ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuSleep.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuSleep.S
new file mode 100644 (file)
index 0000000..ac39e8f
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   CpuSleep.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   CpuSleep function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(CpuSleep)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuSleep (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(CpuSleep):\r
+    hlt\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuSleep.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuSleep.asm
new file mode 100644 (file)
index 0000000..8a779f7
--- /dev/null
@@ -0,0 +1,39 @@
+;------------------------------------------------------------------------------ ;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   CpuSleep.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   CpuSleep function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; CpuSleep (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+CpuSleep    PROC\r
+    hlt\r
+    ret\r
+CpuSleep    ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisableInterrupts.S
new file mode 100644 (file)
index 0000000..ea04225
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   DisableInterrupts.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   DisableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(DisableInterrupts)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# DisableInterrupts (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(DisableInterrupts):\r
+    cli\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisableInterrupts.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisableInterrupts.asm
new file mode 100644 (file)
index 0000000..35209ff
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   DisableInterrupts.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   DisableInterrupts function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; DisableInterrupts (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+DisableInterrupts   PROC\r
+    cli\r
+    ret\r
+DisableInterrupts   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisablePaging32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisablePaging32.S
new file mode 100644 (file)
index 0000000..7898e81
--- /dev/null
@@ -0,0 +1,52 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   DisablePaging32.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalX86DisablePaging32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalX86DisablePaging32)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86DisablePaging32 (\r
+#   IN      SWITCH_STACK_ENTRY_POINT  EntryPoint,\r
+#   IN      VOID                      *Context1,    OPTIONAL\r
+#   IN      VOID                      *Context2,    OPTIONAL\r
+#   IN      VOID                      *NewStack\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalX86DisablePaging32):\r
+    movl    4(%esp), %ebx\r
+    movl    8(%esp), %ecx\r
+    movl    12(%esp), %edx\r
+    pushfl\r
+    pop     %edi\r
+    cli\r
+    movl    %cr0, %eax\r
+    btrl    $31, %eax\r
+    movl    16(%esp), %esp\r
+    movl    %eax, %cr0\r
+    push    %edi\r
+    popfl\r
+    push    %edx\r
+    push    %ecx\r
+    call    *%ebx\r
+    jmp     .\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisablePaging32.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisablePaging32.asm
new file mode 100644 (file)
index 0000000..d294977
--- /dev/null
@@ -0,0 +1,57 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   DisablePaging32.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmDisablePaging32 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86DisablePaging32 (\r
+;   IN      SWITCH_STACK_ENTRY_POINT  EntryPoint,\r
+;   IN      VOID                      *Context1,    OPTIONAL\r
+;   IN      VOID                      *Context2,    OPTIONAL\r
+;   IN      VOID                      *NewStack\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalX86DisablePaging32    PROC\r
+    mov     ebx, [esp + 4]\r
+    mov     ecx, [esp + 8]\r
+    mov     edx, [esp + 12]\r
+    pushfd\r
+    pop     edi                         ; save EFLAGS to edi\r
+    cli\r
+    mov     eax, cr0\r
+    btr     eax, 31\r
+    mov     esp, [esp + 16]\r
+    mov     cr0, eax\r
+    push    edi\r
+    popfd                               ; restore EFLAGS from edi\r
+    push    edx\r
+    push    ecx\r
+    call    ebx\r
+    jmp     $                           ; EntryPoint() should not return\r
+InternalX86DisablePaging32    ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.S
new file mode 100644 (file)
index 0000000..b858278
--- /dev/null
@@ -0,0 +1,41 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   DivU64x32.asm
+#
+# Abstract:
+#
+#   Calculate the quotient of a 64-bit integer by a 32-bit integer
+#
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(InternalMathDivU64x32)
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InternalMathDivU64x32 (
+#   IN      UINT64                    Dividend,
+#   IN      UINT32                    Divisor
+#   );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMathDivU64x32):
+    movl    8(%esp), %eax
+    movl    12(%esp), %ecx
+    xorl    %edx, %edx
+    divl    %ecx
+    push    %eax
+    movl    8(%esp), %eax
+    divl    %ecx
+    pop     %edx
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.asm
new file mode 100644 (file)
index 0000000..25ca074
--- /dev/null
@@ -0,0 +1,46 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   DivU64x32.asm\r
+;\r
+; Abstract:\r
+;\r
+;   Calculate the quotient of a 64-bit integer by a 32-bit integer\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathDivU64x32 (\r
+;   IN      UINT64                    Dividend,\r
+;   IN      UINT32                    Divisor\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathDivU64x32   PROC\r
+    mov     eax, [esp + 8]\r
+    mov     ecx, [esp + 12]\r
+    xor     edx, edx\r
+    div     ecx\r
+    push    eax                     ; save quotient on stack\r
+    mov     eax, [esp + 8]\r
+    div     ecx\r
+    pop     edx                     ; restore high-order dword of the quotient\r
+    ret\r
+InternalMathDivU64x32   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32Remainder.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32Remainder.S
new file mode 100644 (file)
index 0000000..974373d
--- /dev/null
@@ -0,0 +1,46 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   DivError.asm\r
+#\r
+# Abstract:\r
+#\r
+#   Set error flag for all division functions\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalMathDivRemU64x32)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# InternalMathDivRemU64x32 (\r
+#   IN      UINT64                    Dividend,\r
+#   IN      UINT32                    Divisor,\r
+#   OUT     UINT32                    *Remainder\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalMathDivRemU64x32):\r
+    movl    12(%esp), %ecx\r
+    movl    8(%esp), %eax\r
+    xorl    %edx, %edx\r
+    divl    %ecx\r
+    push    %eax\r
+    movl    8(%esp), %eax\r
+    divl    %ecx\r
+    movl    20(%esp), %ecx\r
+    jecxz   L1\r
+    movl    %edx, (%ecx)\r
+L1:\r
+    pop     %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32Remainder.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32Remainder.asm
new file mode 100644 (file)
index 0000000..e025b22
--- /dev/null
@@ -0,0 +1,51 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   DivError.asm\r
+;\r
+; Abstract:\r
+;\r
+;   Set error flag for all division functions\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathDivRemU64x32 (\r
+;   IN      UINT64                    Dividend,\r
+;   IN      UINT32                    Divisor,\r
+;   OUT     UINT32                    *Remainder\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathDivRemU64x32    PROC\r
+    mov     ecx, [esp + 12]         ; ecx <- divisor\r
+    mov     eax, [esp + 8]          ; eax <- dividend[32..63]\r
+    xor     edx, edx\r
+    div     ecx                     ; eax <- quotient[32..63], edx <- remainder\r
+    push    eax\r
+    mov     eax, [esp + 8]          ; eax <- dividend[0..31]\r
+    div     ecx                     ; eax <- quotient[0..31]\r
+    mov     ecx, [esp + 20]         ; ecx <- Remainder\r
+    jecxz   @F                      ; abandon remainder if Remainder == NULL\r
+    mov     [ecx], edx\r
+@@:\r
+    pop     edx                     ; edx <- quotient[32..63]\r
+    ret\r
+InternalMathDivRemU64x32    ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x64Remainder.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x64Remainder.S
new file mode 100644 (file)
index 0000000..cac7169
--- /dev/null
@@ -0,0 +1,89 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   DivU64x64Remainder.asm\r
+#\r
+# Abstract:\r
+#\r
+#   Calculate the quotient of a 64-bit integer by a 64-bit integer and returns\r
+#   both the quotient and the remainder\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalMathDivRemU64x32), ASM_PFX(InternalMathDivRemU64x64)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# InternalMathDivRemU64x64 (\r
+#   IN      UINT64                    Dividend,\r
+#   IN      UINT64                    Divisor,\r
+#   OUT     UINT64                    *Remainder    OPTIONAL\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalMathDivRemU64x64):\r
+    movl    16(%esp), %ecx\r
+    testl   %ecx, %ecx\r
+    jnz     Hard\r
+    movl    20(%esp), %ecx\r
+    jecxz   L1\r
+    and     $0, 4(%ecx)\r
+    movl    %ecx, 16(%esp)\r
+L1:\r
+    jmp     ASM_PFX(InternalMathDivRemU64x32)\r
+Hard:\r
+    push    %ebx\r
+    push    %esi\r
+    push    %edi\r
+    mov     20(%esp), %edx\r
+    mov     16(%esp), %eax\r
+    movl    %edx, %edi\r
+    movl    %eax, %esi\r
+    mov     24(%esp), %ebx\r
+L2:\r
+    shrl    %edx\r
+    rcrl    $1, %eax\r
+    shrdl   $1, %ecx, %ebx\r
+    shrl    %ecx\r
+    jnz     L2\r
+    divl    %ebx\r
+    movl    %eax, %ebx\r
+    movl    28(%esp), %ecx\r
+    mull    24(%esp)\r
+    imull   %ebx, %ecx\r
+    addl    %ecx, %edx\r
+    mov     32(%esp), %ecx\r
+    jc      TooLarge\r
+    cmpl    %edx, %edi\r
+    ja      Correct\r
+    jb      TooLarge\r
+    cmpl    %eax, %esi\r
+    jae     Correct\r
+TooLarge:\r
+    decl    %ebx\r
+    jecxz   Return\r
+    sub     24(%esp), %eax\r
+    sbb     28(%esp), %edx\r
+Correct:\r
+    jecxz   Return\r
+    subl    %eax, %esi\r
+    sbbl    %edx, %edi\r
+    movl    %esi, (%ecx)\r
+    movl    %edi, 4(%ecx)\r
+Return:\r
+    movl    %ebx, %eax\r
+    xorl    %edx, %edx\r
+    pop     %edi\r
+    pop     %esi\r
+    pop     %ebx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x64Remainder.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x64Remainder.asm
new file mode 100644 (file)
index 0000000..95e57ef
--- /dev/null
@@ -0,0 +1,92 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   DivU64x64Remainder.asm\r
+;\r
+; Abstract:\r
+;\r
+;   Calculate the quotient of a 64-bit integer by a 64-bit integer and returns\r
+;   both the quotient and the remainder\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+EXTERN  InternalMathDivRemU64x32:PROC\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathDivRemU64x64 (\r
+;   IN      UINT64                    Dividend,\r
+;   IN      UINT64                    Divisor,\r
+;   OUT     UINT64                    *Remainder    OPTIONAL\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathDivRemU64x64    PROC\r
+    mov     ecx, [esp + 16]             ; ecx <- divisor[32..63]\r
+    test    ecx, ecx\r
+    jnz     _@DivRemU64x64              ; call _@DivRemU64x64 if Divisor > 2^32\r
+    mov     ecx, [esp + 20]\r
+    jecxz   @F\r
+    and     dword ptr [ecx + 4], 0      ; zero high dword of remainder\r
+    mov     [esp + 16], ecx             ; set up stack frame to match DivRemU64x32\r
+@@:\r
+    jmp     InternalMathDivRemU64x32\r
+InternalMathDivRemU64x64    ENDP\r
+\r
+_@DivRemU64x64  PROC    USES    ebx esi edi\r
+    mov     edx, dword ptr [esp + 20]\r
+    mov     eax, dword ptr [esp + 16]   ; edx:eax <- dividend\r
+    mov     edi, edx\r
+    mov     esi, eax                    ; edi:esi <- dividend\r
+    mov     ebx, dword ptr [esp + 24]   ; ecx:ebx <- divisor\r
+@@:\r
+    shr     edx, 1\r
+    rcr     eax, 1\r
+    shrd    ebx, ecx, 1\r
+    shr     ecx, 1\r
+    jnz     @B\r
+    div     ebx\r
+    mov     ebx, eax                    ; ebx <- quotient\r
+    mov     ecx, [esp + 28]             ; ecx <- high dword of divisor\r
+    mul     dword ptr [esp + 24]        ; edx:eax <- quotient * divisor[0..31]\r
+    imul    ecx, ebx                    ; ecx <- quotient * divisor[32..63]\r
+    add     edx, ecx                    ; edx <- (quotient * divisor)[32..63]\r
+    mov     ecx, dword ptr [esp + 32]   ; ecx <- addr for Remainder\r
+    jc      @TooLarge                   ; product > 2^64\r
+    cmp     edi, edx                    ; compare high 32 bits\r
+    ja      @Correct\r
+    jb      @TooLarge                   ; product > dividend\r
+    cmp     esi, eax\r
+    jae     @Correct                    ; product <= dividend\r
+@TooLarge:\r
+    dec     ebx                         ; adjust quotient by -1\r
+    jecxz   @Return                     ; return if Remainder == NULL\r
+    sub     eax, dword ptr [esp + 24]\r
+    sbb     edx, dword ptr [esp + 28]   ; edx:eax <- (quotient - 1) * divisor\r
+@Correct:\r
+    jecxz   @Return\r
+    sub     esi, eax\r
+    sbb     edi, edx                    ; edi:esi <- remainder\r
+    mov     [ecx], esi\r
+    mov     [ecx + 4], edi\r
+@Return:\r
+    mov     eax, ebx                    ; eax <- quotient\r
+    xor     edx, edx                    ; quotient is 32 bits long\r
+    ret\r
+_@DivRemU64x64  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableDisableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableDisableInterrupts.S
new file mode 100644 (file)
index 0000000..c5742ae
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   EnableDisableInterrupts.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   EnableDisableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(EnableDisableInterrupts)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# EnableDisableInterrupts (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(EnableDisableInterrupts):\r
+    sti\r
+    cli\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableDisableInterrupts.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableDisableInterrupts.asm
new file mode 100644 (file)
index 0000000..fe2016d
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EnableDisableInterrupts.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   EnableDisableInterrupts function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; EnableDisableInterrupts (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+_EnableDisableInterrupts    PROC\r
+    sti\r
+    cli\r
+    ret\r
+_EnableDisableInterrupts    ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableInterrupts.S
new file mode 100644 (file)
index 0000000..2d60803
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   EnableInterrupts.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   EnableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(EnableInterrupts)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# EnableInterrupts (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(EnableInterrupts):\r
+    sti\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableInterrupts.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableInterrupts.asm
new file mode 100644 (file)
index 0000000..194dd8f
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EnableInterrupts.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   EnableInterrupts function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; EnableInterrupts (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+_EnableInterrupts   PROC\r
+    sti\r
+    ret\r
+_EnableInterrupts   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging32.S
new file mode 100644 (file)
index 0000000..df5d67c
--- /dev/null
@@ -0,0 +1,52 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   EnablePaging32.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalX86EnablePaging32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalX86EnablePaging32)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86EnablePaging32 (\r
+#   IN      SWITCH_STACK_ENTRY_POINT  EntryPoint,\r
+#   IN      VOID                      *Context1,    OPTIONAL\r
+#   IN      VOID                      *Context2,    OPTIONAL\r
+#   IN      VOID                      *NewStack\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalX86EnablePaging32):\r
+    movl    4(%esp), %ebx\r
+    movl    8(%esp), %ecx\r
+    movl    12(%esp), %edx\r
+    pushfl\r
+    pop     %edi\r
+    cli\r
+    movl    %cr0, %eax\r
+    btsl    $31, %eax\r
+    movl    16(%esp), %esp\r
+    movl    %eax, %cr0\r
+    push    %edi\r
+    popfl\r
+    push    %edx\r
+    push    %ecx\r
+    call    *%ebx\r
+    jmp     .\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging32.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging32.asm
new file mode 100644 (file)
index 0000000..ae98b93
--- /dev/null
@@ -0,0 +1,57 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EnablePaging32.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmEnablePaging32 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86EnablePaging32 (\r
+;   IN      SWITCH_STACK_ENTRY_POINT  EntryPoint,\r
+;   IN      VOID                      *Context1,    OPTIONAL\r
+;   IN      VOID                      *Context2,    OPTIONAL\r
+;   IN      VOID                      *NewStack\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalX86EnablePaging32 PROC\r
+    mov     ebx, [esp + 4]\r
+    mov     ecx, [esp + 8]\r
+    mov     edx, [esp + 12]\r
+    pushfd\r
+    pop     edi                         ; save flags in edi\r
+    cli\r
+    mov     eax, cr0\r
+    bts     eax, 31\r
+    mov     esp, [esp + 16]\r
+    mov     cr0, eax\r
+    push    edi\r
+    popfd                               ; restore flags\r
+    push    edx\r
+    push    ecx\r
+    call    ebx\r
+    jmp     $\r
+InternalX86EnablePaging32 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging64.S
new file mode 100644 (file)
index 0000000..ffa9beb
--- /dev/null
@@ -0,0 +1,63 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   EnablePaging64.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalX86EnablePaging64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalX86EnablePaging64)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86EnablePaging64 (\r
+#   IN      UINT16                    CodeSelector,\r
+#   IN      UINT64                    EntryPoint,\r
+#   IN      UINT64                    Context1,    OPTIONAL\r
+#   IN      UINT64                    Context2,    OPTIONAL\r
+#   IN      UINT64                    NewStack\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalX86EnablePaging64):\r
+    cli\r
+    movl    $LongStart, (%esp)\r
+    movl    %cr4, %eax\r
+    orb     $0x20, %al\r
+    movl    %eax, %cr4                  # enable PAE\r
+    movl    $0xc0000080, %ecx\r
+    rdmsr\r
+    orb     $1, %ah                     # set LME\r
+    wrmsr\r
+    movl    %cr0, %eax\r
+    btsl    $31, %eax\r
+    movl    %eax, %cr0                  # enable paging\r
+    lret\r
+LongStart:                              # long mode starts here\r
+    .byte   0x67, 0x48\r
+    movl    (%esp), %ebx                # mov rbx, [esp]\r
+    .byte   0x67, 0x48\r
+    movl    8(%esp), %ecx               # mov rcx, [esp + 8]\r
+    .byte   0x67, 0x48\r
+    movl    0x10(%esp), %edx            # mov rdx, [esp + 10h]\r
+    .byte   0x67, 0x48\r
+    movl    0x18(%esp), %esp            # mov rsp, [esp + 18h]\r
+    .byte   0x48\r
+    addl    $0x-20, %esp                # add rsp, -20h\r
+    call    *%ebx                       # call rbx\r
+    jmp     .\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FlushCacheLine.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FlushCacheLine.S
new file mode 100644 (file)
index 0000000..07a9261
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   FlushCacheLine.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmFlushCacheLine function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmFlushCacheLine)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmFlushCacheLine (\r
+#   IN      VOID                      *LinearAddress\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmFlushCacheLine):\r
+    movl    4(%esp), %eax\r
+    clflush (%eax)\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FlushCacheLine.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FlushCacheLine.asm
new file mode 100644 (file)
index 0000000..f4ad87d
--- /dev/null
@@ -0,0 +1,42 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   FlushCacheLine.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmFlushCacheLine function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586P\r
+    .model  flat,C\r
+    .xmm\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID *\r
+; EFIAPI\r
+; AsmFlushCacheLine (\r
+;   IN      VOID                      *LinearAddress\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmFlushCacheLine   PROC\r
+    mov     eax, [esp + 4]\r
+    clflush [eax]\r
+    ret\r
+AsmFlushCacheLine   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxRestore.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxRestore.S
new file mode 100644 (file)
index 0000000..9cfa14b
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   FxRestore.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalX86FxRestore function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalX86FxRestore)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86FxRestore (\r
+#   IN CONST IA32_FX_BUFFER *Buffer\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalX86FxRestore):\r
+    movl    4(%esp), %eax\r
+    fxrstor (%eax)\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxRestore.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxRestore.asm
new file mode 100644 (file)
index 0000000..5def311
--- /dev/null
@@ -0,0 +1,42 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   FxRestore.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmFxRestore function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .xmm\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86FxRestore (\r
+;   IN CONST IA32_FX_BUFFER *Buffer\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalX86FxRestore  PROC\r
+    mov     eax, [esp + 4]              ; Buffer must be 16-byte aligned\r
+    fxrstor [eax]\r
+    ret\r
+InternalX86FxRestore  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxSave.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxSave.S
new file mode 100644 (file)
index 0000000..8857a8e
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   FxSave.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalX86FxSave function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalX86FxSave)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86FxSave (\r
+#   OUT IA32_FX_BUFFER *Buffer\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalX86FxSave):\r
+    movl    4(%esp), %eax\r
+    fxsave  (%eax)\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxSave.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxSave.asm
new file mode 100644 (file)
index 0000000..d3a9f9c
--- /dev/null
@@ -0,0 +1,42 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   FxSave.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmFxSave function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .xmm\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86FxSave (\r
+;   OUT IA32_FX_BUFFER *Buffer\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalX86FxSave PROC\r
+    mov     eax, [esp + 4]              ; Buffer must be 16-byte aligned\r
+    fxsave  [eax]\r
+    ret\r
+InternalX86FxSave ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange32.S
new file mode 100644 (file)
index 0000000..a0a6ad9
--- /dev/null
@@ -0,0 +1,41 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   InterlockedCompareExchange32.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalSyncCompareExchange32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalSyncCompareExchange32)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InternalSyncCompareExchange32 (\r
+#   IN      UINT32                    *Value,\r
+#   IN      UINT32                    CompareValue,\r
+#   IN      UINT32                    ExchangeValue\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalSyncCompareExchange32):\r
+    movl    4(%esp), %ecx\r
+    movl    8(%esp), %eax\r
+    movl    12(%esp), %edx\r
+    lock\r
+    cmpxchgl    %edx, (%ecx)\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm
new file mode 100644 (file)
index 0000000..47d959f
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   InterlockedCompareExchange32.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   InterlockedCompareExchange32 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .486\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; InternalSyncCompareExchange32 (\r
+;   IN      UINT32                    *Value,\r
+;   IN      UINT32                    CompareValue,\r
+;   IN      UINT32                    ExchangeValue\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalSyncCompareExchange32   PROC\r
+    mov     ecx, [esp + 4]\r
+    mov     eax, [esp + 8]\r
+    mov     edx, [esp + 12]\r
+    lock    cmpxchg [ecx], edx\r
+    ret\r
+InternalSyncCompareExchange32   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange64.S
new file mode 100644 (file)
index 0000000..98a20a5
--- /dev/null
@@ -0,0 +1,47 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   InterlockedCompareExchange64.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalSyncCompareExchange64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalSyncCompareExchange64)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# InternalSyncCompareExchange64 (\r
+#   IN      UINT64                    *Value,\r
+#   IN      UINT64                    CompareValue,\r
+#   IN      UINT64                    ExchangeValue\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalSyncCompareExchange64):\r
+    push    %esi\r
+    push    %ebx\r
+    movl    12(%esp), %esi\r
+    movl    16(%esp), %eax\r
+    movl    20(%esp), %edx\r
+    movl    24(%esp), %ebx\r
+    movl    28(%esp), %ecx\r
+    lock\r
+    cmpxchg8b   (%esi)\r
+    pop     %ebx\r
+    pop     %esi\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm
new file mode 100644 (file)
index 0000000..18311e7
--- /dev/null
@@ -0,0 +1,47 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   InterlockedCompareExchange64.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   InterlockedCompareExchange64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586P\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalSyncCompareExchange64 (\r
+;   IN      UINT64                    *Value,\r
+;   IN      UINT64                    CompareValue,\r
+;   IN      UINT64                    ExchangeValue\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalSyncCompareExchange64   PROC    USES    esi ebx\r
+    mov     esi, [esp + 12]\r
+    mov     eax, [esp + 16]\r
+    mov     edx, [esp + 20]\r
+    mov     ebx, [esp + 24]\r
+    mov     ecx, [esp + 28]\r
+    lock    cmpxchg8b   qword ptr [esi]\r
+    ret\r
+InternalSyncCompareExchange64   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedDecrement.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedDecrement.S
new file mode 100644 (file)
index 0000000..dc8f721
--- /dev/null
@@ -0,0 +1,38 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   InterlockedDecrement.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalSyncDecrement function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalSyncDecrement)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InternalSyncDecrement (\r
+#   IN      UINT32                    *Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalSyncDecrement):\r
+    movl    4(%esp), %eax\r
+    lock\r
+    decl    (%eax)\r
+    movl    (%eax), %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedDecrement.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedDecrement.asm
new file mode 100644 (file)
index 0000000..082429e
--- /dev/null
@@ -0,0 +1,42 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   InterlockedDecrement.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   InterlockedDecrement function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; InternalSyncDecrement (\r
+;   IN      UINT32                    *Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalSyncDecrement   PROC\r
+    mov     eax, [esp + 4]\r
+    lock    dec     dword ptr [eax]\r
+    mov     eax, [eax]\r
+    ret\r
+InternalSyncDecrement   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedIncrement.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedIncrement.S
new file mode 100644 (file)
index 0000000..ecbbc75
--- /dev/null
@@ -0,0 +1,38 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   InterlockedIncrement.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalSyncIncrement function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalSyncIncrement)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InternalSyncIncrement (\r
+#   IN      UINT32                    *Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalSyncIncrement):\r
+    movl    4(%esp), %eax\r
+    lock\r
+    incl    (%eax)\r
+    movl    (%eax), %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedIncrement.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedIncrement.asm
new file mode 100644 (file)
index 0000000..ea27e66
--- /dev/null
@@ -0,0 +1,42 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   InterlockedIncrement.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   InterlockedIncrement function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; InternalSyncIncrement (\r
+;   IN      UINT32                    *Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalSyncIncrement   PROC\r
+    mov     eax, [esp + 4]\r
+    lock    inc     dword ptr [eax]\r
+    mov     eax, [eax]\r
+    ret\r
+InternalSyncIncrement   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Invd.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Invd.S
new file mode 100644 (file)
index 0000000..0a0c1a2
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   Invd.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmInvd function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmInvd)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmInvd (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmInvd):\r
+    invd\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Invd.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Invd.asm
new file mode 100644 (file)
index 0000000..5767f54
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   Invd.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmInvd function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .486p\r
+    .model  flat\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmInvd (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+_AsmInvd    PROC\r
+    invd\r
+    ret\r
+_AsmInvd    ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LRotU64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LRotU64.S
new file mode 100644 (file)
index 0000000..3b866e2
--- /dev/null
@@ -0,0 +1,46 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   LRotU64.asm\r
+#\r
+# Abstract:\r
+#\r
+#   64-bit left rotation for Ia32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalMathLRotU64)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# InternalMathLRotU64 (\r
+#   IN      UINT64                    Operand,\r
+#   IN      UINTN                     Count\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalMathLRotU64):\r
+    push    %ebx\r
+    movb    16(%esp), %cl\r
+    movl    12(%esp), %edx\r
+    movl    8(%esp), %eax\r
+    shldl   %cl, %edx, %ebx\r
+    shldl   %cl, %eax, %edx\r
+    rorl    %cl, %ebx\r
+    shldl   %cl, %ebx, %eax\r
+    testb   $32, %cl\r
+    cmovnz  %eax, %ecx\r
+    cmovnz  %edx, %eax\r
+    cmovnz  %ecx, %edx\r
+    pop     %ebx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LRotU64.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LRotU64.asm
new file mode 100644 (file)
index 0000000..a6437d8
--- /dev/null
@@ -0,0 +1,49 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   LRotU64.asm\r
+;\r
+; Abstract:\r
+;\r
+;   64-bit left rotation for Ia32\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathLRotU64 (\r
+;   IN      UINT64                    Operand,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathLRotU64 PROC    USES    ebx\r
+    mov     cl, [esp + 16]\r
+    mov     edx, [esp + 12]\r
+    mov     eax, [esp + 8]\r
+    shld    ebx, edx, cl\r
+    shld    edx, eax, cl\r
+    ror     ebx, cl\r
+    shld    eax, ebx, cl\r
+    test    cl, 32                      ; Count >= 32?\r
+    cmovnz  ecx, eax\r
+    cmovnz  eax, edx\r
+    cmovnz  edx, ecx\r
+    ret\r
+InternalMathLRotU64 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.S
new file mode 100644 (file)
index 0000000..a4b99eb
--- /dev/null
@@ -0,0 +1,41 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   LShiftU64.asm
+#
+# Abstract:
+#
+#   64-bit left shift function for IA-32
+#
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(InternalMathLShiftU64)
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InternalMathLShiftU64 (
+#   IN      UINT64                    Operand,
+#   IN      UINTN                     Count
+#   );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMathLShiftU64):
+    movb    12(%esp), %cl
+    xorl    %eax, %eax
+    movl    4(%esp), %edx
+    testb   $32, %cl
+    cmovz   %edx, %eax
+    cmovz   0x8(%esp), %edx
+    shld    %cl, %eax, %edx
+    shl     %cl, %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.asm
new file mode 100644 (file)
index 0000000..6c3d9a4
--- /dev/null
@@ -0,0 +1,46 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   LShiftU64.asm\r
+;\r
+; Abstract:\r
+;\r
+;   64-bit left shift function for IA-32\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathLShiftU64 (\r
+;   IN      UINT64                    Operand,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathLShiftU64   PROC\r
+    mov     cl, [esp + 12]\r
+    xor     eax, eax\r
+    mov     edx, [esp + 4]\r
+    test    cl, 32                      ; Count >= 32?\r
+    cmovz   eax, edx\r
+    cmovz   edx, [esp + 8]\r
+    shld    edx, eax, cl\r
+    shl     eax, cl\r
+    ret\r
+InternalMathLShiftU64   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.S
new file mode 100644 (file)
index 0000000..0b76896
--- /dev/null
@@ -0,0 +1,41 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   LongJump.Asm
+#
+# Abstract:
+#
+#   Implementation of _LongJump() on IA-32.
+#
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(InternalLongJump)
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalLongJump (
+#   IN      BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer,
+#   IN      UINTN                     Value
+#   );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalLongJump):
+    pop     %eax
+    pop     %edx
+    pop     %eax
+    movl    (%edx), %ebx
+    movl    4(%edx), %esi
+    movl    8(%edx), %edi
+    movl    12(%edx), %ebp
+    movl    16(%edx), %esp
+    jmp     *20(%edx)
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.asm
new file mode 100644 (file)
index 0000000..0309f6a
--- /dev/null
@@ -0,0 +1,46 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   LongJump.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   Implementation of _LongJump() on IA-32.\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalLongJump (\r
+;   IN      BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer,\r
+;   IN      UINTN                     Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalLongJump    PROC\r
+    pop     eax                         ; skip return address\r
+    pop     edx                         ; edx <- JumpBuffer\r
+    pop     eax                         ; eax <- Value\r
+    mov     ebx, [edx]\r
+    mov     esi, [edx + 4]\r
+    mov     edi, [edx + 8]\r
+    mov     ebp, [edx + 12]\r
+    mov     esp, [edx + 16]\r
+    jmp     dword ptr [edx + 20]        ; restore "eip"\r
+InternalLongJump    ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ModU64x32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ModU64x32.S
new file mode 100644 (file)
index 0000000..00dc6a0
--- /dev/null
@@ -0,0 +1,40 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   DivU64x32.S\r
+#\r
+# Abstract:\r
+#\r
+#   Calculate the remainder of a 64-bit integer by a 32-bit integer\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalMathModU64x32)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InternalMathModU64x32 (\r
+#   IN      UINT64                    Dividend,\r
+#   IN      UINT32                    Divisor\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalMathModU64x32):\r
+    movl    8(%esp), %eax\r
+    movl    12(%esp), %ecx\r
+    xorl    %edx, %edx\r
+    divl    %ecx\r
+    movl    4(%esp), %eax\r
+    divl    %ecx\r
+    movl    %edx, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ModU64x32.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ModU64x32.asm
new file mode 100644 (file)
index 0000000..9e5f9ae
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   DivU64x32.asm\r
+;\r
+; Abstract:\r
+;\r
+;   Calculate the remainder of a 64-bit integer by a 32-bit integer\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
+; InternalMathModU64x32 (\r
+;   IN      UINT64                    Dividend,\r
+;   IN      UINT32                    Divisor\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathModU64x32   PROC\r
+    mov     eax, [esp + 8]\r
+    mov     ecx, [esp + 12]\r
+    xor     edx, edx\r
+    div     ecx\r
+    mov     eax, [esp + 4]\r
+    div     ecx\r
+    mov     eax, edx\r
+    ret\r
+InternalMathModU64x32   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Monitor.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Monitor.S
new file mode 100644 (file)
index 0000000..6e9284d
--- /dev/null
@@ -0,0 +1,40 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   Monitor.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmMonitor function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmMonitor)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmMonitor (\r
+#   IN      UINTN                     Eax,\r
+#   IN      UINTN                     Ecx,\r
+#   IN      UINTN                     Edx\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmMonitor):\r
+    movl    4(%esp), %eax\r
+    movl    8(%esp), %ecx\r
+    movl    12(%esp), %edx\r
+    monitor %eax, %ecx, %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Monitor.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Monitor.asm
new file mode 100644 (file)
index 0000000..174bd76
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   Monitor.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmMonitor function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmMonitor (\r
+;   IN      UINTN                     Eax,\r
+;   IN      UINTN                     Ecx,\r
+;   IN      UINTN                     Edx\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmMonitor  PROC\r
+    mov     eax, [esp + 4]\r
+    mov     ecx, [esp + 8]\r
+    mov     edx, [esp + 12]\r
+    DB      0fh, 1, 0c8h                ; monitor\r
+    ret\r
+AsmMonitor  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.S
new file mode 100644 (file)
index 0000000..b9d1eb8
--- /dev/null
@@ -0,0 +1,41 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   MultU64x32.asm
+#
+# Abstract:
+#
+#   Calculate the product of a 64-bit integer and a 32-bit integer
+#
+#------------------------------------------------------------------------------
+
+    .386:
+    .code:
+
+.globl ASM_PFX(InternalMathMultU64x32)
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InternalMathMultU64x32 (
+#   IN      UINT64                    Multiplicand,
+#   IN      UINT32                    Multiplier
+#   );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMathMultU64x32):
+    movl    12(%esp), %ecx
+    movl    %ecx, %eax
+    imull   8(%esp), %ecx
+    mull    0x4(%esp)
+    addl    %ecx, %edx
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.asm
new file mode 100644 (file)
index 0000000..9c9ef06
--- /dev/null
@@ -0,0 +1,43 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   MultU64x32.asm\r
+;\r
+; Abstract:\r
+;\r
+;   Calculate the product of a 64-bit integer and a 32-bit integer\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathMultU64x32 (\r
+;   IN      UINT64                    Multiplicand,\r
+;   IN      UINT32                    Multiplier\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathMultU64x32  PROC\r
+    mov     ecx, [esp + 12]\r
+    mov     eax, ecx\r
+    imul    ecx, [esp + 8]              ; overflow not detectable\r
+    mul     dword ptr [esp + 4]\r
+    add     edx, ecx\r
+    ret\r
+InternalMathMultU64x32  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x64.S
new file mode 100644 (file)
index 0000000..0352386
--- /dev/null
@@ -0,0 +1,44 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   MultU64x64.asm\r
+#\r
+# Abstract:\r
+#\r
+#   Calculate the product of a 64-bit integer and another 64-bit integer\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalMathMultU64x64)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# InternalMathMultU64x64 (\r
+#   IN      UINT64                    Multiplicand,\r
+#   IN      UINT64                    Multiplier\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalMathMultU64x64):\r
+    push    %ebx\r
+    movl    8(%esp), %ebx\r
+    movl    16(%esp), %edx\r
+    movl    %ebx, %ecx\r
+    movl    %edx, %eax\r
+    imull   20(%esp), %ebx\r
+    imull   12(%esp), %edx\r
+    addl    %edx, %ebx\r
+    mull    %ecx\r
+    addl    %ebx, %edx\r
+    pop     %ebx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x64.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x64.asm
new file mode 100644 (file)
index 0000000..f367954
--- /dev/null
@@ -0,0 +1,47 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   MultU64x64.asm\r
+;\r
+; Abstract:\r
+;\r
+;   Calculate the product of a 64-bit integer and another 64-bit integer\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathMultU64x64 (\r
+;   IN      UINT64                    Multiplicand,\r
+;   IN      UINT64                    Multiplier\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathMultU64x64  PROC    USES    ebx\r
+    mov     ebx, [esp + 8]              ; ebx <- M1[0..31]\r
+    mov     edx, [esp + 16]             ; edx <- M2[0..31]\r
+    mov     ecx, ebx\r
+    mov     eax, edx\r
+    imul    ebx, [esp + 20]             ; ebx <- M1[0..31] * M2[32..63]\r
+    imul    edx, [esp + 12]             ; edx <- M1[32..63] * M2[0..31]\r
+    add     ebx, edx                    ; carries are abandoned\r
+    mul     ecx                         ; edx:eax <- M1[0..31] * M2[0..31]\r
+    add     edx, ebx                    ; carries are abandoned\r
+    ret\r
+InternalMathMultU64x64  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Mwait.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Mwait.S
new file mode 100644 (file)
index 0000000..12f6a87
--- /dev/null
@@ -0,0 +1,38 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   Mwait.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmMwait function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmMwait)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmMwait (\r
+#   IN      UINTN                     Eax,\r
+#   IN      UINTN                     Ecx\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmMwait):\r
+    movl    4(%esp), %eax\r
+    movl    8(%esp), %ecx\r
+    mwait   %eax, %ecx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Mwait.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Mwait.asm
new file mode 100644 (file)
index 0000000..3e5f48c
--- /dev/null
@@ -0,0 +1,43 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   Mwait.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmMwait function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmMwait (\r
+;   IN      UINTN                     Eax,\r
+;   IN      UINTN                     Ecx\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmMwait    PROC\r
+    mov     eax, [esp + 4]\r
+    mov     ecx, [esp + 8]\r
+    DB      0fh, 1, 0c9h                ; mwait\r
+    ret\r
+AsmMwait    ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RRotU64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RRotU64.S
new file mode 100644 (file)
index 0000000..3593563
--- /dev/null
@@ -0,0 +1,46 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   RRotU64.asm\r
+#\r
+# Abstract:\r
+#\r
+#   64-bit right rotation for Ia32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalMathRRotU64)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# InternalMathRRotU64 (\r
+#   IN      UINT64                    Operand,\r
+#   IN      UINTN                     Count\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalMathRRotU64):\r
+    push    %ebx\r
+    movb    16(%esp), %cl\r
+    movl    8(%esp), %eax\r
+    movl    12(%esp), %edx\r
+    shrdl   %cl, %eax, %ebx\r
+    shrdl   %cl, %edx, %eax\r
+    roll    %cl, %ebx\r
+    shrdl   %cl, %ebx, %edx\r
+    testb   $32, %cl\r
+    cmovnz  %eax, %ecx\r
+    cmovnz  %edx, %eax\r
+    cmovnz  %ecx, %edx\r
+    pop     %ebx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RRotU64.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RRotU64.asm
new file mode 100644 (file)
index 0000000..fe13abc
--- /dev/null
@@ -0,0 +1,49 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   RRotU64.asm\r
+;\r
+; Abstract:\r
+;\r
+;   64-bit right rotation for Ia32\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathRRotU64 (\r
+;   IN      UINT64                    Operand,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathRRotU64 PROC    USES    ebx\r
+    mov     cl, [esp + 16]\r
+    mov     eax, [esp + 8]\r
+    mov     edx, [esp + 12]\r
+    shrd    ebx, eax, cl\r
+    shrd    eax, edx, cl\r
+    rol     ebx, cl\r
+    shrd    edx, ebx, cl\r
+    test    cl, 32                      ; Count >= 32?\r
+    cmovnz  ecx, eax                    ; switch eax & edx if Count >= 32\r
+    cmovnz  eax, edx\r
+    cmovnz  edx, ecx\r
+    ret\r
+InternalMathRRotU64 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.S
new file mode 100644 (file)
index 0000000..ca78394
--- /dev/null
@@ -0,0 +1,44 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   RShiftU64.asm
+#
+# Abstract:
+#
+#   64-bit logical right shift function for IA-32
+#
+#------------------------------------------------------------------------------
+
+    .686:
+    .code:
+
+.globl ASM_PFX(InternalMathRShiftU64)
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InternalMathRShiftU64 (
+#   IN      UINT64                    Operand,
+#   IN      UINTN                     Count
+#   );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMathRShiftU64):
+    movb    12(%esp), %cl
+    xorl    %edx, %edx
+    movl    8(%esp), %eax
+    testb   $32, %cl
+    cmovz   %eax, %edx
+    cmovz   0x4(%esp), %eax
+    shrdl   %cl, %edx, %eax
+    shr     %cl, %edx
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.asm
new file mode 100644 (file)
index 0000000..faa4e96
--- /dev/null
@@ -0,0 +1,46 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   RShiftU64.asm\r
+;\r
+; Abstract:\r
+;\r
+;   64-bit logical right shift function for IA-32\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathRShiftU64 (\r
+;   IN      UINT64                    Operand,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathRShiftU64   PROC\r
+    mov     cl, [esp + 12]              ; cl <- Count\r
+    xor     edx, edx\r
+    mov     eax, [esp + 8]\r
+    test    cl, 32                      ; Count >= 32?\r
+    cmovz   edx, eax\r
+    cmovz   eax, [esp + 4]\r
+    shrd    eax, edx, cl\r
+    shr     edx, cl\r
+    ret\r
+InternalMathRShiftU64   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr0.S
new file mode 100644 (file)
index 0000000..3433344
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadCr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadCr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadCr0)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr0 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadCr0):\r
+    movl    %cr0, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr0.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr0.asm
new file mode 100644 (file)
index 0000000..a8fe4a7
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadCr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadCr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr0 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadCr0  PROC\r
+    mov     eax, cr0\r
+    ret\r
+AsmReadCr0  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr2.S
new file mode 100644 (file)
index 0000000..d308895
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadCr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadCr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadCr2)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr2 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadCr2):\r
+    movl    %cr2, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr2.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr2.asm
new file mode 100644 (file)
index 0000000..a6a9b8c
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadCr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadCr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr2 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadCr2  PROC\r
+    mov     eax, cr2\r
+    ret\r
+AsmReadCr2  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr3.S
new file mode 100644 (file)
index 0000000..aaec1f0
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadCr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadCr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadCr3)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr3 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadCr3):\r
+    movl    %cr3, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr3.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr3.asm
new file mode 100644 (file)
index 0000000..97b9ee4
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadCr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadCr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr3 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadCr3  PROC\r
+    mov     eax, cr3\r
+    ret\r
+AsmReadCr3  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr4.S
new file mode 100644 (file)
index 0000000..442d359
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadCr4.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadCr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadCr4)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr4 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadCr4):\r
+    movl    %cr4, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr4.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr4.asm
new file mode 100644 (file)
index 0000000..a454903
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadCr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadCr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadCr4 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadCr4  PROC\r
+    mov     eax, cr4\r
+    ret\r
+AsmReadCr4  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCs.S
new file mode 100644 (file)
index 0000000..a3ad69d
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadCs.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadCs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadCs)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadCs (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadCs):\r
+    movl    %cs, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCs.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCs.asm
new file mode 100644 (file)
index 0000000..68497e2
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadCs.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadCs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadCs (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadCs   PROC\r
+    mov     eax, cs\r
+    ret\r
+AsmReadCs   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr0.S
new file mode 100644 (file)
index 0000000..d4c61f1
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadDr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadDr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadDr0)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr0 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadDr0):\r
+    movl    %dr0, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr0.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr0.asm
new file mode 100644 (file)
index 0000000..8792ce4
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadDr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadDr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr0 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr0  PROC\r
+    mov     eax, dr0\r
+    ret\r
+AsmReadDr0  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr1.S
new file mode 100644 (file)
index 0000000..27c5554
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadDr1.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadDr1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadDr1)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr1 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadDr1):\r
+    movl    %dr1, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr1.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr1.asm
new file mode 100644 (file)
index 0000000..e924407
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadDr1.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadDr1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr1 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr1  PROC\r
+    mov     eax, dr1\r
+    ret\r
+AsmReadDr1  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr2.S
new file mode 100644 (file)
index 0000000..cca84b9
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadDr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadDr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadDr2)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr2 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadDr2):\r
+    movl    %dr2, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr2.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr2.asm
new file mode 100644 (file)
index 0000000..bbbef7e
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadDr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadDr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr2 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr2  PROC\r
+    mov     eax, dr2\r
+    ret\r
+AsmReadDr2  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr3.S
new file mode 100644 (file)
index 0000000..60b0550
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadDr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadDr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadDr3)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr3 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadDr3):\r
+    movl    %dr3, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr3.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr3.asm
new file mode 100644 (file)
index 0000000..af2e7a2
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadDr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadDr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr3 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr3  PROC\r
+    mov     eax, dr3\r
+    ret\r
+AsmReadDr3  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr4.S
new file mode 100644 (file)
index 0000000..84883df
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadDr4.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadDr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadDr4)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr4 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadDr4):\r
+    movl    %dr4, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr4.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr4.asm
new file mode 100644 (file)
index 0000000..606f26f
--- /dev/null
@@ -0,0 +1,47 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadDr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadDr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr4 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr4  PROC\r
+    ;\r
+    ; DR4 is alias to DR6 only if DE (in CR4) is cleared. Otherwise, reading\r
+    ; this register will cause a #UD exception.\r
+    ;\r
+    ; MS assembler doesn't support this instruction since no one would use it\r
+    ; under normal circustances. Here opcode is used.\r
+    ;\r
+    DB      0fh, 21h, 0e0h\r
+    ret\r
+AsmReadDr4  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr5.S
new file mode 100644 (file)
index 0000000..5abb226
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadDr5.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadDr5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadDr5)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr5 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadDr5):\r
+    movl    %dr5, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr5.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr5.asm
new file mode 100644 (file)
index 0000000..091792d
--- /dev/null
@@ -0,0 +1,47 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadDr5.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadDr5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr5 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr5  PROC\r
+    ;\r
+    ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, reading\r
+    ; this register will cause a #UD exception.\r
+    ;\r
+    ; MS assembler doesn't support this instruction since no one would use it\r
+    ; under normal circustances. Here opcode is used.\r
+    ;\r
+    DB      0fh, 21h, 0e8h\r
+    ret\r
+AsmReadDr5  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr6.S
new file mode 100644 (file)
index 0000000..9594851
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadDr6.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadDr6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadDr6)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr6 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadDr6):\r
+    movl    %dr6, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr6.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr6.asm
new file mode 100644 (file)
index 0000000..479414b
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadDr6.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadDr6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr6 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr6  PROC\r
+    mov     eax, dr6\r
+    ret\r
+AsmReadDr6  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr7.S
new file mode 100644 (file)
index 0000000..4ba13ef
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadDr7.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadDr7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadDr7)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr7 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadDr7):\r
+    movl    %dr7, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr7.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr7.asm
new file mode 100644 (file)
index 0000000..7dee981
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadDr7.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadDr7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadDr7 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadDr7  PROC\r
+    mov     eax, dr7\r
+    ret\r
+AsmReadDr7  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDs.S
new file mode 100644 (file)
index 0000000..c3dc845
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadDs.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadDs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadDs)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadDs (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadDs):\r
+    movl    %ds, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDs.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDs.asm
new file mode 100644 (file)
index 0000000..b8edcb6
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadDs.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadDs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadDs (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadDs   PROC\r
+    mov     eax, ds\r
+    ret\r
+AsmReadDs   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEflags.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEflags.S
new file mode 100644 (file)
index 0000000..ab5e522
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadEflags.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadEflags function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadEflags)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadEflags (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadEflags):\r
+    pushfl\r
+    pop     %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEflags.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEflags.asm
new file mode 100644 (file)
index 0000000..32d55b3
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadEflags.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadEflags function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmReadEflags (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadEflags   PROC\r
+    pushfd\r
+    pop     eax\r
+    ret\r
+AsmReadEflags   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEs.S
new file mode 100644 (file)
index 0000000..26ed55d
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadEs.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadEs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadEs)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadEs (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadEs):\r
+    movl    %es, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEs.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEs.asm
new file mode 100644 (file)
index 0000000..48f1417
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadEs.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadEs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadEs (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadEs   PROC\r
+    mov     eax, es\r
+    ret\r
+AsmReadEs   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadFs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadFs.S
new file mode 100644 (file)
index 0000000..bd38c6a
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadFs.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadFs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadFs)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadFs (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadFs):\r
+    movl    %fs, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadFs.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadFs.asm
new file mode 100644 (file)
index 0000000..ae87107
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadFs.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadFs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadFs (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadFs   PROC\r
+    mov     eax, fs\r
+    ret\r
+AsmReadFs   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGdtr.S
new file mode 100644 (file)
index 0000000..8869164
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadGdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalX86ReadGdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalX86ReadGdtr)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86ReadGdtr (\r
+#   OUT IA32_DESCRIPTOR  *Gdtr\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalX86ReadGdtr):\r
+    movl    4(%esp), %eax\r
+    sgdt    (%eax)\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGdtr.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGdtr.asm
new file mode 100644 (file)
index 0000000..beacb62
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadGdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadGdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86ReadGdtr (\r
+;   OUT IA32_DESCRIPTOR  *Gdtr\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalX86ReadGdtr   PROC\r
+    mov     eax, [esp + 4]\r
+    sgdt    fword ptr [eax]\r
+    ret\r
+InternalX86ReadGdtr   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGs.S
new file mode 100644 (file)
index 0000000..82b3966
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadGs.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadGs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadGs)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadGs (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadGs):\r
+    movl    %gs, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGs.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGs.asm
new file mode 100644 (file)
index 0000000..93313b8
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadGs.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadGs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadGs (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadGs   PROC\r
+    mov     eax, gs\r
+    ret\r
+AsmReadGs   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadIdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadIdtr.S
new file mode 100644 (file)
index 0000000..0e5d32e
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadIdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalX86ReadIdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalX86ReadIdtr)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86ReadIdtr (\r
+#   OUT IA32_DESCRIPTOR  *Idtr\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(InternalX86ReadIdtr):\r
+    movl    4(%esp), %eax\r
+    sidt    (%eax)\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadIdtr.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadIdtr.asm
new file mode 100644 (file)
index 0000000..dc7d473
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadIdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadIdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86ReadIdtr (\r
+;   OUT     IA32_DESCRIPTOR           *Idtr\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalX86ReadIdtr PROC\r
+    mov     eax, [esp + 4]\r
+    sidt    fword ptr [eax]\r
+    ret\r
+InternalX86ReadIdtr ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadLdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadLdtr.S
new file mode 100644 (file)
index 0000000..addb175
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadLdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadLdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadLdtr)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadLdtr (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadLdtr):\r
+    sldt   %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadLdtr.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadLdtr.asm
new file mode 100644 (file)
index 0000000..449b7cf
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadLdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadLdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadLdtr (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadLdtr PROC\r
+    sldt    ax\r
+    ret\r
+AsmReadLdtr ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm0.S
new file mode 100644 (file)
index 0000000..f191337
--- /dev/null
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadMm0.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadMm0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadMm0)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm0 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadMm0):\r
+    push    %eax\r
+    push    %eax\r
+    movq    %mm0, (%esp)\r
+    pop     %eax\r
+    pop     %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm0.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm0.asm
new file mode 100644 (file)
index 0000000..e43c45f
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadMm0.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadMm0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMm0 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm0  PROC\r
+    push    eax\r
+    push    eax\r
+    movq    [esp], mm0\r
+    pop     eax\r
+    pop     edx\r
+    ret\r
+AsmReadMm0  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm1.S
new file mode 100644 (file)
index 0000000..790541a
--- /dev/null
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadMm1.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadMm1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadMm1)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm1 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadMm1):\r
+    push    %eax\r
+    push    %eax\r
+    movq    %mm1, (%esp)\r
+    pop     %eax\r
+    pop     %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm1.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm1.asm
new file mode 100644 (file)
index 0000000..9f92a44
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadMm1.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadMm1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMm1 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm1  PROC\r
+    push    eax\r
+    push    eax\r
+    movq    [esp], mm1\r
+    pop     eax\r
+    pop     edx\r
+    ret\r
+AsmReadMm1  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm2.S
new file mode 100644 (file)
index 0000000..231d62c
--- /dev/null
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadMm2.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadMm2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadMm2)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm2 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadMm2):\r
+    push    %eax\r
+    push    %eax\r
+    movq    %mm2, (%esp)\r
+    pop     %eax\r
+    pop     %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm2.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm2.asm
new file mode 100644 (file)
index 0000000..38e4cb0
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadMm2.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadMm2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMm2 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm2  PROC\r
+    push    eax\r
+    push    eax\r
+    movq    [esp], mm2\r
+    pop     eax\r
+    pop     edx\r
+    ret\r
+AsmReadMm2  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm3.S
new file mode 100644 (file)
index 0000000..1e1f6dd
--- /dev/null
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadMm3.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadMm3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadMm3)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm3 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadMm3):\r
+    push    %eax\r
+    push    %eax\r
+    movq    %mm3, (%esp)\r
+    pop     %eax\r
+    pop     %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm3.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm3.asm
new file mode 100644 (file)
index 0000000..e646762
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadMm3.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadMm3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMm3 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm3  PROC\r
+    push    eax\r
+    push    eax\r
+    movq    [esp], mm3\r
+    pop     eax\r
+    pop     edx\r
+    ret\r
+AsmReadMm3  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm4.S
new file mode 100644 (file)
index 0000000..5da446b
--- /dev/null
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadMm4.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadMm4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadMm4)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm4 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadMm4):\r
+    push    %eax\r
+    push    %eax\r
+    movq    %mm4, (%esp)\r
+    pop     %eax\r
+    pop     %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm4.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm4.asm
new file mode 100644 (file)
index 0000000..8da079d
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadMm4.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadMm4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMm4 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm4  PROC\r
+    push    eax\r
+    push    eax\r
+    movq    [esp], mm4\r
+    pop     eax\r
+    pop     edx\r
+    ret\r
+AsmReadMm4  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm5.S
new file mode 100644 (file)
index 0000000..5528fe1
--- /dev/null
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadMm5.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadMm5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadMm5)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm5 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadMm5):\r
+    push    %eax\r
+    push    %eax\r
+    movq    %mm5, (%esp)\r
+    pop     %eax\r
+    pop     %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm5.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm5.asm
new file mode 100644 (file)
index 0000000..9d6b474
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadMm5.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadMm5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMm5 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm5  PROC\r
+    push    eax\r
+    push    eax\r
+    movq    [esp], mm5\r
+    pop     eax\r
+    pop     edx\r
+    ret\r
+AsmReadMm5  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm6.S
new file mode 100644 (file)
index 0000000..5d9bd11
--- /dev/null
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadMm6.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadMm6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadMm6)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm6 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadMm6):\r
+    push    %eax\r
+    push    %eax\r
+    movq    %mm6, (%esp)\r
+    pop     %eax\r
+    pop     %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm6.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm6.asm
new file mode 100644 (file)
index 0000000..95c73f6
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadMm6.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadMm6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMm6 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm6  PROC\r
+    push    eax\r
+    push    eax\r
+    movq    [esp], mm6\r
+    pop     eax\r
+    pop     edx\r
+    ret\r
+AsmReadMm6  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm7.S
new file mode 100644 (file)
index 0000000..26866b6
--- /dev/null
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadMm7.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadMm7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadMm7)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm7 (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadMm7):\r
+    push    %eax\r
+    push    %eax\r
+    movq    %mm7, (%esp)\r
+    pop     %eax\r
+    pop     %edx\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm7.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm7.asm
new file mode 100644 (file)
index 0000000..0bd3b9b
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadMm7.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadMm7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMm7 (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadMm7  PROC\r
+    push    eax\r
+    push    eax\r
+    movq    [esp], mm7\r
+    pop     eax\r
+    pop     edx\r
+    ret\r
+AsmReadMm7  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMsr64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMsr64.S
new file mode 100644 (file)
index 0000000..505b7e6
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadMsr64.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadMsr64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadMsr64)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmReadMsr64 (\r
+#   IN UINT32  Index\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadMsr64):\r
+    movl    4(%esp), %ecx\r
+    rdmsr\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMsr64.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMsr64.asm
new file mode 100644 (file)
index 0000000..9a3e11c
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadMsr64.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadMsr64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadMsr64 (\r
+;   IN UINT64  Index\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadMsr64    PROC\r
+    mov     ecx, [esp + 4]\r
+    rdmsr\r
+    ret\r
+AsmReadMsr64    ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadPmc.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadPmc.S
new file mode 100644 (file)
index 0000000..055e99c
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadPmc.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadPmc function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadPmc)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmReadPmc (\r
+#   IN UINT32   PmcIndex\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadPmc):\r
+    movl    4(%esp), %ecx\r
+    rdpmc\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadPmc.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadPmc.asm
new file mode 100644 (file)
index 0000000..17156d4
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadPmc.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadPmc function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadPmc (\r
+;   IN UINT32   PmcIndex\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadPmc  PROC\r
+    mov     ecx, [esp + 4]\r
+    rdpmc\r
+    ret\r
+AsmReadPmc  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadSs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadSs.S
new file mode 100644 (file)
index 0000000..4f15248
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadSs.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadSs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadSs)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadSs (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadSs):\r
+    movl    %ss, %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadSs.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadSs.asm
new file mode 100644 (file)
index 0000000..4143537
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadSs.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadSs function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadSs (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadSs   PROC\r
+    mov     eax, ss\r
+    ret\r
+AsmReadSs   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTr.S
new file mode 100644 (file)
index 0000000..af12dd2
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadTr.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadTr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadTr)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadTr (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadTr):\r
+    str     %eax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTr.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTr.asm
new file mode 100644 (file)
index 0000000..4f4e64b
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadTr.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadTr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT16\r
+; EFIAPI\r
+; AsmReadTr (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadTr   PROC\r
+    str     ax\r
+    ret\r
+AsmReadTr   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTsc.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTsc.S
new file mode 100644 (file)
index 0000000..cab2966
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   ReadTsc.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmReadTsc function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(AsmReadTsc)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmReadTsc (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmReadTsc):\r
+    rdtsc\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTsc.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTsc.asm
new file mode 100644 (file)
index 0000000..fff3829
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ReadTsc.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmReadTsc function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmReadTsc (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmReadTsc  PROC\r
+    rdtsc\r
+    ret\r
+AsmReadTsc  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SetJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SetJump.S
new file mode 100644 (file)
index 0000000..c899308
--- /dev/null
@@ -0,0 +1,44 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   SetJump.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   Implementation of SetJump() on IA-32.\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(SetJump), ASM_PFX(InternalAssertJumpBuffer)\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# SetJump (\r
+#   OUT     BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer\r
+#   );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(SetJump):\r
+    pushl   0x4(%esp)\r
+    call    ASM_PFX(InternalAssertJumpBuffer)\r
+    pop     %ecx\r
+    pop     %ecx\r
+    movl    (%esp), %edx\r
+    movl    %ebx, (%edx)\r
+    movl    %esi, 4(%edx)\r
+    movl    %edi, 8(%edx)\r
+    movl    %ebp, 12(%edx)\r
+    movl    %esp, 16(%edx)\r
+    movl    %ecx, 20(%edx)\r
+    xorl    %eax, %eax\r
+    jmp     *%ecx\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SetJump.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SetJump.asm
new file mode 100644 (file)
index 0000000..4b7b40c
--- /dev/null
@@ -0,0 +1,51 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   SetJump.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   Implementation of SetJump() on IA-32.\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386\r
+    .model  flat,C\r
+    .code\r
+\r
+InternalAssertJumpBuffer    PROTO   C\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; SetJump (\r
+;   OUT     BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer\r
+;   );\r
+;------------------------------------------------------------------------------\r
+SetJump     PROC\r
+    push    [esp + 4]\r
+    call    InternalAssertJumpBuffer    ; To validate JumpBuffer\r
+    pop     ecx\r
+    pop     ecx                         ; ecx <- return address\r
+    mov     edx, [esp]\r
+    mov     [edx], ebx\r
+    mov     [edx + 4], esi\r
+    mov     [edx + 8], edi\r
+    mov     [edx + 12], ebp\r
+    mov     [edx + 16], esp\r
+    mov     [edx + 20], ecx             ; eip value to restore in LongJump\r
+    xor     eax, eax\r
+    jmp     ecx\r
+SetJump     ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.S
new file mode 100644 (file)
index 0000000..c15ca44
--- /dev/null
@@ -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:
+#
+#   CpuId.Asm
+#
+# Abstract:
+#
+#   AsmCpuid function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InternalMathSwapBytes64 (
+#   IN      UINT64                    Operand
+#   );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(InternalMathSwapBytes64)
+ASM_PFX(InternalMathSwapBytes64):
+    movl    8(%esp), %eax
+    movl    4(%esp), %edx
+    bswapl  %eax
+    bswapl  %edx
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.asm
new file mode 100644 (file)
index 0000000..7647880
--- /dev/null
@@ -0,0 +1,43 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   CpuId.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmCpuid function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathSwapBytes64 (\r
+;   IN      UINT64                    Operand\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalMathSwapBytes64 PROC\r
+    mov     eax, [esp + 8]              ; eax <- upper 32 bits\r
+    mov     edx, [esp + 4]              ; edx <- lower 32 bits\r
+    bswap   eax\r
+    bswap   edx\r
+    ret\r
+InternalMathSwapBytes64 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.S
new file mode 100644 (file)
index 0000000..5755a37
--- /dev/null
@@ -0,0 +1,202 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   Thunk16.S\r
+#\r
+# Abstract:\r
+#\r
+#   Real mode thunk\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <Library/BaseLib.h>\r
+\r
+.globl ASM_PFX(m16Start), ASM_PFX(m16Size), ASM_PFX(mThunk16Attr), ASM_PFX(m16Gdt), ASM_PFX(m16GdtrBase), ASM_PFX(mTransition)\r
+.globl ASM_PFX(InternalAsmThunk16)\r
+\r
+ASM_PFX(m16Start):\r
+\r
+SavedGdt:     .space  6\r
+\r
+ASM_PFX(BackFromUserCode):\r
+    push    %ss\r
+    push    %cs\r
+    .byte   0x66\r
+    call    L_Base1                     # push eip\r
+L_Base1:\r
+    pushfw                              # pushfd actually\r
+    cli                                 # disable interrupts\r
+    push    %gs\r
+    push    %fs\r
+    push    %es\r
+    push    %ds\r
+    pushaw                              # pushad actually\r
+    .byte   0x66, 0xba                  # mov edx, imm32\r
+ASM_PFX(ThunkAttr): .space  4\r
+    testb   $THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15, %dl\r
+    jz      1f\r
+    movl    $0x15cd2401, %eax           # mov ax, 2401h & int 15h\r
+    cli                                 # disable interrupts\r
+    jnc     2f\r
+1:\r
+    testb   $THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL, %dl\r
+    jz      2f\r
+    inb     $0x92, %al\r
+    orb     $2, %al\r
+    outb    %al, $0x92                  # deactivate A20M#\r
+2:\r
+    movl    %ss, %eax\r
+    .byte   0x67, 0x66, 0x8d, 0x6c, 0x24, 0x34, 0x66\r
+    mov     %ebp, 0xffffffd8(%esi)\r
+    mov     0xfffffff8(%esi), %ebx\r
+    shlw    $4, %ax                     # shl eax, 4\r
+    addw    %ax, %bp                    # add ebp, eax\r
+    .byte   0x66, 0xb8                   # mov eax, imm32\r
+SavedCr4:   .space  4\r
+    movl    %eax, %cr4\r
+    lgdtw   %cs:0xfffffff2(%edi)\r
+    .byte   0x66, 0xb8                   # mov eax, imm32\r
+SavedCr0:   .space  4\r
+    movl    %eax, %cr0\r
+    .byte   0xb8                        # mov ax, imm16\r
+SavedSs:    .space  2\r
+    movl    %eax, %ss\r
+    .byte   0x66, 0xbc                   # mov esp, imm32\r
+SavedEsp:   .space  4\r
+    .byte   0x66\r
+    lret                                # return to protected mode\r
+\r
+_EntryPoint:    .long      ASM_PFX(ToUserCode) - ASM_PFX(m16Start)\r
+                .word      0x8\r
+_16Idtr:        .word      0x3ff\r
+                .long      0\r
+_16Gdtr:        .word      GdtEnd - _NullSegDesc - 1\r
+_16GdtrBase:    .long      _NullSegDesc\r
+\r
+ASM_PFX(ToUserCode):\r
+    movl    %ss, %edx\r
+    movl    %ecx, %ss                   # set new segment selectors\r
+    movl    %ecx, %ds\r
+    movl    %ecx, %es\r
+    movl    %ecx, %fs\r
+    movl    %ecx, %gs\r
+    movl    %eax, %cr0\r
+    movl    %ebp, %cr4                  # real mode starts at next instruction\r
+    movl    %esi, %ss                   # set up 16-bit stack segment\r
+    xchgw   %bx, %sp                    # set up 16-bit stack pointer\r
+    .byte   0x66\r
+    call    L_Base                      # push eip\r
+L_Base:\r
+    popw    %bp                         # ebp <- offset L_Base\r
+    .byte   0x67;                       # address size override\r
+    push    54(%esp)\r
+    lea     0xc(%esi), %eax\r
+    push    %eax\r
+    lret\r
+\r
+L_RealMode:\r
+    mov     %edx, %cs:0xffffffc5(%esi)\r
+    mov     %bx, %cs:0xffffffcb(%esi)\r
+    lidtw   %cs:0xffffffd7(%esi)\r
+    popaw                               # popad actually\r
+    pop     %ds\r
+    pop     %es\r
+    pop     %fs\r
+    pop     %gs\r
+    popfw                               # popfd\r
+    lretw                               # transfer control to user code\r
+\r
+_NullSegDesc:   .quad   0\r
+_16CsDesc:\r
+                .word   -1\r
+                .word   0\r
+                .byte   0\r
+                .byte   0x9b\r
+                .byte   0x8f            # 16-bit segment, 4GB limit\r
+                .byte   0\r
+_16DsDesc:\r
+                .word   -1\r
+                .word   0\r
+                .byte   0\r
+                .byte   0x93\r
+                .byte   0x8f            # 16-bit segment, 4GB limit\r
+                .byte   0\r
+GdtEnd:\r
+\r
+#\r
+#   @param  RegSet  Pointer to a IA32_DWORD_REGS structure\r
+#   @param  Transition  Pointer to the transition code\r
+#   @return The address of the 16-bit stack after returning from user code\r
+#\r
+ASM_PFX(InternalAsmThunk16):\r
+    push    %ebp\r
+    push    %ebx\r
+    push    %esi\r
+    push    %edi\r
+    push    %ds\r
+    push    %es\r
+    push    %fs\r
+    push    %gs\r
+    movl    36(%esp), %esi              # esi <- RegSet\r
+    movzwl  0x32(%esi), %edx\r
+    mov     0xc(%esi), %edi\r
+    add     $0xffffffc8, %edi\r
+    movl    %edi, %ebx                  # ebx <- stack offset\r
+    imul    $0x10, %edx, %eax\r
+    push    $0xd\r
+    addl    %eax, %edi                  # edi <- linear address of 16-bit stack\r
+    pop     %ecx\r
+    rep\r
+    movsl                               # copy RegSet\r
+    movl    40(%esp), %eax              # eax <- address of transition code\r
+    movl    %edx, %esi                  # esi <- 16-bit stack segment\r
+    lea     0x5e(%eax), %edx\r
+    movl    %eax, %ecx\r
+    andl    $0xf, %ecx\r
+    shll    $12, %eax\r
+    lea     0x6(%ecx), %ecx\r
+    movw    %cx, %ax\r
+    stosl                               # [edi] <- return address of user code\r
+    sgdtl   0xffffffa2(%edx)\r
+    sidtl   0x24(%esp)\r
+    movl    %cr0, %eax\r
+    movl    %eax, (%edx)                # save CR0 in SavedCr0\r
+    andl    $0x7ffffffe, %eax           # clear PE, PG bits\r
+    movl    %cr4, %ebp\r
+    mov     %ebp, 0xfffffff1(%edx)\r
+    andl    $0x300, %ebp                # clear all but PCE and OSFXSR bits\r
+    pushl   $0x10\r
+    pop     %ecx                        # ecx <- selector for data segments\r
+    lgdtl   0x20(%edx)\r
+    pushfl\r
+    lcall   *0x14(%edx)\r
+    popfl\r
+    lidtl   0x24(%esp)\r
+    lea     0xffffffcc(%ebp), %eax\r
+       pop     %gs\r
+       pop     %fs\r
+       pop     %es\r
+       pop     %ds\r
+       pop     %edi\r
+       pop     %esi\r
+       pop     %ebx\r
+       pop     %ebp\r
+    ret\r
+\r
+    .const:\r
+\r
+ASM_PFX(m16Size):        .word      _InternalAsmThunk16 - ASM_PFX(m16Start)\r
+ASM_PFX(mThunk16Attr):   .word      _ThunkAttr          - ASM_PFX(m16Start)\r
+ASM_PFX(m16Gdt):         .word      _NullSegDesc        - ASM_PFX(m16Start)\r
+ASM_PFX(m16GdtrBase):    .word      _16GdtrBase         - ASM_PFX(m16Start)\r
+ASM_PFX(mTransition):    .word      _EntryPoint         - ASM_PFX(m16Start)\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Wbinvd.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Wbinvd.S
new file mode 100644 (file)
index 0000000..b19348d
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   Wbinvd.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWbinvd function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWbinvd (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWbinvd)\r
+ASM_PFX(AsmWbinvd):\r
+    wbinvd\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Wbinvd.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Wbinvd.asm
new file mode 100644 (file)
index 0000000..1230c89
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   Wbinvd.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWbinvd function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .486p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWbinvd (\r
+;   VOID\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWbinvd   PROC\r
+    wbinvd\r
+    ret\r
+AsmWbinvd   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr0.S
new file mode 100644 (file)
index 0000000..6bce3a4
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteCr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteCr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr0 (\r
+#   IN      UINTN                     Cr0\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteCr0)\r
+ASM_PFX(AsmWriteCr0):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %cr0\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr0.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr0.asm
new file mode 100644 (file)
index 0000000..5eab67f
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteCr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteCr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr0 (\r
+;   UINTN  Cr0\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteCr0 PROC\r
+    mov     eax, [esp + 4]\r
+    mov     cr0, eax\r
+    ret\r
+AsmWriteCr0 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr2.S
new file mode 100644 (file)
index 0000000..64d2c1b
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteCr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteCr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr2 (\r
+#   IN      UINTN                     Cr2\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteCr2)\r
+ASM_PFX(AsmWriteCr2):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %cr2\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr2.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr2.asm
new file mode 100644 (file)
index 0000000..0df8441
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteCr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteCr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr2 (\r
+;   UINTN  Cr2\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteCr2 PROC\r
+    mov     eax, [esp + 4]\r
+    mov     cr2, eax\r
+    ret\r
+AsmWriteCr2 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr3.S
new file mode 100644 (file)
index 0000000..767182e
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteCr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteCr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr3 (\r
+#   IN      UINTN                     Cr3\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteCr3)\r
+ASM_PFX(AsmWriteCr3):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %cr3\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr3.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr3.asm
new file mode 100644 (file)
index 0000000..32b05fd
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteCr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteCr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr3 (\r
+;   UINTN  Cr3\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteCr3 PROC\r
+    mov     eax, [esp + 4]\r
+    mov     cr3, eax\r
+    ret\r
+AsmWriteCr3 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr4.S
new file mode 100644 (file)
index 0000000..dc6828a
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteCr4.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteCr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr4 (\r
+#   IN      UINTN                     Cr4\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteCr4)\r
+ASM_PFX(AsmWriteCr4):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %cr4\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr4.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr4.asm
new file mode 100644 (file)
index 0000000..4ed7f61
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteCr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteCr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteCr4 (\r
+;   UINTN  Cr4\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteCr4 PROC\r
+    mov     eax, [esp + 4]\r
+    mov     cr4, eax\r
+    ret\r
+AsmWriteCr4 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr0.S
new file mode 100644 (file)
index 0000000..c05af0e
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteDr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteDr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr0 (\r
+#   IN UINTN Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr0)\r
+ASM_PFX(AsmWriteDr0):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %dr0\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr0.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr0.asm
new file mode 100644 (file)
index 0000000..1bd39d5
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteDr0.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteDr0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr0 (\r
+;   IN UINTN Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr0 PROC\r
+    mov     eax, [esp + 4]\r
+    mov     dr0, eax\r
+    ret\r
+AsmWriteDr0 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr1.S
new file mode 100644 (file)
index 0000000..8703176
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteDr1.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteDr1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr1 (\r
+#   IN UINTN Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr1)\r
+ASM_PFX(AsmWriteDr1):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %dr1\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr1.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr1.asm
new file mode 100644 (file)
index 0000000..542125b
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteDr1.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteDr1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr1 (\r
+;   IN UINTN Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr1 PROC\r
+    mov     eax, [esp + 4]\r
+    mov     dr1, eax\r
+    ret\r
+AsmWriteDr1 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr2.S
new file mode 100644 (file)
index 0000000..ca4e301
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteDr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteDr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr2 (\r
+#   IN UINTN Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr2)\r
+ASM_PFX(AsmWriteDr2):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %dr2\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr2.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr2.asm
new file mode 100644 (file)
index 0000000..7638bab
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteDr2.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteDr2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr2 (\r
+;   IN UINTN Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr2 PROC\r
+    mov     eax, [esp + 4]\r
+    mov     dr2, eax\r
+    ret\r
+AsmWriteDr2 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr3.S
new file mode 100644 (file)
index 0000000..ed23db7
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteDr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteDr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr3 (\r
+#   IN UINTN Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr3)\r
+ASM_PFX(AsmWriteDr3):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %dr3\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr3.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr3.asm
new file mode 100644 (file)
index 0000000..69a17b4
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteDr3.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteDr3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr3 (\r
+;   IN UINTN Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr3 PROC\r
+    mov     eax, [esp + 4]\r
+    mov     dr3, eax\r
+    ret\r
+AsmWriteDr3 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr4.S
new file mode 100644 (file)
index 0000000..d175952
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteDr4.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteDr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr4 (\r
+#   IN UINTN Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr4)\r
+ASM_PFX(AsmWriteDr4):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %dr4\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr4.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr4.asm
new file mode 100644 (file)
index 0000000..9c10305
--- /dev/null
@@ -0,0 +1,48 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteDr4.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteDr4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr4 (\r
+;   IN UINTN Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr4 PROC\r
+    mov     eax, [esp + 4]\r
+    ;\r
+    ; DR4 is alias to DR6 only if DE (in CR4) is cleared. Otherwise, writing to\r
+    ; this register will cause a #UD exception.\r
+    ;\r
+    ; MS assembler doesn't support this instruction since no one would use it\r
+    ; under normal circustances. Here opcode is used.\r
+    ;\r
+    DB      0fh, 23h, 0e0h\r
+    ret\r
+AsmWriteDr4 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr5.S
new file mode 100644 (file)
index 0000000..7e3bb94
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteDr5.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteDr5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr5 (\r
+#   IN UINTN Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr5)\r
+ASM_PFX(AsmWriteDr5):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %dr5\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr5.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr5.asm
new file mode 100644 (file)
index 0000000..e10434e
--- /dev/null
@@ -0,0 +1,48 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteDr5.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteDr5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr5 (\r
+;   IN UINTN Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr5 PROC\r
+    mov     eax, [esp + 4]\r
+    ;\r
+    ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, writing to\r
+    ; this register will cause a #UD exception.\r
+    ;\r
+    ; MS assembler doesn't support this instruction since no one would use it\r
+    ; under normal circustances. Here opcode is used.\r
+    ;\r
+    DB      0fh, 23h, 0e8h\r
+    ret\r
+AsmWriteDr5 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr6.S
new file mode 100644 (file)
index 0000000..0827f34
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteDr6.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteDr6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr6 (\r
+#   IN UINTN Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr6)\r
+ASM_PFX(AsmWriteDr6):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %dr6\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr6.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr6.asm
new file mode 100644 (file)
index 0000000..4e5acf5
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteDr6.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteDr6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr6 (\r
+;   IN UINTN Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr6 PROC\r
+    mov     eax, [esp + 4]\r
+    mov     dr6, eax\r
+    ret\r
+AsmWriteDr6 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr7.S
new file mode 100644 (file)
index 0000000..1f3e916
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteDr7.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteDr7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr7 (\r
+#   IN UINTN Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr7)\r
+ASM_PFX(AsmWriteDr7):\r
+    movl    4(%esp), %eax\r
+    movl    %eax, %dr7\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr7.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr7.asm
new file mode 100644 (file)
index 0000000..10e83d6
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteDr7.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteDr7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; AsmWriteDr7 (\r
+;   IN UINTN Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteDr7 PROC\r
+    mov     eax, [esp + 4]\r
+    mov     dr7, eax\r
+    ret\r
+AsmWriteDr7 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteGdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteGdtr.S
new file mode 100644 (file)
index 0000000..3aedf7d
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteGdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalX86WriteGdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86WriteGdtr (\r
+#   OUT IA32_DESCRIPTOR  *Gdtr\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalX86WriteGdtr)\r
+ASM_PFX(InternalX86WriteGdtr):\r
+    movl    4(%esp), %eax\r
+    lgdt    (%eax)\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteGdtr.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteGdtr.asm
new file mode 100644 (file)
index 0000000..f1c7a92
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteGdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteGdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86WriteGdtr (\r
+;   IN      CONST IA32_DESCRIPTOR     *Idtr\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalX86WriteGdtr  PROC\r
+    mov     eax, [esp + 4]\r
+    lgdt    fword ptr [eax]\r
+    ret\r
+InternalX86WriteGdtr  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteIdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteIdtr.S
new file mode 100644 (file)
index 0000000..c3e6ad3
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteIdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InternalX86WriteIdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86WriteIdtr (\r
+#   OUT IA32_DESCRIPTOR  *Idtr\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalX86WriteIdtr)\r
+ASM_PFX(InternalX86WriteIdtr):\r
+    movl    4(%esp), %eax\r
+    lidt    (%eax)\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteIdtr.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteIdtr.asm
new file mode 100644 (file)
index 0000000..65fca40
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteIdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteIdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; InternalX86WriteIdtr (\r
+;   IN      CONST IA32_DESCRIPTOR     *Idtr\r
+;   );\r
+;------------------------------------------------------------------------------\r
+InternalX86WriteIdtr  PROC\r
+    mov     eax, [esp + 4]\r
+    lidt    fword ptr [eax]\r
+    ret\r
+InternalX86WriteIdtr  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteLdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteLdtr.S
new file mode 100644 (file)
index 0000000..8b2cc3c
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteLdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteLdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteLdtr (\r
+#   IN UINT16 Ldtr\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteLdtr)\r
+ASM_PFX(AsmWriteLdtr):\r
+    movl    4(%esp), %eax\r
+    lldtw   %ax\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteLdtr.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteLdtr.asm
new file mode 100644 (file)
index 0000000..39f8b2e
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteLdtr.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteLdtr function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .386p\r
+    .model  flat\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteLdtr (\r
+;   IN UINT16 Ldtr\r
+;   );\r
+;------------------------------------------------------------------------------\r
+_AsmWriteLdtr   PROC\r
+    mov     eax, [esp + 4]\r
+    lldt    ax\r
+    ret\r
+_AsmWriteLdtr   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm0.S
new file mode 100644 (file)
index 0000000..ef70763
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteMm0.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteMm0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm0 (\r
+#   IN UINT64   Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm0)\r
+ASM_PFX(AsmWriteMm0):\r
+    movq    4(%esp), %mm0\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm0.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm0.asm
new file mode 100644 (file)
index 0000000..15912f6
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteMm0.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteMm0 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteMm0 (\r
+;   IN UINT64   Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm0 PROC\r
+    movq    mm0, [esp + 4]\r
+    ret\r
+AsmWriteMm0 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm1.S
new file mode 100644 (file)
index 0000000..74a3d71
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteMm1.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteMm1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm1 (\r
+#   IN UINT64   Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm1)\r
+ASM_PFX(AsmWriteMm1):\r
+    movq    4(%esp), %mm1\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm1.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm1.asm
new file mode 100644 (file)
index 0000000..097e760
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteMm1.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteMm1 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteMm1 (\r
+;   IN UINT64   Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm1 PROC\r
+    movq    mm1, [esp + 4]\r
+    ret\r
+AsmWriteMm1 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm2.S
new file mode 100644 (file)
index 0000000..a3c548d
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteMm2.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteMm2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm2 (\r
+#   IN UINT64   Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm2)\r
+ASM_PFX(AsmWriteMm2):\r
+    movq    4(%esp), %mm2\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm2.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm2.asm
new file mode 100644 (file)
index 0000000..fea7081
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteMm2.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteMm2 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteMm2 (\r
+;   IN UINT64   Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm2 PROC\r
+    movq    mm2, [esp + 4]\r
+    ret\r
+AsmWriteMm2 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm3.S
new file mode 100644 (file)
index 0000000..98b11a5
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteMm3.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteMm3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm3 (\r
+#   IN UINT64   Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm3)\r
+ASM_PFX(AsmWriteMm3):\r
+    movq    4(%esp), %mm3\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm3.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm3.asm
new file mode 100644 (file)
index 0000000..1af2490
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteMm3.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteMm3 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteMm3 (\r
+;   IN UINT64   Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm3 PROC\r
+    movq    mm3, [esp + 4]\r
+    ret\r
+AsmWriteMm3 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm4.S
new file mode 100644 (file)
index 0000000..107c695
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteMm4.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteMm4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm4 (\r
+#   IN UINT64   Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm4)\r
+ASM_PFX(AsmWriteMm4):\r
+    movq    4(%esp), %mm4\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm4.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm4.asm
new file mode 100644 (file)
index 0000000..2cf9da0
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteMm4.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteMm4 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteMm4 (\r
+;   IN UINT64   Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm4 PROC\r
+    movq    mm4, [esp + 4]\r
+    ret\r
+AsmWriteMm4 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm5.S
new file mode 100644 (file)
index 0000000..be6a6f7
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteMm5.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteMm5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm5 (\r
+#   IN UINT64   Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm5)\r
+ASM_PFX(AsmWriteMm5):\r
+    movq    4(%esp), %mm5\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm5.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm5.asm
new file mode 100644 (file)
index 0000000..9c9882e
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteMm5.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteMm5 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteMm5 (\r
+;   IN UINT64   Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm5 PROC\r
+    movq    mm5, [esp + 4]\r
+    ret\r
+AsmWriteMm5 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm6.S
new file mode 100644 (file)
index 0000000..51a8973
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteMm6.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteMm6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm6 (\r
+#   IN UINT64   Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm6)\r
+ASM_PFX(AsmWriteMm6):\r
+    movq    4(%esp), %mm6\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm6.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm6.asm
new file mode 100644 (file)
index 0000000..5e0cfad
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteMm6.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteMm6 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteMm6 (\r
+;   IN UINT64   Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm6 PROC\r
+    movq    mm6, [esp + 4]\r
+    ret\r
+AsmWriteMm6 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm7.S
new file mode 100644 (file)
index 0000000..824bbea
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteMm7.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteMm7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm7 (\r
+#   IN UINT64   Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm7)\r
+ASM_PFX(AsmWriteMm7):\r
+    movq    4(%esp), %mm7\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm7.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm7.asm
new file mode 100644 (file)
index 0000000..faaa23b
--- /dev/null
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteMm7.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteMm7 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EFIAPI\r
+; AsmWriteMm7 (\r
+;   IN UINT64   Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMm7 PROC\r
+    movq    mm7, [esp + 4]\r
+    ret\r
+AsmWriteMm7 ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMsr64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMsr64.S
new file mode 100644 (file)
index 0000000..5c12c98
--- /dev/null
@@ -0,0 +1,38 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   WriteMsr64.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   AsmWriteMsr64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMsr64 (\r
+#   IN UINT32  Index,\r
+#   IN UINT64  Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMsr64)\r
+ASM_PFX(AsmWriteMsr64):\r
+    movl    12(%esp), %edx\r
+    movl    8(%esp), %eax\r
+    movl    4(%esp), %ecx\r
+    wrmsr\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMsr64.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMsr64.asm
new file mode 100644 (file)
index 0000000..14edba6
--- /dev/null
@@ -0,0 +1,44 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   WriteMsr64.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmWriteMsr64 function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .586p\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmWriteMsr64 (\r
+;   IN UINT32  Index,\r
+;   IN UINT64  Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+AsmWriteMsr64   PROC\r
+    mov     edx, [esp + 12]\r
+    mov     eax, [esp + 8]\r
+    mov     ecx, [esp + 4]\r
+    wrmsr\r
+    ret\r
+AsmWriteMsr64   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/SynchronizationGcc.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/SynchronizationGcc.c
new file mode 100644 (file)
index 0000000..4c30dbc
--- /dev/null
@@ -0,0 +1,407 @@
+/** @file\r
+  Implementation of synchronization functions.\r
+\r
+  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+//\r
+// Include common header file for this module.\r
+//\r
+\r
+\r
+#include "BaseLibInternals.h"\r
+\r
+//\r
+// GCC inline assembly for Read Write Barrier  \r
+//\r
+#define _ReadWriteBarrier() do { asm volatile ("": : : "memory"); } while(0)\r
+\r
+#define SPIN_LOCK_RELEASED          ((UINTN) 1)\r
+#define SPIN_LOCK_ACQUIRED          ((UINTN) 2)\r
+\r
+/**\r
+  Retrieves the architecture specific spin lock alignment requirements for\r
+  optimal spin lock performance.\r
+\r
+  This function retrieves the spin lock alignment requirements for optimal\r
+  performance on a given CPU architecture. The spin lock alignment must be a\r
+  power of two and is returned by this function. If there are no alignment\r
+  requirements, then 1 must be returned. The spin lock synchronization\r
+  functions must function correctly if the spin lock size and alignment values\r
+  returned by this function are not used at all. These values are hints to the\r
+  consumers of the spin lock synchronization functions to obtain optimal spin\r
+  lock performance.\r
+\r
+  @return The architecture specific spin lock alignment.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+GetSpinLockProperties (\r
+  VOID\r
+  )\r
+{\r
+  // @bug May use a PCD entry to determine this alignment.\r
+  return 32;\r
+}\r
+\r
+/**\r
+  Initializes a spin lock to the released state and returns the spin lock.\r
+\r
+  This function initializes the spin lock specified by SpinLock to the released\r
+  state, and returns SpinLock. Optimal performance can be achieved by calling\r
+  GetSpinLockProperties() to determine the size and alignment requirements for\r
+  SpinLock.\r
+\r
+  If SpinLock is NULL, then ASSERT().\r
+\r
+  @param  SpinLock  A pointer to the spin lock to initialize to the released\r
+                    state.\r
+\r
+  @return SpinLock\r
+\r
+**/\r
+SPIN_LOCK *\r
+EFIAPI\r
+InitializeSpinLock (\r
+  OUT     SPIN_LOCK                 *SpinLock\r
+  )\r
+{\r
+  ASSERT (SpinLock != NULL);\r
+\r
+  _ReadWriteBarrier();\r
+  *SpinLock = SPIN_LOCK_RELEASED;\r
+  _ReadWriteBarrier();\r
+\r
+  return SpinLock;\r
+}\r
+\r
+/**\r
+  Waits until a spin lock can be placed in the acquired state.\r
+\r
+  This function checks the state of the spin lock specified by SpinLock. If\r
+  SpinLock is in the released state, then this function places SpinLock in the\r
+  acquired state and returns SpinLock. Otherwise, this function waits\r
+  indefinitely for the spin lock to be released, and then places it in the\r
+  acquired state and returns SpinLock. All state transitions of SpinLock must\r
+  be performed using MP safe mechanisms.\r
+\r
+  If SpinLock is NULL, then ASSERT().\r
+  If SpinLock was not initialized with InitializeSpinLock(), then ASSERT().\r
+  If PcdSpinLockTimeout is not zero, and SpinLock is can not be acquired in\r
+  PcdSpinLockTimeout microseconds, then ASSERT().\r
+\r
+  @param  SpinLock  A pointer to the spin lock to place in the acquired state.\r
+\r
+  @return SpinLock\r
+\r
+**/\r
+SPIN_LOCK *\r
+EFIAPI\r
+AcquireSpinLock (\r
+  IN OUT  SPIN_LOCK                 *SpinLock\r
+  )\r
+{\r
+  UINT64  Current;\r
+  UINT64  Previous;\r
+  UINT64  Total;\r
+  UINT64  Start;\r
+  UINT64  End;\r
+  UINT64  Timeout;\r
+  INT64   Cycle;\r
+  INT64   Delta;\r
+\r
+  if (PcdGet32 (PcdSpinLockTimeout) > 0) {\r
+    //\r
+    // Get the current timer value\r
+    //\r
+    Current = GetPerformanceCounter();\r
+\r
+    //\r
+    // Initialize local variables\r
+    //\r
+    Start = 0;\r
+    End   = 0;\r
+    Total = 0;\r
+\r
+    //\r
+    // Retrieve the performance counter properties and compute the number of performance\r
+    // counter ticks required to reach the timeout\r
+    //\r
+    Timeout = DivU64x32 (\r
+                MultU64x32 (\r
+                  GetPerformanceCounterProperties (&Start, &End),\r
+                  PcdGet32 (PcdSpinLockTimeout)\r
+                  ),\r
+                1000000\r
+                );\r
+    Cycle = End - Start;\r
+    if (Cycle < 0) {\r
+      Cycle = -Cycle;\r
+    }\r
+    Cycle++;\r
+\r
+    while (!AcquireSpinLockOrFail (SpinLock)) {\r
+      CpuPause ();\r
+      Previous = Current;\r
+      Current  = GetPerformanceCounter();\r
+      Delta = (INT64) (Current - Previous);\r
+      if (Start > End) {\r
+        Delta = -Delta;\r
+      }\r
+      if (Delta < 0) {\r
+        Delta += Cycle;\r
+      }\r
+      Total += Delta;\r
+      ASSERT (Total < Timeout);\r
+    }\r
+  } else {\r
+    while (!AcquireSpinLockOrFail (SpinLock)) {\r
+      CpuPause ();\r
+    }\r
+  }\r
+  return SpinLock;\r
+}\r
+\r
+/**\r
+  Attempts to place a spin lock in the acquired state.\r
+\r
+  This function checks the state of the spin lock specified by SpinLock. If\r
+  SpinLock is in the released state, then this function places SpinLock in the\r
+  acquired state and returns TRUE. Otherwise, FALSE is returned. All state\r
+  transitions of SpinLock must be performed using MP safe mechanisms.\r
+\r
+  If SpinLock is NULL, then ASSERT().\r
+  If SpinLock was not initialized with InitializeSpinLock(), then ASSERT().\r
+\r
+  @param  SpinLock  A pointer to the spin lock to place in the acquired state.\r
+\r
+  @retval TRUE  SpinLock was placed in the acquired state.\r
+  @retval FALSE SpinLock could not be acquired.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+AcquireSpinLockOrFail (\r
+  IN OUT  SPIN_LOCK                 *SpinLock\r
+  )\r
+{\r
+  SPIN_LOCK   LockValue;\r
+  VOID        *Result;\r
+  \r
+  ASSERT (SpinLock != NULL);\r
+\r
+  LockValue = *SpinLock;\r
+  ASSERT (LockValue == SPIN_LOCK_ACQUIRED || LockValue == SPIN_LOCK_RELEASED);\r
+\r
+  _ReadWriteBarrier ();\r
+  Result = InterlockedCompareExchangePointer (\r
+             (VOID**)SpinLock,\r
+             (VOID*)SPIN_LOCK_RELEASED,\r
+             (VOID*)SPIN_LOCK_ACQUIRED\r
+           );\r
+\r
+  _ReadWriteBarrier ();\r
+  return (BOOLEAN) (Result == (VOID*) SPIN_LOCK_RELEASED);\r
+}\r
+\r
+/**\r
+  Releases a spin lock.\r
+\r
+  This function places the spin lock specified by SpinLock in the release state\r
+  and returns SpinLock.\r
+\r
+  If SpinLock is NULL, then ASSERT().\r
+  If SpinLock was not initialized with InitializeSpinLock(), then ASSERT().\r
+\r
+  @param  SpinLock  A pointer to the spin lock to release.\r
+\r
+  @return SpinLock\r
+\r
+**/\r
+SPIN_LOCK *\r
+EFIAPI\r
+ReleaseSpinLock (\r
+  IN OUT  SPIN_LOCK                 *SpinLock\r
+  )\r
+{\r
+  SPIN_LOCK    LockValue;\r
+\r
+  ASSERT (SpinLock != NULL);\r
+\r
+  LockValue = *SpinLock;\r
+  ASSERT (LockValue == SPIN_LOCK_ACQUIRED || LockValue == SPIN_LOCK_RELEASED);\r
+\r
+  _ReadWriteBarrier ();\r
+  *SpinLock = SPIN_LOCK_RELEASED;\r
+  _ReadWriteBarrier ();\r
+\r
+  return SpinLock;\r
+}\r
+\r
+/**\r
+  Performs an atomic increment of an 32-bit unsigned integer.\r
+\r
+  Performs an atomic increment of the 32-bit unsigned integer specified by\r
+  Value and returns the incremented value. The increment operation must be\r
+  performed using MP safe mechanisms. The state of the return value is not\r
+  guaranteed to be MP safe.\r
+\r
+  If Value is NULL, then ASSERT().\r
+\r
+  @param  Value A pointer to the 32-bit value to increment.\r
+\r
+  @return The incremented value.\r
+\r
+**/\r
+UINT32\r
+EFIAPI\r
+InterlockedIncrement (\r
+  IN      UINT32                    *Value\r
+  )\r
+{\r
+  ASSERT (Value != NULL);\r
+  return InternalSyncIncrement (Value);\r
+}\r
+\r
+/**\r
+  Performs an atomic decrement of an 32-bit unsigned integer.\r
+\r
+  Performs an atomic decrement of the 32-bit unsigned integer specified by\r
+  Value and returns the decremented value. The decrement operation must be\r
+  performed using MP safe mechanisms. The state of the return value is not\r
+  guaranteed to be MP safe.\r
+\r
+  If Value is NULL, then ASSERT().\r
+\r
+  @param  Value A pointer to the 32-bit value to decrement.\r
+\r
+  @return The decremented value.\r
+\r
+**/\r
+UINT32\r
+EFIAPI\r
+InterlockedDecrement (\r
+  IN      UINT32                    *Value\r
+  )\r
+{\r
+  ASSERT (Value != NULL);\r
+  return InternalSyncDecrement (Value);\r
+}\r
+\r
+/**\r
+  Performs an atomic compare exchange operation on a 32-bit unsigned integer.\r
+\r
+  Performs an atomic compare exchange operation on the 32-bit unsigned integer\r
+  specified by Value.  If Value is equal to CompareValue, then Value is set to \r
+  ExchangeValue and CompareValue is returned.  If Value is not equal to CompareValue,\r
+  then Value is returned.  The compare exchange operation must be performed using \r
+  MP safe mechanisms.\r
+\r
+  If Value is NULL, then ASSERT().\r
+\r
+  @param  Value         A pointer to the 32-bit value for the compare exchange\r
+                        operation.\r
+  @param  CompareValue  32-bit value used in compare operation.\r
+  @param  ExchangeValue 32-bit value used in exchange operation.\r
+\r
+  @return The original *Value before exchange.\r
+\r
+**/\r
+UINT32\r
+EFIAPI\r
+InterlockedCompareExchange32 (\r
+  IN OUT  UINT32                    *Value,\r
+  IN      UINT32                    CompareValue,\r
+  IN      UINT32                    ExchangeValue\r
+  )\r
+{\r
+  ASSERT (Value != NULL);\r
+  return InternalSyncCompareExchange32 (Value, CompareValue, ExchangeValue);\r
+}\r
+\r
+/**\r
+  Performs an atomic compare exchange operation on a 64-bit unsigned integer.\r
+\r
+  Performs an atomic compare exchange operation on the 64-bit unsigned integer specified \r
+  by Value.  If Value is equal to CompareValue, then Value is set to ExchangeValue and \r
+  CompareValue is returned.  If Value is not equal to CompareValue, then Value is returned. \r
+  The compare exchange operation must be performed using MP safe mechanisms.\r
+\r
+  If Value is NULL, then ASSERT().\r
+\r
+  @param  Value         A pointer to the 64-bit value for the compare exchange\r
+                        operation.\r
+  @param  CompareValue  64-bit value used in compare operation.\r
+  @param  ExchangeValue 64-bit value used in exchange operation.\r
+\r
+  @return The original *Value before exchange.\r
+\r
+**/\r
+UINT64\r
+EFIAPI\r
+InterlockedCompareExchange64 (\r
+  IN OUT  UINT64                    *Value,\r
+  IN      UINT64                    CompareValue,\r
+  IN      UINT64                    ExchangeValue\r
+  )\r
+{\r
+  ASSERT (Value != NULL);\r
+  return InternalSyncCompareExchange64 (Value, CompareValue, ExchangeValue);\r
+}\r
+\r
+/**\r
+  Performs an atomic compare exchange operation on a pointer value.\r
+\r
+  Performs an atomic compare exchange operation on the pointer value specified\r
+  by Value. If Value is equal to CompareValue, then Value is set to\r
+  ExchangeValue and CompareValue is returned. If Value is not equal to\r
+  CompareValue, then Value is returned. The compare exchange operation must be\r
+  performed using MP safe mechanisms.\r
+\r
+  If Value is NULL, then ASSERT().\r
+\r
+  @param  Value         A pointer to the pointer value for the compare exchange\r
+                        operation.\r
+  @param  CompareValue  Pointer value used in compare operation.\r
+  @param  ExchangeValue Pointer value used in exchange operation.\r
+\r
+**/\r
+VOID *\r
+EFIAPI\r
+InterlockedCompareExchangePointer (\r
+  IN OUT  VOID                      **Value,\r
+  IN      VOID                      *CompareValue,\r
+  IN      VOID                      *ExchangeValue\r
+  )\r
+{\r
+  UINT8  SizeOfValue;\r
+\r
+  SizeOfValue = sizeof (*Value);\r
+\r
+  switch (SizeOfValue) {\r
+    case sizeof (UINT32):\r
+      return (VOID*)(UINTN)InterlockedCompareExchange32 (\r
+                             (UINT32*)Value,\r
+                             (UINT32)(UINTN)CompareValue,\r
+                             (UINT32)(UINTN)ExchangeValue\r
+                             );\r
+    case sizeof (UINT64):\r
+      return (VOID*)(UINTN)InterlockedCompareExchange64 (\r
+                             (UINT64*)Value,\r
+                             (UINT64)(UINTN)CompareValue,\r
+                             (UINT64)(UINTN)ExchangeValue\r
+                             );\r
+    default:\r
+      ASSERT (FALSE);\r
+      return NULL;\r
+  }\r
+}\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S
new file mode 100644 (file)
index 0000000..710006b
--- /dev/null
@@ -0,0 +1,25 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   CpuBreakpoint.S
+#
+# Abstract:
+#
+#   Implementation of CpuBreakpoint() on x86_64
+#
+#------------------------------------------------------------------------------
+
+.global _CpuBreakpoint
+_CpuBreakpoint:
+       int $0x3
+       ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S
new file mode 100644 (file)
index 0000000..98d7faa
--- /dev/null
@@ -0,0 +1,60 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   CpuId.S
+#
+# Abstract:
+#
+#   AsmCpuid function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+#  VOID
+#  EFIAPI
+#  AsmCpuid (
+#    IN   UINT32  RegisterInEax,
+#    OUT  UINT32  *RegisterOutEax  OPTIONAL,
+#    OUT  UINT32  *RegisterOutEbx  OPTIONAL,
+#    OUT  UINT32  *RegisterOutEcx  OPTIONAL,
+#    OUT  UINT32  *RegisterOutEdx  OPTIONAL
+#    )
+#------------------------------------------------------------------------------
+.global _AsmCpuid;
+_AsmCpuid:
+    push    %rbx
+    mov     %ecx, %eax
+    push    %rax                         # save Index on stack
+    push    %rdx
+    cpuid
+    test    %r9, %r9
+    jz      L1
+    mov     %ecx, (%r9)
+L1:
+    pop     %rcx
+    jrcxz   L2
+    mov     %eax, (%rcx)
+L2:
+    mov     %r8, %rcx
+    jrcxz   L3
+    mov     %ebx, (%rcx)
+L3:
+    mov     0x38(%rsp), %rcx
+    jrcxz   L4
+    mov     %edx, (%rcx)
+L4:
+    pop     %rax                         # restore Index to rax as return value
+    pop     %rbx
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S
new file mode 100644 (file)
index 0000000..e5317e0
--- /dev/null
@@ -0,0 +1,62 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   CpuIdEx.Asm
+#
+# Abstract:
+#
+#   AsmCpuidEx function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+#  UINT32
+#  EFIAPI
+#  AsmCpuidEx (
+#    IN   UINT32  RegisterInEax,
+#    IN   UINT32  RegisterInEcx,
+#    OUT  UINT32  *RegisterOutEax  OPTIONAL,
+#    OUT  UINT32  *RegisterOutEbx  OPTIONAL,
+#    OUT  UINT32  *RegisterOutEcx  OPTIONAL,
+#    OUT  UINT32  *RegisterOutEdx  OPTIONAL
+#    )
+#------------------------------------------------------------------------------
+.global _AsmCpuidEx
+_AsmCpuidEx:
+    push    %rbx
+    movl    %ecx,%eax
+    movl    %edx,%ecx
+    push    %rax
+    cpuid
+    mov     0x38(%rsp), %r10
+    test    %r10, %r10
+    jz      L1
+    mov     %ecx,(%r10)
+L1: 
+    mov     %r8, %rcx
+    jrcxz   L2
+    movl    %eax,(%rcx)
+L2: 
+    mov     %r9, %rcx
+    jrcxz   L3
+    mov     %ebx, (%rcx)
+L3: 
+    mov     0x40(%rsp), %rcx
+    jrcxz   L4
+    mov     %edx, (%rcx)
+L4: 
+    pop     %rax
+    pop     %rbx
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S
new file mode 100644 (file)
index 0000000..0ecaa85
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   CpuPause.S\r
+#\r
+# Abstract:\r
+#\r
+#   CpuPause function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuPause (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.global _CpuPause;\r
+_CpuPause:\r
+    pause\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S
new file mode 100644 (file)
index 0000000..681e4c1
--- /dev/null
@@ -0,0 +1,34 @@
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   CpuSleep.S\r
+#\r
+# Abstract:\r
+#\r
+#   CpuSleep function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuSleep (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.global _CpuSleep;\r
+_CpuSleep:\r
+    hlt\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S
new file mode 100644 (file)
index 0000000..da16886
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   DisableInterrupts.S\r
+#\r
+# Abstract:\r
+#\r
+#   DisableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# DisableInterrupts (\r
+#   VOID\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.global _DisableInterrupts;\r
+_DisableInterrupts:\r
+    cli\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S
new file mode 100644 (file)
index 0000000..d23313d
--- /dev/null
@@ -0,0 +1,66 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   DisablePaging64.S
+#
+# Abstract:
+#
+#   AsmDisablePaging64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+    
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86DisablePaging64 (
+#   IN      UINT16                    Cs,                      %rdi
+#   IN      UINT64                    EntryPoint,              %rsi
+#   IN      UINT64                    Context1,  OPTIONAL      %rdx
+#   IN      UINT32                    Context2,  OPTIONAL      %rcx
+#   IN      UINT64                    NewStack                 %r8
+#   );
+#------------------------------------------------------------------------------
+
+.global _InternalX86DisablePaging64
+_InternalX86DisablePaging64:
+    cli    
+    shl    $0x20,%rcx
+    lea    (%rip), %eax
+    mov    %eax,%ecx
+    push   %rcx
+    mov    %edx,%ebx
+    mov    %r8d,%esi
+    mov    %r9d,%edi
+    mov    0x28(%rsp),%eax
+    lret   
+L1:
+    mov    %eax,%esp
+    mov    %cr0,%rax
+    btr    $0x1f,%eax
+    mov    %rax,%cr0
+    mov    $0xc0000080,%ecx
+    rdmsr  
+    and    $0xfe,%ah
+    wrmsr  
+    mov    %cr4,%rax
+    and    $0xdf,%al
+    mov    %rax,%cr4
+    push   %rdi
+    push   %rsi
+    callq  *%rbx
+    jmp    .
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S
new file mode 100644 (file)
index 0000000..581b7bb
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   EnableDisableInterrupts.S
+#
+# Abstract:
+#
+#   EnableDisableInterrupts function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# EnableDisableInterrupts (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _EnableDisableInterrupts;
+.align 16;
+_EnableDisableInterrupts:
+    sti
+    cli
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S
new file mode 100644 (file)
index 0000000..b81bcd0
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   EnableInterrupts.S
+#
+# Abstract:
+#
+#   EnableInterrupts function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# EnableInterrupts (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _EnableInterrupts;
+_EnableInterrupts:
+    sti
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S
new file mode 100644 (file)
index 0000000..15209c0
--- /dev/null
@@ -0,0 +1,61 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   EnablePaging64.S
+#
+# Abstract:
+#
+#   AsmEnablePaging64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86EnablePaging64 (
+#   IN      UINT16                    Cs,                      %rdi
+#   IN      UINT64                    EntryPoint,              %rsi
+#   IN      UINT64                    Context1,  OPTIONAL      %rdx
+#   IN      UINT64                    Context2,  OPTIONAL      %rcx
+#   IN      UINT64                    NewStack                 %r8
+#   );
+#------------------------------------------------------------------------------
+.global _InternalX86EnablePaging64;
+_InternalX86EnablePaging64:
+    cli    
+    pop    %rax
+    callq  Base
+Base:
+    addl   $(L1-Base),(%rsp)
+    mov    %cr4,%rax
+    or     $0x20,%al
+    mov    %rax,%cr4
+    mov    $0xc0000080,%ecx
+    rdmsr  
+    or     $0x1,%ah
+    wrmsr  
+    mov    %cr0,%rax
+    bts    $0x1f,%eax
+    mov    %rax,%cr0
+    lret   
+L1:
+    addr32 mov (%esp),%rbx
+    addr32 mov 0x8(%esp),%rcx
+    addr32 mov 0x10(%esp),%rdx
+    addr32 mov 0x18(%esp),%rsp
+    add    $-0x20,%rsp
+    callq  *%rbx
+    jmp    .
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S
new file mode 100644 (file)
index 0000000..4c5a52f
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   FlushCacheLine.S
+#
+# Abstract:
+#
+#   AsmFlushCacheLine function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID *
+# EFIAPI 
+# AsmFlushCacheLine (
+#   IN      VOID                      *LinearAddress
+#   );
+#------------------------------------------------------------------------------
+.global _AsmFlushCacheLine;
+_AsmFlushCacheLine:
+    clflush (%rdi)
+    mov     %rdi, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S
new file mode 100644 (file)
index 0000000..cc9750c
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   FxRestore.S
+#
+# Abstract:
+#
+#   AsmFxRestore function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86FxRestore (
+#   IN CONST IA32_FX_BUFFER *Buffer
+#   )#
+#------------------------------------------------------------------------------
+.global _InternalX86FxRestore;
+_InternalX86FxRestore:
+    fxrstor (%rcx)
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S
new file mode 100644 (file)
index 0000000..432d7b9
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   FxSave.S
+#
+# Abstract:
+#
+#   AsmFxSave function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86FxSave (
+#   OUT IA32_FX_BUFFER *Buffer
+#   );
+#------------------------------------------------------------------------------
+.global _InternalX86FxSave;
+_InternalX86FxSave:
+    fxsave  (%rcx)
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S
new file mode 100644 (file)
index 0000000..cd85279
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   InterlockedCompareExchange32.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   InterlockedCompareExchange32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InterlockedCompareExchange32 (\r
+#   IN      UINT32                    *Value,\r
+#   IN      UINT32                    CompareValue,\r
+#   IN      UINT32                    ExchangeValue\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.global _InternalSyncCompareExchange32;\r
+_InternalSyncCompareExchange32:\r
+    mov     %edx, %eax\r
+    lock    cmpxchg %r8d, (%rcx)\r
+    ret\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S
new file mode 100644 (file)
index 0000000..ae27964
--- /dev/null
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   InterlockedCompareExchange64.S
+#
+# Abstract:
+#
+#   InterlockedCompareExchange64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InterlockedCompareExchange64 (
+#   IN      UINT64                    *Value,
+#   IN      UINT64                    CompareValue,
+#   IN      UINT64                    ExchangeValue
+#   );
+#------------------------------------------------------------------------------
+.global _InternalSyncCompareExchange64;
+.align 16;
+_InternalSyncCompareExchange64:
+    mov     %rsi, %rax
+    lock    cmpxchg %rdx,(%rdi)
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S
new file mode 100644 (file)
index 0000000..59ca54b
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   InterlockedDecrement.S
+#
+# Abstract:
+#
+#   InterlockedDecrement function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT32
+# EFIAPI
+# InterlockedDecrement (
+#   IN      UINT32                    *Value
+#   );
+#------------------------------------------------------------------------------
+.global _InternalSyncDecrement;
+_InternalSyncDecrement:
+    lock    decl (%rcx)
+    mov     (%rcx), %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S
new file mode 100644 (file)
index 0000000..df4cb97
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   InterlockedIncrement.S
+#
+# Abstract:
+#
+#   InterlockedIncrement function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT32
+# EFIAPI
+# InterlockedIncrement (
+#   IN      UINT32                    *Value
+#   );
+#------------------------------------------------------------------------------
+.global _InternalSyncIncrement;
+_InternalSyncIncrement:
+    lock    incl  (%rcx)
+    mov     (%rcx), %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S
new file mode 100644 (file)
index 0000000..030ae45
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   Invd.S
+#
+# Abstract:
+#
+#   AsmInvd function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmInvd (
+#   VOID
+#   )#
+#------------------------------------------------------------------------------
+.global _AsmInvd;
+_AsmInvd:
+    invd
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S
new file mode 100644 (file)
index 0000000..1a6f859
--- /dev/null
@@ -0,0 +1,42 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+#   LongJump.Asm\r
+#\r
+# Abstract:\r
+#\r
+#   Implementation of _LongJump() on x64.\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalLongJump (\r
+#   IN      BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer,\r
+#   IN      UINTN                     Value\r
+#   );\r
+#------------------------------------------------------------------------------\r
+.global _InternalLongJump\r
+_InternalLongJump:\r
+    mov     (%rcx), %rbx\r
+    mov     0x8(%rcx), %rsp\r
+    mov     0x10(%rcx), %rbp\r
+    mov     0x18(%rcx), %rdi\r
+    mov     0x20(%rcx), %rsi\r
+    mov     0x28(%rcx), %r12\r
+    mov     0x30(%rcx), %r13\r
+    mov     0x38(%rcx), %r14\r
+    mov     0x40(%rcx), %r15\r
+    mov     %rdx, %rax\r
+    jmp     *0x48(%rcx)\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S
new file mode 100644 (file)
index 0000000..13da27d
--- /dev/null
@@ -0,0 +1,41 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   Monitor.S
+#
+# Abstract:
+#
+#   AsmMonitor function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmMonitor (
+#   IN      UINTN                     Eax,
+#   IN      UINTN                     Ecx,
+#   IN      UINTN                     Edx
+#   );
+#------------------------------------------------------------------------------
+.global _AsmMonitor;
+.align 16;
+_AsmMonitor:
+    mov    %ecx,%eax
+    mov    %edx,%ecx
+    mov    %r8d,%edx
+    monitor
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S
new file mode 100644 (file)
index 0000000..a32d004
--- /dev/null
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   Mwait.S
+#
+# Abstract:
+#
+#   AsmMwait function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmMwait (
+#   IN      UINTN                     Eax,
+#   IN      UINTN                     Ecx
+#   );
+#------------------------------------------------------------------------------
+.global _AsmMwait;
+.align 16;
+_AsmMwait:
+    mov    %ecx,%eax
+    mov    %edx,%ecx
+    mwait  %rax,%rcx
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S
new file mode 100644 (file)
index 0000000..fa916d0
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadCr0.S
+#
+# Abstract:
+#
+#   AsmReadCr0 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadCr0 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadCr0;
+.align 16;
+_AsmReadCr0:
+    mov     %cr0, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S
new file mode 100644 (file)
index 0000000..96361be
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadCr2.S
+#
+# Abstract:
+#
+#   AsmReadCr2 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadCr2 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadCr2;
+.align 16;
+_AsmReadCr2:
+    mov     %cr2, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S
new file mode 100644 (file)
index 0000000..480486f
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadCr3.S
+#
+# Abstract:
+#
+#   AsmReadCr3 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadCr3 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadCr3;
+.align 16;
+_AsmReadCr3:
+    mov     %cr3, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S
new file mode 100644 (file)
index 0000000..e89b5cd
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadCr4.S
+#
+# Abstract:
+#
+#   AsmReadCr4 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadCr4 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadCr4;
+.align 16;
+_AsmReadCr4:
+    mov     %cr4, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S
new file mode 100644 (file)
index 0000000..677747b
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadCs.S
+#
+# Abstract:
+#
+#   AsmReadCs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadCs (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadCs;
+.align 16;
+_AsmReadCs:
+    mov     %cs, %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S
new file mode 100644 (file)
index 0000000..1b441c3
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadDr0.S
+#
+# Abstract:
+#
+#   AsmReadDr0 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr0 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadDr0;
+.align 16;
+_AsmReadDr0:
+    mov     %dr0, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S
new file mode 100644 (file)
index 0000000..5151a80
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadDr1.S
+#
+# Abstract:
+#
+#   AsmReadDr1 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr1 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadDr1;
+.align 16;
+_AsmReadDr1:
+    mov     %dr1, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S
new file mode 100644 (file)
index 0000000..f4516af
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadDr2.S
+#
+# Abstract:
+#
+#   AsmReadDr2 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr2 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadDr2;
+.align 16;
+_AsmReadDr2:
+    mov     %dr2, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S
new file mode 100644 (file)
index 0000000..c5c679c
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadDr3.S
+#
+# Abstract:
+#
+#   AsmReadDr3 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr3 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadDr3;
+.align 16;
+_AsmReadDr3:
+    mov     %dr3, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S
new file mode 100644 (file)
index 0000000..f98c9ed
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadDr4.S
+#
+# Abstract:
+#
+#   AsmReadDr4 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr4 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadDr4;
+.align 16;
+_AsmReadDr4:
+    #DB      0fh, 21h, 0e0h
+    mov     %dr4, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S
new file mode 100644 (file)
index 0000000..421f57a
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadDr5.S
+#
+# Abstract:
+#
+#   AsmReadDr5 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr5 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadDr5;
+.align 16;
+_AsmReadDr5:
+    mov        %dr5, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S
new file mode 100644 (file)
index 0000000..6a159d8
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadDr6.S
+#
+# Abstract:
+#
+#   AsmReadDr6 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr6 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadDr6;
+.align 16;
+_AsmReadDr6:
+    mov        %dr6, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S
new file mode 100644 (file)
index 0000000..9ffb09d
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadDr7.S
+#
+# Abstract:
+#
+#   AsmReadDr7 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr7 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadDr7;
+.align 16;
+_AsmReadDr7:
+    mov        %dr7, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S
new file mode 100644 (file)
index 0000000..58bee11
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadDs.S
+#
+# Abstract:
+#
+#   AsmReadDs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadDs (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadDs;
+.align 16;
+_AsmReadDs:
+    movl       %ds, %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S
new file mode 100644 (file)
index 0000000..e895387
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadEflags.S
+#
+# Abstract:
+#
+#   AsmReadEflags function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadEflags (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadEflags;
+.align 16;
+_AsmReadEflags:
+    pushfq
+    pop     %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S
new file mode 100644 (file)
index 0000000..93df650
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadEs.S
+#
+# Abstract:
+#
+#   AsmReadEs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadEs (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadEs;
+.align 16;
+_AsmReadEs:
+    mov     %es, %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S
new file mode 100644 (file)
index 0000000..ff658e1
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadFs.S
+#
+# Abstract:
+#
+#   AsmReadFs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadFs (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadFs;
+.align 16;
+_AsmReadFs:
+    mov     %fs, %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S
new file mode 100644 (file)
index 0000000..c271a02
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadGdtr.S
+#
+# Abstract:
+#
+#   AsmReadGdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86ReadGdtr (
+#   OUT IA32_DESCRIPTOR  *Gdtr
+#   );
+#------------------------------------------------------------------------------
+.global _InternalX86ReadGdtr;
+.align 16;
+_InternalX86ReadGdtr:
+    sgdt  (%rcx)
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S
new file mode 100644 (file)
index 0000000..f92776c
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadGs.S
+#
+# Abstract:
+#
+#   AsmReadGs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadGs (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadGs;
+.align 16;
+_AsmReadGs:
+    mov     %gs, %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S
new file mode 100644 (file)
index 0000000..cd7c09e
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadIdtr.AS
+#
+# Abstract:
+#
+#   AsmReadIdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86ReadIdtr (
+#   OUT     IA32_DESCRIPTOR           *Idtr
+#   );
+#------------------------------------------------------------------------------
+.global _InternalX86ReadIdtr;
+.align 16;
+_InternalX86ReadIdtr:
+    sidt    (%rcx)
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S
new file mode 100644 (file)
index 0000000..fac8e25
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadLdtr.AS
+#
+# Abstract:
+#
+#   AsmReadLdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadLdtr (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadLdtr;
+.align 16;
+_AsmReadLdtr:
+    sldt    %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S
new file mode 100644 (file)
index 0000000..b5912ca
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadMm0.S
+#
+# Abstract:
+#
+#   AsmReadMm0 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm0 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadMm0;
+.align 16;
+_AsmReadMm0:
+    #DB      48h, 0fh, 7eh, 0c0h
+    movd       %mm0, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S
new file mode 100644 (file)
index 0000000..1f26cd4
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadMm1.S
+#
+# Abstract:
+#
+#   AsmReadMm1 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm1 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadMm1;
+.align 16;
+_AsmReadMm1:
+    #DB      48h, 0fh, 7eh, 0c8h
+    movd       %mm1, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S
new file mode 100644 (file)
index 0000000..ef864af
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadMm2.S
+#
+# Abstract:
+#
+#   AsmReadMm2 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm2 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadMm2;
+.align 16;
+_AsmReadMm2:
+    #DB      48h, 0fh, 7eh, 0d0h
+    movd       %mm2, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S
new file mode 100644 (file)
index 0000000..bd76cb2
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadMm3.S
+#
+# Abstract:
+#
+#   AsmReadMm3 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm3 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadMm3;
+.align 16;
+_AsmReadMm3:
+    #DB      48h, 0fh, 7eh, 0d8h
+    movd       %mm3, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S
new file mode 100644 (file)
index 0000000..99d7668
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadMm4.AS
+#
+# Abstract:
+#
+#   AsmReadMm4 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm4 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadMm4;
+.align 16;
+_AsmReadMm4:
+    #DB      48h, 0fh, 7eh, 0e0h
+    movd       %mm4, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S
new file mode 100644 (file)
index 0000000..7a01c53
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadMm5.S
+#
+# Abstract:
+#
+#   AsmReadMm5 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm5 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadMm5;
+.align 16;
+_AsmReadMm5:
+    #DB      48h, 0fh, 7eh, 0e8h
+    movd       %mm5, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S
new file mode 100644 (file)
index 0000000..0c7ea79
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadMm6.S
+#
+# Abstract:
+#
+#   AsmReadMm6 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm6 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadMm6;
+.align 16;
+_AsmReadMm6:
+    #DB      48h, 0fh, 7eh, 0f0h
+    movd       %mm6, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S
new file mode 100644 (file)
index 0000000..68f1dbd
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadMm7.S
+#
+# Abstract:
+#
+#   AsmReadMm7 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm7 (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadMm7;
+.align 16;
+_AsmReadMm7:
+    #DB      48h, 0fh, 7eh, 0f8h
+    movd       %mm7, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S
new file mode 100644 (file)
index 0000000..ac101cd
--- /dev/null
@@ -0,0 +1,38 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadMsr64.S
+#
+# Abstract:
+#
+#   AsmReadMsr64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMsr64 (
+#   IN UINT32  Index
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadMsr64;
+.align 16;
+_AsmReadMsr64:
+    rdmsr                               # edx & eax are zero extended
+    shl     $0x20, %rdx
+    or      %rdx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S
new file mode 100644 (file)
index 0000000..115f633
--- /dev/null
@@ -0,0 +1,38 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadPmc.S
+#
+# Abstract:
+#
+#   AsmReadPmc function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadPmc (
+#   IN UINT32   PmcIndex
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadPmc;
+.align 16;
+_AsmReadPmc:
+    rdpmc
+    shl     $0x20, %rdx
+    or      %rdx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S
new file mode 100644 (file)
index 0000000..a93a703
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadSs.S
+#
+# Abstract:
+#
+#   AsmReadSs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadSs (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadSs;
+.align 16;
+_AsmReadSs:
+    movl     %ss, %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S
new file mode 100644 (file)
index 0000000..5e3146b
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadTr.S
+#
+# Abstract:
+#
+#   AsmReadTr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadTr (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadTr;
+.align 16;
+_AsmReadTr: 
+    str     %eax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S
new file mode 100644 (file)
index 0000000..776ffc2
--- /dev/null
@@ -0,0 +1,38 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   ReadTsc.S
+#
+# Abstract:
+#
+#   AsmReadTsc function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadTsc (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmReadTsc;
+.align 16;
+_AsmReadTsc:
+    rdtsc
+    shl     $0x20, %rdx
+    or      %rdx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S
new file mode 100644 (file)
index 0000000..eaaa43b
--- /dev/null
@@ -0,0 +1,42 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   SetJump.S
+#
+# Abstract:
+#
+#   Implementation of SetJump() on x86_64
+#
+#------------------------------------------------------------------------------
+
+.extern InternalAssertJumpBuffer;
+.global _SetJump;
+_SetJump:
+    push   %rcx
+    add    $0xffffffffffffffe0,%rsp
+    call   _InternalAssertJumpBuffer
+    add    $0x20,%rsp
+    pop    %rcx
+    pop    %rdx
+    mov    %rbx,(%rcx)
+    mov    %rsp,0x8(%rcx)
+    mov    %rbp,0x10(%rcx)
+    mov    %rdi,0x18(%rcx)
+    mov    %rsi,0x20(%rcx)
+    mov    %r12,0x28(%rcx)
+    mov    %r13,0x30(%rcx)
+    mov    %r14,0x38(%rcx)
+    mov    %r15,0x40(%rcx)
+    mov    %rdx,0x48(%rcx)
+    xor    %rax,%rax
+    jmpq   *%rdx
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S
new file mode 100644 (file)
index 0000000..85cdb43
--- /dev/null
@@ -0,0 +1,44 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   SwitchStack.S
+#
+# Abstract:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# Routine Description:
+#
+#   Routine for switching stacks with 1 parameter
+#
+# Arguments:
+#
+#   (rdi) EntryPoint    - Entry point with new stack.
+#   (rsi) Context1      - Parameter1 for entry point.
+#   (rdx)  Context2     - Parameter2 for entry point.
+#   (rcx)  NewStack     - Pointer to new stack.
+#
+# Returns:
+#
+#   None
+#
+#------------------------------------------------------------------------------
+.global _InternalSwitchStack;
+_InternalSwitchStack:
+    mov     %rcx, %rax
+    mov     %rdx, %rcx
+    mov     %r8, %rdx
+    lea     -0x20(%r9), %rsp
+    call    *%rax
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S
new file mode 100644 (file)
index 0000000..3200a09
--- /dev/null
@@ -0,0 +1,298 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006 - 2008, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   Thunk16.S
+#
+# Abstract:
+#
+#   Real mode thunk
+#
+#------------------------------------------------------------------------------
+
+#include <Library/BaseLib.h>
+
+.globl ASM_PFX(m16Start)\r
+.globl ASM_PFX(m16Size)\r
+.globl ASM_PFX(mThunk16Attr)\r
+.globl ASM_PFX(m16Gdt)\r
+.globl ASM_PFX(m16GdtrBase)\r
+.globl ASM_PFX(mTransition)\r
+.globl ASM_PFX(InternalAsmThunk16)\r
+
+# define the structure of IA32_REGS\r
+.equ  _EDI, 0       #size 4\r
+.equ  _ESI, 4       #size 4\r
+.equ  _EBP, 8       #size 4\r
+.equ  _ESP, 12      #size 4\r
+.equ  _EBX, 16      #size 4\r
+.equ  _EDX, 20      #size 4\r
+.equ  _ECX, 24      #size 4\r
+.equ  _EAX, 28      #size 4\r
+.equ  _DS,  32      #size 2\r
+.equ  _ES,  34      #size 2\r
+.equ  _FS,  36      #size 2\r
+.equ  _GS,  38      #size 2\r
+.equ  _EFLAGS, 40   #size 8\r
+.equ  _EIP, 48      #size 4\r
+.equ  _CS, 52       #size 2\r
+.equ  _SS, 54       #size 2\r
+.equ  IA32_REGS_SIZE, 56\r
+
+    .data
+
+ASM_PFX(m16Size):         .word      ASM_PFX(InternalAsmThunk16) - ASM_PFX(m16Start)
+ASM_PFX(mThunk16Attr):    .word      _ThunkAttr - ASM_PFX(m16Start)
+ASM_PFX(m16Gdt):          .word      _NullSeg - ASM_PFX(m16Start)
+ASM_PFX(m16GdtrBase):     .word      _16GdtrBase - ASM_PFX(m16Start)
+ASM_PFX(mTransition):     .word      _EntryPoint - ASM_PFX(m16Start)
+
+    .text
+
+ASM_PFX(m16Start):
+
+SavedGdt:    .space 10
+
+#------------------------------------------------------------------------------
+# _BackFromUserCode() takes control in real mode after 'retf' has been executed
+# by user code. It will be shadowed to somewhere in memory below 1MB.
+#------------------------------------------------------------------------------
+.globl ASM_PFX(BackFromUserCode)
+ASM_PFX(BackFromUserCode):
+    #
+    # The order of saved registers on the stack matches the order they appears
+    # in IA32_REGS structure. This facilitates wrapper function to extract them
+    # into that structure.
+    #
+    # Some instructions for manipulation of segment registers have to be written
+    # in opcode since 64-bit MASM prevents accesses to those registers.
+    #
+    .byte 0x16                          # push ss
+    .byte 0xe                           # push cs
+    .byte 0x66
+    call    @Base                       # push eip
+@Base: 
+    .byte 0x66
+    pushq   $0                          # reserved high order 32 bits of EFlags
+    .byte 0x66, 0x9c                    # pushfd actually
+    cli                                 # disable interrupts
+    push    %gs
+    push    %fs
+    .byte 6                             # push es
+    .byte 0x1e                          # push ds
+    .byte 0x66,0x60                     # pushad
+    .byte 0x66,0xba                     # mov edx, imm32
+_ThunkAttr:  .space  4
+    testb   $THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15, %dl
+    jz      @1
+    movl    $0x15cd2401,%eax            # mov ax, 2401h & int 15h
+    cli                                 # disable interrupts
+    jnc     @2
+@1: 
+    testb   $THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL, %dl
+    jz      @2
+    inb     $0x92,%al
+    orb     $2,%al
+    outb    %al, $0x92                   # deactivate A20M#
+@2: 
+    movl    %ss,%eax
+    lea     IA32_REGS_SIZE(%esp), %bp
+    #
+    # rsi in the following 2 instructions is indeed bp in 16-bit code
+    #
+    movw    %bp, (_ESP - IA32_REGS_SIZE)(%rsi)
+    .byte 0x66
+    movl    (_EIP - IA32_REGS_SIZE)(%rsi), %ebx
+    shlw    $4,%ax                      # shl eax, 4
+    addw    %ax,%bp                     # add ebp, eax
+    movw    %cs,%ax
+    shlw    $4,%ax
+    lea     (@64BitCode - @Base)(%ebx, %eax), %ax
+    .byte 0x66,0x2e,0x89,0x87           # mov cs:[bx + (@64Eip - @Base)], eax
+    .word   @64Eip - @Base
+    .byte 0x66,0xb8                     # mov eax, imm32
+SavedCr4:   .space  4
+    movq    %rax, %cr4
+    #
+    # rdi in the instruction below is indeed bx in 16-bit code
+    #
+    .byte 0x66,0x2e                     # 2eh is "cs:" segment override
+    lgdt    (SavedGdt - @Base)(%rdi)
+    .byte 0x66
+    movl    $0xc0000080,%ecx
+    rdmsr
+    orb     $1,%ah
+    wrmsr
+    .byte 0x66,0xb8                     # mov eax, imm32
+SavedCr0:    .space      4
+    movq    %rax, %cr0
+    .byte 0x66,0xea                     # jmp far cs:@64Bit
+@64Eip:      .space      4
+SavedCs:     .space      2
+@64BitCode: 
+    movq     %r8, %rsp
+    ret
+
+_EntryPoint: .long      ASM_PFX(ToUserCode) - ASM_PFX(m16Start)
+             .word      CODE16
+_16Gdtr:     .word      GDT_SIZE - 1
+_16GdtrBase: .quad      _NullSeg
+_16Idtr:     .word      0x3ff
+             .long      0
+
+#------------------------------------------------------------------------------
+# _ToUserCode() takes control in real mode before passing control to user code.
+# It will be shadowed to somewhere in memory below 1MB.
+#------------------------------------------------------------------------------
+.globl ASM_PFX(ToUserCode)
+ASM_PFX(ToUserCode):
+    movl    %edx,%ss                    # set new segment selectors
+    movl    %edx,%ds
+    movl    %edx,%es
+    movl    %edx,%fs
+    movl    %edx,%gs
+    .byte 0x66
+    movl    $0xc0000080,%ecx
+    movq    %rax, %cr0
+    rdmsr
+    andb    $0b11111110, %ah 
+    wrmsr
+    movq    %rbp, %cr4
+    movl    %esi,%ss                    # set up 16-bit stack segment
+    movw    %bx,%sp                     # set up 16-bit stack pointer
+    .byte 0x66                          # make the following call 32-bit
+    call    @Base1                       # push eip
+@Base1: 
+    popw    %bp                         # ebp <- address of @Base1
+    pushq   (IA32_REGS_SIZE + 2)(%esp)
+    lea     0x0c(%rsi), %eax
+    pushq   %rax
+    lret                                # execution begins at next instruction
+@RealMode: 
+    .byte 0x66,0x2e                     # CS and operand size override
+    lidt    (_16Idtr - @Base1)(%rsi)
+    .byte 0x66,0x61                     # popad
+    .byte 0x1f                          # pop ds
+    .byte 0x7                           # pop es
+    .byte 0x0f, 0xa1                    # pop fs
+    .byte 0x0f, 0xa9                    # pop gs
+    .byte 0x66, 0x9d                    # popfd
+    leaw    4(%esp),%sp                 # skip high order 32 bits of EFlags
+    .byte 0x66                          # make the following retf 32-bit
+    lret                                # transfer control to user code
+
+.equ  CODE16,  ASM_PFX(16Code) - .
+.equ  DATA16,  ASM_PFX(16Data) - .
+.equ  DATA32,  ASM_PFX(32Data) - .
+
+_NullSeg:   .quad      0
+ASM_PFX(16Code):
+            .word -1
+            .word 0
+            .byte 0
+            .byte 0x9b
+            .byte 0x8f                  # 16-bit segment, 4GB limit
+            .byte 0
+ASM_PFX(16Data):
+            .word -1
+            .word 0
+            .byte 0
+            .byte 0x93
+            .byte 0x8f                  # 16-bit segment, 4GB limit
+            .byte 0
+ASM_PFX(32Data):
+            .word -1
+            .word 0
+            .byte 0
+            .byte 0x93
+            .byte 0xcf                  # 16-bit segment, 4GB limit
+            .byte 0
+
+.equ  GDT_SIZE, . - ASM_PFX(NullSeg)
+
+#------------------------------------------------------------------------------
+# IA32_REGISTER_SET *
+# EFIAPI
+# InternalAsmThunk16 (
+#   IN      IA32_REGISTER_SET         *RegisterSet,
+#   IN OUT  VOID                      *Transition
+#   );
+#------------------------------------------------------------------------------
+# MISMATCH: "InternalAsmThunk16  PROC    USES    rbp rbx rsi rdi"
+
+.globl ASM_PFX(InternalAsmThunk16)
+ASM_PFX(InternalAsmThunk16):
+    pushq   %rbp
+    pushq   %rbx
+    pushq   %rsi
+    pushq   %rdi
+    
+    movl    %ds, %r10d                  # r9 ~ r11 are not accessible in 16-bit
+    movl    %es, %r11d                  # so use them for saving seg registers
+    movl    %ss, %r9d
+    .byte   0x0f, 0xa0                  #push   fs
+    .byte   0x0f, 0xa8                  #push   gs
+    movq    %rcx, %rsi
+    movzwl  _SS(%rsi), %r8d
+    movl    _ESP(%rsi), %edi
+    lea     -(IA32_REGS_SIZE + 4)(%edi), %rdi
+    imul    $16, %r8d, %eax 
+    movl    %edi,%ebx                   # ebx <- stack for 16-bit code
+    pushq   $(IA32_REGS_SIZE / 4)
+    addl    %eax,%edi                   # edi <- linear address of 16-bit stack
+    popq    %rcx
+    rep
+    movsl                               # copy RegSet
+    lea     (SavedCr4 - ASM_PFX(m16Start))(%rdx), %ecx
+    movl    %edx,%eax                   # eax <- transition code address
+    andl    $0xf,%edx
+    shll    $12,%eax                    # segment address in high order 16 bits
+    lea     (_BackFromUserCode - ASM_PFX(m16Start))(%rdx), %ax
+    stosl                               # [edi] <- return address of user code
+    sgdt    (SavedGdt - SavedCr4)(%rcx) 
+    sidt    0x38(%rsp)
+    movq    %cr0, %rax
+    movl    %eax, (SavedCr0 - SavedCr4)(%rcx)
+    andl    $0x7ffffffe,%eax            # clear PE, PG bits
+    movq    %cr4, %rbp
+    movl    %ebp, (%rcx)                # save CR4 in SavedCr4
+    andl    $0x300,%ebp                 # clear all but PCE and OSFXSR bits
+    movl    %r8d, %esi                  # esi <- 16-bit stack segment
+    .byte      0x6a, DATA32
+    popq    %rdx
+    lgdt    (_16Gdtr - SavedCr4)(%rcx)
+    movl    %edx,%ss
+    pushfq
+    lea     -8(%rdx), %edx
+    lea     @RetFromRealMode, %r8
+    pushq   %r8
+    movl    %cs, %r8d
+    movw    %r8w, (SavedCs - SavedCr4)(%rcx)
+    movq     %rsp, %r8
+    .byte   0xff, 0x69                  #  jmp (_EntryPoint - SavedCr4)(%rcx)
+    .byte   _EntryPoint - SavedCr4
+@RetFromRealMode: 
+    popfq
+    lidt    0x38(%rsp)
+    lea     -IA32_REGS_SIZE(%rbp), %eax
+    .byte 0x0f, 0xa9                    # pop gs
+    .byte 0x0f, 0xa1                    # pop fs
+    movl    %r9d, %ss
+    movl    %r11d, %es
+    movl    %r10d, %ds
+    
+    popq    %rdi
+    popq    %rsi
+    popq    %rbx
+    popq    %rbp
+
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S
new file mode 100644 (file)
index 0000000..a4b9704
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   Wbinvd.S
+#
+# Abstract:
+#
+#   AsmWbinvd function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWbinvd (
+#   VOID
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWbinvd;
+.align 16;
+_AsmWbinvd:
+    wbinvd
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S
new file mode 100644 (file)
index 0000000..f77dc81
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteCr0.S
+#
+# Abstract:
+#
+#   AsmWriteCr0 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteCr0 (
+#   UINTN  Cr0
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteCr0;
+_AsmWriteCr0:
+    mov    %rcx,%cr0
+    mov    %rcx,%rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S
new file mode 100644 (file)
index 0000000..9fc14c6
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteCr2.S
+#
+# Abstract:
+#
+#   AsmWriteCr2 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteCr2 (
+#   UINTN  Cr2
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteCr2;
+_AsmWriteCr2:
+    mov    %rcx,%cr2
+    mov    %rcx,%rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S
new file mode 100644 (file)
index 0000000..880ed97
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteCr3.S
+#
+# Abstract:
+#
+#   AsmWriteCr3 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteCr3 (
+#   UINTN  Cr3
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteCr3;
+_AsmWriteCr3:
+    mov    %rcx,%cr3
+    mov    %rcx,%rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S
new file mode 100644 (file)
index 0000000..0469363
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteCr4.S
+#
+# Abstract:
+#
+#   AsmWriteCr4 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteCr4 (
+#   UINTN  Cr4
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteCr4;
+_AsmWriteCr4:
+    mov    %rcx,%cr4
+    mov    %rcx,%rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S
new file mode 100644 (file)
index 0000000..080e56a
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteDr0.S
+#
+# Abstract:
+#
+#   AsmWriteDr0 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr0 (
+#   UINTN  Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteDr0;
+.align 16;
+_AsmWriteDr0:
+    mov     %rcx, %dr0
+    mov     %rcx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S
new file mode 100644 (file)
index 0000000..c69b5e2
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteDr1.S
+#
+# Abstract:
+#
+#   AsmWriteDr1 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr1 (
+#   UINTN  Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteDr1;
+.align 16;
+_AsmWriteDr1:
+    mov     %rcx, %dr1
+    mov     %rcx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S
new file mode 100644 (file)
index 0000000..ee4b669
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteDr2.S
+#
+# Abstract:
+#
+#   AsmWriteDr2 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr2 (
+#   UINTN  Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteDr2;
+.align 16;
+_AsmWriteDr2:
+    mov     %rcx, %dr2
+    mov     %rcx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S
new file mode 100644 (file)
index 0000000..bcda6c3
--- /dev/null
@@ -0,0 +1,37 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteDr3.S
+#
+# Abstract:
+#
+#   AsmWriteDr3 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr3 (
+#   UINTN  Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteDr3;
+.align 16;
+_AsmWriteDr3:
+    mov     %rcx, %dr3
+    mov     %rcx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S
new file mode 100644 (file)
index 0000000..b6b4e78
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteDr4.S
+#
+# Abstract:
+#
+#   AsmWriteDr4 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr4 (
+#   IN UINTN Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteDr4;
+_AsmWriteDr4:
+    mov     %rcx, %dr4
+    mov     %rcx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S
new file mode 100644 (file)
index 0000000..7539095
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteDr5.S
+#
+# Abstract:
+#
+#   AsmWriteDr5 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr5 (
+#   IN UINTN Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteDr5;
+_AsmWriteDr5:
+    mov     %rcx, %dr5
+    mov     %rcx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S
new file mode 100644 (file)
index 0000000..8627260
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteDr6.S
+#
+# Abstract:
+#
+#   AsmWriteDr6 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr6 (
+#   IN UINTN Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteDr6;
+_AsmWriteDr6:
+    mov     %rcx, %dr6
+    mov     %rcx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S
new file mode 100644 (file)
index 0000000..8699d95
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteDr7.S
+#
+# Abstract:
+#
+#   AsmWriteDr7 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr7 (
+#   IN UINTN Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteDr7;
+_AsmWriteDr7:
+    mov     %rcx, %dr7
+    mov     %rcx, %rax
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S
new file mode 100644 (file)
index 0000000..1e9d84b
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteGdtr.S
+#
+# Abstract:
+#
+#   AsmWriteGdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86WriteGdtr (
+#   IN      CONST IA32_DESCRIPTOR     *Idtr
+#   );
+#------------------------------------------------------------------------------
+.global _InternalX86WriteGdtr;
+_InternalX86WriteGdtr:
+    lgdt    (%rcx)
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S
new file mode 100644 (file)
index 0000000..feb085f
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteIdtr.S
+#
+# Abstract:
+#
+#   AsmWriteIdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86WriteIdtr (
+#   IN      CONST IA32_DESCRIPTOR     *Idtr
+#   );
+#------------------------------------------------------------------------------
+.global _InternalX86WriteIdtr;
+.align 16;
+_InternalX86WriteIdtr:
+    lidt    (%rcx)
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S
new file mode 100644 (file)
index 0000000..c07ab83
--- /dev/null
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteLdtr.S
+#
+# Abstract:
+#
+#   AsmWriteLdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteLdtr (
+#   IN UINT16 Ldtr
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteLdtr;
+.align 16;
+_AsmWriteLdtr:
+    lldt    %cx
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S
new file mode 100644 (file)
index 0000000..2d805a1
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteMm0.S
+#
+# Abstract:
+#
+#   AsmWriteMm0 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm0 (
+#   IN UINT64   Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteMm0;
+_AsmWriteMm0:
+    movd       %rcx, %xmm0
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S
new file mode 100644 (file)
index 0000000..ff8162e
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteMm1.S
+#
+# Abstract:
+#
+#   AsmWriteMm1 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm1 (
+#   IN UINT64   Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteMm1;
+_AsmWriteMm1:
+    movd       %rcx, %mm1
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S
new file mode 100644 (file)
index 0000000..a98e736
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteMm2.S
+#
+# Abstract:
+#
+#   AsmWriteMm2 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm2 (
+#   IN UINT64   Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteMm2; 
+_AsmWriteMm2:
+    movd       %rcx, %mm2
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S
new file mode 100644 (file)
index 0000000..81561e3
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteMm3.S
+#
+# Abstract:
+#
+#   AsmWriteMm3 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm3 (
+#   IN UINT64   Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteMm3;
+_AsmWriteMm3:
+    movd       %rcx, %mm3
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S
new file mode 100644 (file)
index 0000000..124d946
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteMm4.S
+#
+# Abstract:
+#
+#   AsmWriteMm4 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm4 (
+#   IN UINT64   Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteMm4;
+_AsmWriteMm4:
+    movd       %rcx, %mm4
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S
new file mode 100644 (file)
index 0000000..0935ddc
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteMm5.S
+#
+# Abstract:
+#
+#   AsmWriteMm5 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm5 (
+#   IN UINT64   Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteMm5;
+_AsmWriteMm5:
+    movd       %rcx, %mm5
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S
new file mode 100644 (file)
index 0000000..02b50cf
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteMm6.S
+#
+# Abstract:
+#
+#   AsmWriteMm6 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm6 (
+#   IN UINT64   Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteMm6;
+_AsmWriteMm6:
+    movd       %rcx, %mm6
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S
new file mode 100644 (file)
index 0000000..6029272
--- /dev/null
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteMm7.S
+#
+# Abstract:
+#
+#   AsmWriteMm7 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm7 (
+#   IN UINT64   Value
+#   );
+#------------------------------------------------------------------------------
+.global _AsmWriteMm7;
+_AsmWriteMm7:
+    movd       %rcx, %mm7
+    ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S
new file mode 100644 (file)
index 0000000..88ff48b
--- /dev/null
@@ -0,0 +1,40 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   WriteMsr64.S
+#
+# Abstract:
+#
+#   AsmWriteMsr64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmWriteMsr64 (
+#   IN UINT32  Index,
+#   IN UINT64  Value
+#   );
+# TODO:
+#------------------------------------------------------------------------------
+.global _AsmWriteMsr64;
+.align 16;
+_AsmWriteMsr64:
+    mov        %rdx, %rax
+    shr $0x20, %rdx
+    wrmsr
+    ret