├── .gitignore
├── Bios
├── Override
│ └── Vlv2BinaryPkg
│ │ ├── X64DEBUG
│ │ ├── IA32
│ │ │ ├── MemoryInit.efi
│ │ │ └── PeiSmmAccess.efi
│ │ └── X64
│ │ │ └── SmmAccess.efi
│ │ └── X64RELEASE
│ │ ├── IA32
│ │ ├── MemoryInit.efi
│ │ └── PeiSmmAccess.efi
│ │ └── X64
│ │ └── SmmAccess.efi
├── StmCpuPkg
│ ├── Contributions.txt
│ ├── Include
│ │ ├── AcpiCpuData.h
│ │ ├── CpuHotPlugData.h
│ │ ├── Guid
│ │ │ └── MsegSmram.h
│ │ ├── Library
│ │ │ ├── SmmCpuFeaturesLib.h
│ │ │ └── SmmCpuPlatformHookLib.h
│ │ ├── Protocol
│ │ │ ├── SmMonitorInit.h
│ │ │ └── SmmCpuService.h
│ │ ├── Register
│ │ │ ├── Cpuid.h
│ │ │ └── SmramSaveStateMap.h
│ │ └── StmApi.h
│ ├── Library
│ │ ├── SmmCpuFeaturesLib
│ │ │ ├── SmmCpuFeaturesLib.c
│ │ │ ├── SmmCpuFeaturesLib.inf
│ │ │ └── SmmCpuFeaturesLib.uni
│ │ └── SmmCpuPlatformHookLibNull
│ │ │ ├── SmmCpuPlatformHookLibNull.c
│ │ │ ├── SmmCpuPlatformHookLibNull.inf
│ │ │ └── SmmCpuPlatformHookLibNull.uni
│ ├── License.txt
│ ├── PiSmmCpuDxeSmm
│ │ ├── CpuS3.c
│ │ ├── CpuService.c
│ │ ├── CpuService.h
│ │ ├── Ia32
│ │ │ ├── MpFuncs.S
│ │ │ ├── MpFuncs.asm
│ │ │ ├── PageTbl.c
│ │ │ ├── Semaphore.c
│ │ │ ├── SmiEntry.S
│ │ │ ├── SmiEntry.asm
│ │ │ ├── SmiException.S
│ │ │ ├── SmiException.asm
│ │ │ ├── SmmFuncsArch.c
│ │ │ ├── SmmInit.S
│ │ │ ├── SmmInit.asm
│ │ │ ├── SmmProfileArch.c
│ │ │ └── SmmProfileArch.h
│ │ ├── MpService.c
│ │ ├── PiSmmCpuDxeSmm.c
│ │ ├── PiSmmCpuDxeSmm.h
│ │ ├── PiSmmCpuDxeSmm.inf
│ │ ├── PiSmmCpuDxeSmm.uni
│ │ ├── PiSmmCpuDxeSmmExtra.uni
│ │ ├── SmmProfile.c
│ │ ├── SmmProfile.h
│ │ ├── SmmProfileInternal.h
│ │ ├── SmmStm.c
│ │ ├── SmmStm.h
│ │ ├── SmramSaveState.c
│ │ ├── SyncTimer.c
│ │ └── X64
│ │ │ ├── MpFuncs.S
│ │ │ ├── MpFuncs.asm
│ │ │ ├── PageTbl.c
│ │ │ ├── Semaphore.c
│ │ │ ├── SmiEntry.S
│ │ │ ├── SmiEntry.asm
│ │ │ ├── SmiException.S
│ │ │ ├── SmiException.asm
│ │ │ ├── SmmFuncsArch.c
│ │ │ ├── SmmInit.S
│ │ │ ├── SmmInit.asm
│ │ │ ├── SmmProfileArch.c
│ │ │ └── SmmProfileArch.h
│ ├── StmCpuPkg.dec
│ └── StmCpuPkg.dsc
└── StmPlatformSamplePkg
│ ├── Compatibility
│ ├── EndOfDxeOnExitPmAuthThunk
│ │ ├── EndOfDxeOnExitPmAuthThunk.c
│ │ ├── EndOfDxeOnExitPmAuthThunk.h
│ │ └── EndOfDxeOnExitPmAuthThunk.inf
│ └── SmmCpuSaveStateProtocolOnSmst2
│ │ ├── SmmCpuSaveStateProtocolOnSmst2.c
│ │ └── SmmCpuSaveStateProtocolOnSmst2.inf
│ ├── Contributions.txt
│ ├── License.txt
│ ├── MsegSmramPei
│ ├── MsegSmramPei.c
│ └── MsegSmramPei.inf
│ ├── StmBin
│ ├── X64DEBUG
│ │ └── Stm.bin
│ └── X64RELEASE
│ │ └── Stm.bin
│ ├── StmPlatformSamplePkg.Sample.fdf
│ ├── StmPlatformSamplePkg.dec
│ ├── StmPlatformSamplePkg.dsc
│ ├── StmPlatformSmm
│ ├── StmPlatformResource.c
│ ├── StmPlatformResource.h
│ ├── StmPlatformSmm.c
│ ├── StmPlatformSmm.h
│ └── StmPlatformSmm.inf
│ └── TestBin
│ ├── X64DEBUG
│ ├── Frm.depex
│ ├── Frm.efi
│ ├── Frm.inf
│ ├── FrmLoader.depex
│ ├── FrmLoader.efi
│ ├── FrmLoader.inf
│ ├── FrmLoaderApp.efi
│ ├── StmService.depex
│ ├── StmService.efi
│ └── StmService.inf
│ └── X64RELEASE
│ ├── Frm.depex
│ ├── Frm.efi
│ ├── Frm.inf
│ ├── FrmLoader.depex
│ ├── FrmLoader.efi
│ ├── FrmLoader.inf
│ ├── FrmLoaderApp.efi
│ ├── StmService.depex
│ ├── StmService.efi
│ └── StmService.inf
├── Readme.CMake
├── Readme.STMPE
├── Readme.txt
├── Stm
├── CMakeLists.txt
├── Readme.STMPE.txt
├── Readme.txt
├── StmPkg
│ ├── Contributions.txt
│ ├── Core
│ │ ├── BaseAsm.h
│ │ ├── CMakeLists.txt
│ │ ├── Cpu.c
│ │ ├── CpuDef.h
│ │ ├── Dump.c
│ │ ├── EventLog.c
│ │ ├── Init
│ │ │ ├── CMakeLists.txt
│ │ │ ├── EptInit.c
│ │ │ ├── Ia32
│ │ │ │ ├── AsmStmInit.asm
│ │ │ │ └── AsmStmInit.s
│ │ │ ├── IoInit.c
│ │ │ ├── Memory.c
│ │ │ ├── MsrInit.c
│ │ │ ├── Paging.c
│ │ │ ├── PeVmcsInit.c
│ │ │ ├── Relocate.c
│ │ │ ├── StmInit.c
│ │ │ ├── StmInit.h
│ │ │ ├── VmcsInit.c
│ │ │ └── x64
│ │ │ │ ├── AsmStmInit.S
│ │ │ │ ├── AsmStmInit.asm
│ │ │ │ └── AsmStmInit.s
│ │ ├── PcdData.c
│ │ ├── PcdData.h
│ │ ├── PeStmEpt.h
│ │ ├── Runtime
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Ia32
│ │ │ │ ├── Exception.asm
│ │ │ │ ├── Exception.s
│ │ │ │ ├── PeVmExit.asm
│ │ │ │ ├── SmmException.c
│ │ │ │ ├── SmmStateSyncIa32eGpr.c
│ │ │ │ ├── VmExit.asm
│ │ │ │ └── VmExit.s
│ │ │ ├── PageTable.c
│ │ │ ├── PeApicHandler.c
│ │ │ ├── PeEptHandler.c
│ │ │ ├── PeLoadVm.c
│ │ │ ├── PeLoadVm.h
│ │ │ ├── PePciHandler.c
│ │ │ ├── PeSmiHandler.c
│ │ │ ├── PeSmiVmcallHandler.c
│ │ │ ├── PeSmmBadGuestStateHandler.c
│ │ │ ├── PeSmmCpuidHandler.c
│ │ │ ├── PeSmmCrHandler.c
│ │ │ ├── PeSmmExceptionHandler.c
│ │ │ ├── PeSmmHandler.c
│ │ │ ├── PeSmmIoHandler.c
│ │ │ ├── PeSmmMsrHandler.c
│ │ │ ├── PeSmmPreemptionTimerHandler.c
│ │ │ ├── PeSmmRsmHandler.c
│ │ │ ├── PeSmmTripleFaultHandler.c
│ │ │ ├── PeSmmVmcallHandler.c
│ │ │ ├── PeStm.h
│ │ │ ├── PeVmcsInit.c
│ │ │ ├── PeVmxState.c
│ │ │ ├── SmiEventHandler.c
│ │ │ ├── SmiHandler.c
│ │ │ ├── SmiVmcallHandler.c
│ │ │ ├── SmmCacheHandler.c
│ │ │ ├── SmmCpuidHandler.c
│ │ │ ├── SmmCrHandler.c
│ │ │ ├── SmmEptHandler.c
│ │ │ ├── SmmExceptionHandler.c
│ │ │ ├── SmmHandler.c
│ │ │ ├── SmmIoHandler.c
│ │ │ ├── SmmMp.c
│ │ │ ├── SmmMsrHandler.c
│ │ │ ├── SmmRsmHandler.c
│ │ │ ├── SmmSetup.c
│ │ │ ├── SmmStateSync.c
│ │ │ ├── SmmTaskSwitchHandler.c
│ │ │ ├── SmmTearDown.c
│ │ │ ├── SmmVmcallHandler.c
│ │ │ ├── StmExceptionHandler.c
│ │ │ ├── StmRuntime.h
│ │ │ ├── StmTearDown.c
│ │ │ ├── VmcsMapper.c
│ │ │ ├── VmcsOffsets.h
│ │ │ └── x64
│ │ │ │ ├── Exception.S
│ │ │ │ ├── Exception.asm
│ │ │ │ ├── PeVmExit.S
│ │ │ │ ├── PeVmExit.asm
│ │ │ │ ├── SmmException.c
│ │ │ │ ├── SmmStateSyncIa32eGpr.c
│ │ │ │ ├── VmExit.S
│ │ │ │ └── VmExit.asm
│ │ ├── Stm.h
│ │ ├── Stm.inf
│ │ ├── Stm.lds
│ │ ├── StmPerformance.c
│ │ ├── StmResource.c
│ │ └── VmcsRecord.c
│ ├── EdkII
│ │ ├── BaseTools
│ │ │ ├── Bin
│ │ │ │ ├── CYGWIN_NT-5.1-i686
│ │ │ │ │ ├── BuildEnv
│ │ │ │ │ ├── Trim
│ │ │ │ │ └── build
│ │ │ │ └── Win32
│ │ │ │ │ ├── GenStm.exe
│ │ │ │ │ ├── Trim.exe
│ │ │ │ │ ├── _sqlite3.pyd
│ │ │ │ │ ├── build.exe
│ │ │ │ │ ├── python27.dll
│ │ │ │ │ └── sqlite3.dll
│ │ │ ├── BinWrappers
│ │ │ │ └── PosixLike
│ │ │ │ │ ├── Trim
│ │ │ │ │ └── build
│ │ │ ├── BuildEnv
│ │ │ ├── BuildNotes.txt
│ │ │ ├── Conf
│ │ │ │ ├── ReadMe.txt
│ │ │ │ ├── build_rule.template
│ │ │ │ ├── target.template
│ │ │ │ └── tools_def.template
│ │ │ ├── GNUmakefile
│ │ │ ├── Makefile
│ │ │ ├── ReadMe.txt
│ │ │ ├── Scripts
│ │ │ │ └── GccBase.lds
│ │ │ ├── Source
│ │ │ │ ├── C
│ │ │ │ │ ├── Common
│ │ │ │ │ │ ├── BasePeCoff.c
│ │ │ │ │ │ ├── BinderFuncs.c
│ │ │ │ │ │ ├── BinderFuncs.h
│ │ │ │ │ │ ├── CommonLib.c
│ │ │ │ │ │ ├── CommonLib.h
│ │ │ │ │ │ ├── Compress.h
│ │ │ │ │ │ ├── Crc32.c
│ │ │ │ │ │ ├── Crc32.h
│ │ │ │ │ │ ├── Decompress.c
│ │ │ │ │ │ ├── Decompress.h
│ │ │ │ │ │ ├── EfiCompress.c
│ │ │ │ │ │ ├── EfiUtilityMsgs.c
│ │ │ │ │ │ ├── EfiUtilityMsgs.h
│ │ │ │ │ │ ├── FirmwareVolumeBuffer.c
│ │ │ │ │ │ ├── FirmwareVolumeBufferLib.h
│ │ │ │ │ │ ├── FvLib.c
│ │ │ │ │ │ ├── FvLib.h
│ │ │ │ │ │ ├── GNUmakefile
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── MemoryFile.c
│ │ │ │ │ │ ├── MemoryFile.h
│ │ │ │ │ │ ├── MyAlloc.c
│ │ │ │ │ │ ├── MyAlloc.h
│ │ │ │ │ │ ├── OsPath.c
│ │ │ │ │ │ ├── OsPath.h
│ │ │ │ │ │ ├── ParseGuidedSectionTools.c
│ │ │ │ │ │ ├── ParseGuidedSectionTools.h
│ │ │ │ │ │ ├── ParseInf.c
│ │ │ │ │ │ ├── ParseInf.h
│ │ │ │ │ │ ├── PeCoffLib.h
│ │ │ │ │ │ ├── PeCoffLoaderEx.c
│ │ │ │ │ │ ├── SimpleFileParsing.c
│ │ │ │ │ │ ├── SimpleFileParsing.h
│ │ │ │ │ │ ├── StringFuncs.c
│ │ │ │ │ │ ├── StringFuncs.h
│ │ │ │ │ │ ├── TianoCompress.c
│ │ │ │ │ │ └── WinNtInclude.h
│ │ │ │ │ ├── GNUmakefile
│ │ │ │ │ ├── GenStm
│ │ │ │ │ │ ├── GNUmakefile
│ │ │ │ │ │ ├── GenStm.c
│ │ │ │ │ │ ├── GenStm.exe
│ │ │ │ │ │ ├── GenStm.h
│ │ │ │ │ │ └── Makefile
│ │ │ │ │ ├── Include
│ │ │ │ │ │ ├── Common
│ │ │ │ │ │ │ ├── BaseTypes.h
│ │ │ │ │ │ │ ├── BuildVersion.h
│ │ │ │ │ │ │ ├── MdeModuleHii.h
│ │ │ │ │ │ │ ├── PiFirmwareFile.h
│ │ │ │ │ │ │ ├── PiFirmwareVolume.h
│ │ │ │ │ │ │ ├── UefiBaseTypes.h
│ │ │ │ │ │ │ ├── UefiCapsule.h
│ │ │ │ │ │ │ ├── UefiInternalFormRepresentation.h
│ │ │ │ │ │ │ ├── UefiMultiPhase.h
│ │ │ │ │ │ │ ├── VariableFormat.h
│ │ │ │ │ │ │ └── WorkingBlockHeader.h
│ │ │ │ │ │ ├── Guid
│ │ │ │ │ │ │ ├── FfsSectionAlignmentPadding.h
│ │ │ │ │ │ │ ├── PcAnsi.h
│ │ │ │ │ │ │ └── PiFirmwareFileSystem.h
│ │ │ │ │ │ ├── Ia32
│ │ │ │ │ │ │ └── ProcessorBind.h
│ │ │ │ │ │ ├── IndustryStandard
│ │ │ │ │ │ │ ├── Acpi.h
│ │ │ │ │ │ │ ├── Acpi1_0.h
│ │ │ │ │ │ │ ├── Acpi2_0.h
│ │ │ │ │ │ │ ├── Acpi3_0.h
│ │ │ │ │ │ │ ├── EfiPci.h
│ │ │ │ │ │ │ ├── MemoryMappedConfigurationSpaceAccessTable.h
│ │ │ │ │ │ │ ├── PeImage.h
│ │ │ │ │ │ │ ├── pci22.h
│ │ │ │ │ │ │ ├── pci23.h
│ │ │ │ │ │ │ └── pci30.h
│ │ │ │ │ │ ├── Protocol
│ │ │ │ │ │ │ ├── GraphicsOutput.h
│ │ │ │ │ │ │ ├── GuidedSectionExtraction.h
│ │ │ │ │ │ │ ├── HiiFramework.h
│ │ │ │ │ │ │ └── UgaDraw.h
│ │ │ │ │ │ └── X64
│ │ │ │ │ │ │ └── ProcessorBind.h
│ │ │ │ │ ├── Makefile
│ │ │ │ │ └── Makefiles
│ │ │ │ │ │ ├── NmakeSubdirs.bat
│ │ │ │ │ │ ├── app.makefile
│ │ │ │ │ │ ├── footer.makefile
│ │ │ │ │ │ ├── header.makefile
│ │ │ │ │ │ ├── lib.makefile
│ │ │ │ │ │ ├── ms.app
│ │ │ │ │ │ ├── ms.common
│ │ │ │ │ │ ├── ms.lib
│ │ │ │ │ │ └── ms.rule
│ │ │ │ └── Python
│ │ │ │ │ ├── AutoGen
│ │ │ │ │ ├── AutoGen.py
│ │ │ │ │ ├── BuildEngine.py
│ │ │ │ │ ├── GenC.py
│ │ │ │ │ ├── GenDepex.py
│ │ │ │ │ ├── GenMake.py
│ │ │ │ │ ├── GenPcdDb.py
│ │ │ │ │ ├── InfSectionParser.py
│ │ │ │ │ ├── StrGather.py
│ │ │ │ │ ├── UniClassObject.py
│ │ │ │ │ ├── ValidCheckingInfoObject.py
│ │ │ │ │ └── __init__.py
│ │ │ │ │ ├── Common
│ │ │ │ │ ├── BuildToolError.py
│ │ │ │ │ ├── BuildVersion.py
│ │ │ │ │ ├── DataType.py
│ │ │ │ │ ├── Database.py
│ │ │ │ │ ├── DecClassObject.py
│ │ │ │ │ ├── Dictionary.py
│ │ │ │ │ ├── DscClassObject.py
│ │ │ │ │ ├── EdkIIWorkspace.py
│ │ │ │ │ ├── EdkIIWorkspaceBuild.py
│ │ │ │ │ ├── EdkLogger.py
│ │ │ │ │ ├── Expression.py
│ │ │ │ │ ├── FdfClassObject.py
│ │ │ │ │ ├── FdfParserLite.py
│ │ │ │ │ ├── GlobalData.py
│ │ │ │ │ ├── Identification.py
│ │ │ │ │ ├── InfClassObject.py
│ │ │ │ │ ├── LongFilePathOs.py
│ │ │ │ │ ├── LongFilePathOsPath.py
│ │ │ │ │ ├── LongFilePathSupport.py
│ │ │ │ │ ├── MigrationUtilities.py
│ │ │ │ │ ├── Misc.py
│ │ │ │ │ ├── MultipleWorkspace.py
│ │ │ │ │ ├── Parsing.py
│ │ │ │ │ ├── PyUtility.pyd
│ │ │ │ │ ├── RangeExpression.py
│ │ │ │ │ ├── String.py
│ │ │ │ │ ├── TargetTxtClassObject.py
│ │ │ │ │ ├── ToolDefClassObject.py
│ │ │ │ │ ├── VariableAttributes.py
│ │ │ │ │ ├── VpdInfoFile.py
│ │ │ │ │ └── __init__.py
│ │ │ │ │ ├── CommonDataClass
│ │ │ │ │ ├── CommonClass.py
│ │ │ │ │ ├── DataClass.py
│ │ │ │ │ ├── Exceptions.py
│ │ │ │ │ ├── FdfClass.py
│ │ │ │ │ ├── ModuleClass.py
│ │ │ │ │ ├── PackageClass.py
│ │ │ │ │ ├── PlatformClass.py
│ │ │ │ │ └── __init__.py
│ │ │ │ │ ├── GNUmakefile
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── Trim
│ │ │ │ │ └── Trim.py
│ │ │ │ │ ├── Workspace
│ │ │ │ │ ├── BuildClassObject.py
│ │ │ │ │ ├── MetaDataTable.py
│ │ │ │ │ ├── MetaFileParser.py
│ │ │ │ │ ├── MetaFileTable.py
│ │ │ │ │ ├── WorkspaceDatabase.py
│ │ │ │ │ └── __init__.py
│ │ │ │ │ ├── build
│ │ │ │ │ ├── BuildReport.py
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── build.py
│ │ │ │ │ └── sitecustomize.py
│ │ │ ├── building-gcc.txt
│ │ │ ├── gcc
│ │ │ │ ├── README.txt
│ │ │ │ └── mingw-gcc-build.py
│ │ │ ├── get_vsvars.bat
│ │ │ └── toolsetup.bat
│ │ ├── MdePkg
│ │ │ ├── Include
│ │ │ │ ├── Base.h
│ │ │ │ ├── Ia32
│ │ │ │ │ └── ProcessorBind.h
│ │ │ │ ├── IndustryStandard
│ │ │ │ │ ├── Acpi.h
│ │ │ │ │ ├── Acpi10.h
│ │ │ │ │ ├── Acpi20.h
│ │ │ │ │ ├── Acpi30.h
│ │ │ │ │ ├── Acpi40.h
│ │ │ │ │ ├── MemoryMappedConfigurationSpaceAccessTable.h
│ │ │ │ │ ├── Pci.h
│ │ │ │ │ ├── Pci22.h
│ │ │ │ │ ├── Pci23.h
│ │ │ │ │ ├── Pci30.h
│ │ │ │ │ ├── PciExpress21.h
│ │ │ │ │ └── PeImage.h
│ │ │ │ ├── Library
│ │ │ │ │ ├── BaseLib.h
│ │ │ │ │ ├── BaseMemoryLib.h
│ │ │ │ │ ├── DebugLib.h
│ │ │ │ │ ├── IoLib.h
│ │ │ │ │ ├── PcdLib.h
│ │ │ │ │ ├── PciCf8Lib.h
│ │ │ │ │ ├── PciExpressLib.h
│ │ │ │ │ ├── PciLib.h
│ │ │ │ │ ├── PrintLib.h
│ │ │ │ │ ├── SerialPortLib.h
│ │ │ │ │ └── SynchronizationLib.h
│ │ │ │ ├── Protocol
│ │ │ │ │ └── DebugSupport.h
│ │ │ │ └── X64
│ │ │ │ │ └── ProcessorBind.h
│ │ │ └── Library
│ │ │ │ ├── BaseDebugLibNull
│ │ │ │ ├── BaseDebugLibNull.inf
│ │ │ │ └── DebugLib.c
│ │ │ │ ├── BaseIoLibIntrinsic
│ │ │ │ ├── BaseIoLibIntrinsic.inf
│ │ │ │ ├── BaseIoLibIntrinsicInternal.h
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── IoHighLevel.c
│ │ │ │ ├── IoLib.c
│ │ │ │ ├── IoLibGcc.c
│ │ │ │ ├── IoLibIcc.c
│ │ │ │ ├── IoLibMmioBuffer.c
│ │ │ │ └── IoLibMsc.c
│ │ │ │ ├── BaseLib
│ │ │ │ ├── BaseLib.inf
│ │ │ │ ├── BaseLibInternals.h
│ │ │ │ ├── BitField.c
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── Cpu.c
│ │ │ │ ├── CpuDeadLoop.c
│ │ │ │ ├── DivU64x32.c
│ │ │ │ ├── DivU64x32Remainder.c
│ │ │ │ ├── Ia32
│ │ │ │ │ ├── CpuBreakpoint.asm
│ │ │ │ │ ├── CpuBreakpoint.c
│ │ │ │ │ ├── CpuId.S
│ │ │ │ │ ├── CpuId.asm
│ │ │ │ │ ├── CpuId.c
│ │ │ │ │ ├── CpuIdEx.S
│ │ │ │ │ ├── CpuIdEx.asm
│ │ │ │ │ ├── CpuIdEx.c
│ │ │ │ │ ├── CpuPause.asm
│ │ │ │ │ ├── CpuPause.c
│ │ │ │ │ ├── DisableCache.S
│ │ │ │ │ ├── DisableCache.asm
│ │ │ │ │ ├── DisableCache.c
│ │ │ │ │ ├── DisableInterrupts.asm
│ │ │ │ │ ├── DisableInterrupts.c
│ │ │ │ │ ├── DivU64x32.S
│ │ │ │ │ ├── DivU64x32.asm
│ │ │ │ │ ├── DivU64x32.c
│ │ │ │ │ ├── DivU64x32Remainder.S
│ │ │ │ │ ├── DivU64x32Remainder.asm
│ │ │ │ │ ├── DivU64x32Remainder.c
│ │ │ │ │ ├── EnableCache.S
│ │ │ │ │ ├── EnableCache.asm
│ │ │ │ │ ├── EnableCache.c
│ │ │ │ │ ├── EnableDisableInterrupts.S
│ │ │ │ │ ├── EnableDisableInterrupts.asm
│ │ │ │ │ ├── EnableDisableInterrupts.c
│ │ │ │ │ ├── EnableInterrupts.S
│ │ │ │ │ ├── EnableInterrupts.asm
│ │ │ │ │ ├── EnableInterrupts.c
│ │ │ │ │ ├── FlushCacheLine.asm
│ │ │ │ │ ├── FlushCacheLine.c
│ │ │ │ │ ├── FxRestore.asm
│ │ │ │ │ ├── FxRestore.c
│ │ │ │ │ ├── FxSave.asm
│ │ │ │ │ ├── FxSave.c
│ │ │ │ │ ├── GccInline.c
│ │ │ │ │ ├── Invd.asm
│ │ │ │ │ ├── Invd.c
│ │ │ │ │ ├── LShiftU64.S
│ │ │ │ │ ├── LShiftU64.asm
│ │ │ │ │ ├── LShiftU64.c
│ │ │ │ │ ├── LongJump.S
│ │ │ │ │ ├── LongJump.asm
│ │ │ │ │ ├── LongJump.c
│ │ │ │ │ ├── MultU64x32.S
│ │ │ │ │ ├── MultU64x32.asm
│ │ │ │ │ ├── MultU64x32.c
│ │ │ │ │ ├── Non-existing.c
│ │ │ │ │ ├── RShiftU64.S
│ │ │ │ │ ├── RShiftU64.asm
│ │ │ │ │ ├── RShiftU64.c
│ │ │ │ │ ├── ReadCr0.asm
│ │ │ │ │ ├── ReadCr0.c
│ │ │ │ │ ├── ReadCr2.asm
│ │ │ │ │ ├── ReadCr2.c
│ │ │ │ │ ├── ReadCr3.asm
│ │ │ │ │ ├── ReadCr3.c
│ │ │ │ │ ├── ReadCr4.asm
│ │ │ │ │ ├── ReadCr4.c
│ │ │ │ │ ├── ReadCs.asm
│ │ │ │ │ ├── ReadCs.c
│ │ │ │ │ ├── ReadDr0.asm
│ │ │ │ │ ├── ReadDr0.c
│ │ │ │ │ ├── ReadDr1.asm
│ │ │ │ │ ├── ReadDr1.c
│ │ │ │ │ ├── ReadDr2.asm
│ │ │ │ │ ├── ReadDr2.c
│ │ │ │ │ ├── ReadDr3.asm
│ │ │ │ │ ├── ReadDr3.c
│ │ │ │ │ ├── ReadDr4.asm
│ │ │ │ │ ├── ReadDr4.c
│ │ │ │ │ ├── ReadDr5.asm
│ │ │ │ │ ├── ReadDr5.c
│ │ │ │ │ ├── ReadDr6.asm
│ │ │ │ │ ├── ReadDr6.c
│ │ │ │ │ ├── ReadDr7.asm
│ │ │ │ │ ├── ReadDr7.c
│ │ │ │ │ ├── ReadDs.asm
│ │ │ │ │ ├── ReadDs.c
│ │ │ │ │ ├── ReadEflags.asm
│ │ │ │ │ ├── ReadEflags.c
│ │ │ │ │ ├── ReadEs.asm
│ │ │ │ │ ├── ReadEs.c
│ │ │ │ │ ├── ReadFs.asm
│ │ │ │ │ ├── ReadFs.c
│ │ │ │ │ ├── ReadGdtr.asm
│ │ │ │ │ ├── ReadGdtr.c
│ │ │ │ │ ├── ReadGs.asm
│ │ │ │ │ ├── ReadGs.c
│ │ │ │ │ ├── ReadIdtr.asm
│ │ │ │ │ ├── ReadIdtr.c
│ │ │ │ │ ├── ReadLdtr.asm
│ │ │ │ │ ├── ReadLdtr.c
│ │ │ │ │ ├── ReadMsr64.S
│ │ │ │ │ ├── ReadMsr64.asm
│ │ │ │ │ ├── ReadMsr64.c
│ │ │ │ │ ├── ReadSs.S
│ │ │ │ │ ├── ReadSs.asm
│ │ │ │ │ ├── ReadSs.c
│ │ │ │ │ ├── ReadTr.S
│ │ │ │ │ ├── ReadTr.asm
│ │ │ │ │ ├── ReadTr.c
│ │ │ │ │ ├── ReadTsc.asm
│ │ │ │ │ ├── ReadTsc.c
│ │ │ │ │ ├── SetJump.S
│ │ │ │ │ ├── SetJump.asm
│ │ │ │ │ ├── SetJump.c
│ │ │ │ │ ├── Wbinvd.asm
│ │ │ │ │ ├── Wbinvd.c
│ │ │ │ │ ├── WriteCr0.asm
│ │ │ │ │ ├── WriteCr0.c
│ │ │ │ │ ├── WriteCr2.asm
│ │ │ │ │ ├── WriteCr2.c
│ │ │ │ │ ├── WriteCr3.asm
│ │ │ │ │ ├── WriteCr3.c
│ │ │ │ │ ├── WriteCr4.asm
│ │ │ │ │ ├── WriteCr4.c
│ │ │ │ │ ├── WriteDr0.asm
│ │ │ │ │ ├── WriteDr0.c
│ │ │ │ │ ├── WriteDr1.asm
│ │ │ │ │ ├── WriteDr1.c
│ │ │ │ │ ├── WriteDr2.asm
│ │ │ │ │ ├── WriteDr2.c
│ │ │ │ │ ├── WriteDr3.asm
│ │ │ │ │ ├── WriteDr3.c
│ │ │ │ │ ├── WriteDr4.asm
│ │ │ │ │ ├── WriteDr4.c
│ │ │ │ │ ├── WriteDr5.asm
│ │ │ │ │ ├── WriteDr5.c
│ │ │ │ │ ├── WriteDr6.asm
│ │ │ │ │ ├── WriteDr6.c
│ │ │ │ │ ├── WriteDr7.asm
│ │ │ │ │ ├── WriteDr7.c
│ │ │ │ │ ├── WriteGdtr.asm
│ │ │ │ │ ├── WriteGdtr.c
│ │ │ │ │ ├── WriteIdtr.asm
│ │ │ │ │ ├── WriteIdtr.c
│ │ │ │ │ ├── WriteLdtr.asm
│ │ │ │ │ ├── WriteLdtr.c
│ │ │ │ │ ├── WriteMsr64.S
│ │ │ │ │ ├── WriteMsr64.asm
│ │ │ │ │ └── WriteMsr64.c
│ │ │ │ ├── LShiftU64.c
│ │ │ │ ├── LongJump.c
│ │ │ │ ├── Math64.c
│ │ │ │ ├── MultU64x32.c
│ │ │ │ ├── RShiftU64.c
│ │ │ │ ├── SetJump.c
│ │ │ │ ├── String.c
│ │ │ │ ├── SwapBytes16.c
│ │ │ │ ├── SwapBytes32.c
│ │ │ │ ├── Unaligned.c
│ │ │ │ ├── X64
│ │ │ │ │ ├── CpuBreakpoint.S
│ │ │ │ │ ├── CpuBreakpoint.asm
│ │ │ │ │ ├── CpuBreakpoint.c
│ │ │ │ │ ├── CpuId.S
│ │ │ │ │ ├── CpuId.asm
│ │ │ │ │ ├── CpuId.s
│ │ │ │ │ ├── CpuIdEx.S
│ │ │ │ │ ├── CpuIdEx.asm
│ │ │ │ │ ├── CpuIdEx.s
│ │ │ │ │ ├── CpuPause.asm
│ │ │ │ │ ├── DisableCache.S
│ │ │ │ │ ├── DisableCache.asm
│ │ │ │ │ ├── DisableInterrupts.asm
│ │ │ │ │ ├── EnableCache.S
│ │ │ │ │ ├── EnableCache.asm
│ │ │ │ │ ├── EnableDisableInterrupts.S
│ │ │ │ │ ├── EnableDisableInterrupts.asm
│ │ │ │ │ ├── EnableInterrupts.asm
│ │ │ │ │ ├── FlushCacheLine.asm
│ │ │ │ │ ├── FxRestore.asm
│ │ │ │ │ ├── FxSave.asm
│ │ │ │ │ ├── GccInline.c
│ │ │ │ │ ├── Invd.asm
│ │ │ │ │ ├── LongJump.S
│ │ │ │ │ ├── LongJump.asm
│ │ │ │ │ ├── LongJump.s
│ │ │ │ │ ├── Non-existing.c
│ │ │ │ │ ├── ReadCr0.asm
│ │ │ │ │ ├── ReadCr2.asm
│ │ │ │ │ ├── ReadCr3.asm
│ │ │ │ │ ├── ReadCr4.asm
│ │ │ │ │ ├── ReadCs.asm
│ │ │ │ │ ├── ReadDr0.asm
│ │ │ │ │ ├── ReadDr1.asm
│ │ │ │ │ ├── ReadDr2.asm
│ │ │ │ │ ├── ReadDr3.asm
│ │ │ │ │ ├── ReadDr4.asm
│ │ │ │ │ ├── ReadDr5.asm
│ │ │ │ │ ├── ReadDr6.asm
│ │ │ │ │ ├── ReadDr7.asm
│ │ │ │ │ ├── ReadDs.asm
│ │ │ │ │ ├── ReadEflags.asm
│ │ │ │ │ ├── ReadEs.asm
│ │ │ │ │ ├── ReadFs.asm
│ │ │ │ │ ├── ReadGdtr.asm
│ │ │ │ │ ├── ReadGs.asm
│ │ │ │ │ ├── ReadIdtr.asm
│ │ │ │ │ ├── ReadLdtr.asm
│ │ │ │ │ ├── ReadMsr64.asm
│ │ │ │ │ ├── ReadMsr64.c
│ │ │ │ │ ├── ReadSs.asm
│ │ │ │ │ ├── ReadTr.asm
│ │ │ │ │ ├── ReadTsc.asm
│ │ │ │ │ ├── SetJump.S
│ │ │ │ │ ├── SetJump.asm
│ │ │ │ │ ├── SetJump.s
│ │ │ │ │ ├── Wbinvd.S
│ │ │ │ │ ├── Wbinvd.asm
│ │ │ │ │ ├── WriteCr0.asm
│ │ │ │ │ ├── WriteCr2.asm
│ │ │ │ │ ├── WriteCr3.asm
│ │ │ │ │ ├── WriteCr4.asm
│ │ │ │ │ ├── WriteDr0.asm
│ │ │ │ │ ├── WriteDr1.asm
│ │ │ │ │ ├── WriteDr2.asm
│ │ │ │ │ ├── WriteDr3.asm
│ │ │ │ │ ├── WriteDr4.asm
│ │ │ │ │ ├── WriteDr5.asm
│ │ │ │ │ ├── WriteDr6.asm
│ │ │ │ │ ├── WriteDr7.asm
│ │ │ │ │ ├── WriteGdtr.asm
│ │ │ │ │ ├── WriteIdtr.asm
│ │ │ │ │ ├── WriteLdtr.asm
│ │ │ │ │ ├── WriteMsr64.asm
│ │ │ │ │ └── WriteMsr64.c
│ │ │ │ ├── X86FxRestore.c
│ │ │ │ ├── X86FxSave.c
│ │ │ │ ├── X86GetInterruptState.c
│ │ │ │ ├── X86MemoryFence.c
│ │ │ │ ├── X86Msr.c
│ │ │ │ ├── X86ReadGdtr.c
│ │ │ │ ├── X86ReadIdtr.c
│ │ │ │ ├── X86WriteGdtr.c
│ │ │ │ └── X86WriteIdtr.c
│ │ │ │ ├── BaseMemoryLib
│ │ │ │ ├── BaseMemoryLib.inf
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── CompareMemWrapper.c
│ │ │ │ ├── CopyMem.c
│ │ │ │ ├── CopyMemWrapper.c
│ │ │ │ ├── MemLibGeneric.c
│ │ │ │ ├── MemLibGuid.c
│ │ │ │ ├── MemLibInternals.h
│ │ │ │ ├── ScanMem16Wrapper.c
│ │ │ │ ├── ScanMem32Wrapper.c
│ │ │ │ ├── ScanMem64Wrapper.c
│ │ │ │ ├── ScanMem8Wrapper.c
│ │ │ │ ├── SetMem.c
│ │ │ │ ├── SetMem16Wrapper.c
│ │ │ │ ├── SetMem32Wrapper.c
│ │ │ │ ├── SetMem64Wrapper.c
│ │ │ │ ├── SetMemWrapper.c
│ │ │ │ └── ZeroMemWrapper.c
│ │ │ │ ├── BasePcdLibNull
│ │ │ │ ├── BasePcdLibNull.inf
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ └── PcdLib.c
│ │ │ │ ├── BasePciCf8Lib
│ │ │ │ ├── BasePciCf8Lib.inf
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ └── PciCf8Lib.c
│ │ │ │ ├── BasePciExpressLib
│ │ │ │ ├── BasePciExpressLib.inf
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ └── PciExpressLib.c
│ │ │ │ ├── BasePciLibCf8
│ │ │ │ ├── BasePciLibCf8.inf
│ │ │ │ └── PciLib.c
│ │ │ │ ├── BasePciLibPciExpress
│ │ │ │ ├── BasePciLibPciExpress.inf
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ └── PciLib.c
│ │ │ │ └── BasePrintLib
│ │ │ │ ├── BasePrintLib.inf
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── PrintLib.c
│ │ │ │ ├── PrintLibInternal.c
│ │ │ │ └── PrintLibInternal.h
│ │ ├── PcAtChipsetPkg
│ │ │ └── Library
│ │ │ │ └── SerialIoLib
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── SerialIoLib.inf
│ │ │ │ └── SerialPortLib.c
│ │ ├── edksetup.bat
│ │ └── edksetup.sh
│ ├── Include
│ │ ├── Ia32
│ │ │ └── CpuArchSpecific.h
│ │ ├── Library
│ │ │ ├── Smx.h
│ │ │ ├── StmLib.h
│ │ │ ├── StmPlatformLib.h
│ │ │ └── Vmx.h
│ │ ├── StmApi.h
│ │ └── x64
│ │ │ └── CpuArchSpecific.h
│ ├── Library
│ │ ├── MpSafeDebugLibSerialPort
│ │ │ ├── CMakeLists.txt
│ │ │ ├── DebugLib.c
│ │ │ └── MpSafeDebugLibSerialPort.inf
│ │ ├── SimpleSynchronizationLib
│ │ │ ├── BaseSynchronizationLibInternals.h
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Ia32
│ │ │ │ ├── GccInline.c
│ │ │ │ ├── InterlockedCompareExchange32.asm
│ │ │ │ ├── InterlockedCompareExchange32.c
│ │ │ │ ├── InterlockedCompareExchange64.asm
│ │ │ │ ├── InterlockedCompareExchange64.c
│ │ │ │ ├── InterlockedDecrement.asm
│ │ │ │ ├── InterlockedDecrement.c
│ │ │ │ ├── InterlockedIncrement.asm
│ │ │ │ └── InterlockedIncrement.c
│ │ │ ├── SimpleSynchronizationLib.inf
│ │ │ ├── Synchronization.c
│ │ │ ├── SynchronizationGcc.c
│ │ │ ├── SynchronizationMsc.c
│ │ │ └── X64
│ │ │ │ ├── GccInline.c
│ │ │ │ ├── InterlockedCompareExchange32.asm
│ │ │ │ ├── InterlockedCompareExchange32.c
│ │ │ │ ├── InterlockedCompareExchange64.asm
│ │ │ │ ├── InterlockedCompareExchange64.c
│ │ │ │ ├── InterlockedDecrement.asm
│ │ │ │ ├── InterlockedDecrement.c
│ │ │ │ ├── InterlockedIncrement.asm
│ │ │ │ └── InterlockedIncrement.c
│ │ ├── StmLib
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Ia32
│ │ │ │ ├── AsmInvEpt.asm
│ │ │ │ ├── AsmInvEpt.s
│ │ │ │ ├── AsmInvVpid.asm
│ │ │ │ ├── AsmInvVpid.s
│ │ │ │ ├── AsmSendInt2.asm
│ │ │ │ ├── AsmTestAndReset.asm
│ │ │ │ ├── AsmTestAndReset.s
│ │ │ │ ├── AsmTestAndSet.asm
│ │ │ │ ├── AsmTestAndSet.s
│ │ │ │ ├── AsmVmCall.asm
│ │ │ │ ├── AsmVmCall.s
│ │ │ │ ├── AsmVmClear.asm
│ │ │ │ ├── AsmVmClear.s
│ │ │ │ ├── AsmVmLaunch.asm
│ │ │ │ ├── AsmVmLaunch.s
│ │ │ │ ├── AsmVmPtrLoad.asm
│ │ │ │ ├── AsmVmPtrLoad.s
│ │ │ │ ├── AsmVmPtrStore.asm
│ │ │ │ ├── AsmVmPtrStore.s
│ │ │ │ ├── AsmVmRead.asm
│ │ │ │ ├── AsmVmRead.s
│ │ │ │ ├── AsmVmResume.asm
│ │ │ │ ├── AsmVmResume.s
│ │ │ │ ├── AsmVmWrite.asm
│ │ │ │ ├── AsmVmWrite.s
│ │ │ │ ├── AsmVmxOff.asm
│ │ │ │ ├── AsmVmxOff.s
│ │ │ │ ├── AsmVmxOn.asm
│ │ │ │ ├── AsmVmxOn.s
│ │ │ │ ├── AsmXGetBv.asm
│ │ │ │ ├── AsmXGetBv.s
│ │ │ │ ├── AsmXRestore.asm
│ │ │ │ ├── AsmXRestore.s
│ │ │ │ ├── AsmXSave.asm
│ │ │ │ ├── AsmXSave.s
│ │ │ │ ├── AsmXSetBv.asm
│ │ │ │ ├── AsmXSetBv.s
│ │ │ │ └── Vmx64.c
│ │ │ ├── Smx.c
│ │ │ ├── StmLib.inf
│ │ │ ├── Vmx.c
│ │ │ └── x64
│ │ │ │ ├── AsmInvEpt.S
│ │ │ │ ├── AsmInvEpt.asm
│ │ │ │ ├── AsmInvEpt.s
│ │ │ │ ├── AsmInvVpid.asm
│ │ │ │ ├── AsmInvVpid.s
│ │ │ │ ├── AsmSendInt2.S
│ │ │ │ ├── AsmSendInt2.asm
│ │ │ │ ├── AsmTestAndReset.S
│ │ │ │ ├── AsmTestAndReset.asm
│ │ │ │ ├── AsmTestAndSet.S
│ │ │ │ ├── AsmTestAndSet.asm
│ │ │ │ ├── AsmVmCall.S
│ │ │ │ ├── AsmVmCall.asm
│ │ │ │ ├── AsmVmClear.S
│ │ │ │ ├── AsmVmClear.asm
│ │ │ │ ├── AsmVmLaunch.S
│ │ │ │ ├── AsmVmLaunch.asm
│ │ │ │ ├── AsmVmPtrLoad.S
│ │ │ │ ├── AsmVmPtrLoad.asm
│ │ │ │ ├── AsmVmPtrStore.S
│ │ │ │ ├── AsmVmPtrStore.asm
│ │ │ │ ├── AsmVmRead.S
│ │ │ │ ├── AsmVmRead.asm
│ │ │ │ ├── AsmVmResume.S
│ │ │ │ ├── AsmVmResume.asm
│ │ │ │ ├── AsmVmWrite.S
│ │ │ │ ├── AsmVmWrite.asm
│ │ │ │ ├── AsmVmxOff.asm
│ │ │ │ ├── AsmVmxOff.s
│ │ │ │ ├── AsmVmxOn.asm
│ │ │ │ ├── AsmVmxOn.s
│ │ │ │ ├── AsmXGetBv.asm
│ │ │ │ ├── AsmXGetBv.s
│ │ │ │ ├── AsmXRestore.asm
│ │ │ │ ├── AsmXRestore.s
│ │ │ │ ├── AsmXSave.asm
│ │ │ │ ├── AsmXSave.s
│ │ │ │ ├── AsmXSetBv.asm
│ │ │ │ ├── AsmXSetBv.s
│ │ │ │ └── Vmx64.c
│ │ ├── StmPlatformLibNull
│ │ │ ├── CMakeLists.txt
│ │ │ ├── StmPlatformLibNull.c
│ │ │ └── StmPlatformLibNull.inf
│ │ └── coreboot
│ │ │ ├── CMakeLists.txt
│ │ │ └── coreboot.c
│ ├── License.txt
│ ├── StmPkg.dec
│ ├── StmPkg.dsc
│ ├── StmPkgRelease.dsc
│ └── Tool
│ │ └── GenStm
│ │ ├── GNUmakefile
│ │ ├── GenStm.c
│ │ ├── GenStm.exe
│ │ ├── GenStm.h
│ │ └── Makefile
├── buildstm.bat
├── buildstm.sh
├── buildstmtool.bat
├── cmake
│ ├── CheckGit.cmake
│ ├── git_version.c.in
│ └── git_version.h
└── preparestm.bat
└── Test
├── DmaPkg
├── Contributions.txt
├── DmaPkg.dec
├── DmaPkg.dsc
├── DmaProtection
│ ├── CsmSupport.c
│ ├── DmaProtection.c
│ ├── DmaProtection.h
│ ├── DmaProtection.inf
│ ├── DmarAcpiTable.c
│ ├── PciHook.c
│ ├── PciInfo.c
│ ├── TranslationTable.c
│ ├── TranslationTableEx.c
│ └── VtdReg.c
├── Include
│ └── IndustryStandard
│ │ ├── DMARemappingReportingTable.h
│ │ └── Vtd.h
└── License.txt
└── FrmPkg
├── Contributions.txt
├── Core
├── Acpi.c
├── Cpu.c
├── CpuDef.h
├── Dce.h
├── DlEntryDump.c
├── DrtmTpm.h
├── Dump.c
├── Dump.h
├── Frm.h
├── Frm.inf
├── Init
│ ├── ApInit.c
│ ├── DlEntry.c
│ ├── DlEntryCacheInit.c
│ ├── DlEntryWakeupAp.c
│ ├── Dmar.h
│ ├── EptInit.c
│ ├── FrmInit.c
│ ├── FrmInit.h
│ ├── Ia32
│ │ ├── ApWakeup.asm
│ │ ├── ApWakeup.s
│ │ ├── MleEntrypoint.asm
│ │ ├── MleEntrypoint.s
│ │ ├── RlpWake.asm
│ │ ├── RlpWake.s
│ │ ├── Smx.i
│ │ └── Smx.inc
│ ├── IoInit.c
│ ├── Memory.c
│ ├── Paging.c
│ ├── SrmInit.c
│ ├── VmcsInit.c
│ ├── VmxTimerInit.c
│ └── x64
│ │ ├── ApWakeup.asm
│ │ ├── ApWakeup.s
│ │ ├── MleEntrypoint.asm
│ │ ├── MleEntrypoint.s
│ │ ├── RlpWake.asm
│ │ ├── RlpWake.s
│ │ ├── Smx.i
│ │ └── Smx.inc
├── Runtime
│ ├── ApHandler.c
│ ├── CacheHandler.c
│ ├── CpuidHandler.c
│ ├── CrHandler.c
│ ├── DlmeExit.c
│ ├── EptHandler.c
│ ├── ExceptionHandler.c
│ ├── FrmHandler.c
│ ├── FrmHandler.h
│ ├── FrmTeardown.c
│ ├── Ia32
│ │ ├── Exception.asm
│ │ ├── Exception.s
│ │ ├── VmExit.asm
│ │ └── VmExit.s
│ ├── InterruptHandler.c
│ ├── IoAcpiHandler.c
│ ├── IoHandler.c
│ ├── IoResetHandler.c
│ ├── MsrHandler.c
│ ├── SrmDeactivate.c
│ ├── TaskSwitchHandler.c
│ ├── VmcallHandler.c
│ ├── VmxTimerHandler.c
│ ├── XsetbvHandler.c
│ └── x64
│ │ ├── Exception.asm
│ │ ├── Exception.s
│ │ ├── VmExit.asm
│ │ └── VmExit.s
└── Tpm.c
├── FrmBin
├── Frm.depex
├── Frm.inf
├── FrmLoader.depex
├── FrmLoader.inf
├── StmService.depex
└── StmService.inf
├── FrmPkg.Sample.fdf
├── FrmPkg.dec
├── FrmPkg.dsc
├── Include
├── FrmCommon.h
├── Ia32
│ └── CpuArchSpecific.h
├── Library
│ ├── FrmLib.h
│ ├── HashLib.h
│ ├── Smx.h
│ ├── Tpm12CommandLib.h
│ ├── Tpm12DeviceLib.h
│ ├── Tpm12HashLib.h
│ ├── Tpm2CommandLib.h
│ ├── Tpm2DeviceLib.h
│ └── Vmx.h
├── Protocol
│ └── SmMonitorService.h
├── StmApi.h
└── x64
│ └── CpuArchSpecific.h
├── Library
├── AcpiTimerLib
│ ├── AcpiTimerLib.c
│ └── AcpiTimerLib.inf
├── FrmLib
│ ├── FrmLib.inf
│ ├── Ia32
│ │ ├── AsmGetSecCapabilities.asm
│ │ ├── AsmGetSecCapabilities.s
│ │ ├── AsmGetSecParameters.asm
│ │ ├── AsmGetSecParameters.s
│ │ ├── AsmGetSecSenter.asm
│ │ ├── AsmGetSecSenter.s
│ │ ├── AsmGetSecSexit.asm
│ │ ├── AsmGetSecSexit.s
│ │ ├── AsmGetSecSmctrl.asm
│ │ ├── AsmGetSecSmctrl.s
│ │ ├── AsmGetSecWakeup.asm
│ │ ├── AsmGetSecWakeup.s
│ │ ├── AsmInvEpt.asm
│ │ ├── AsmInvEpt.s
│ │ ├── AsmInvVpid.asm
│ │ ├── AsmInvVpid.s
│ │ ├── AsmTestAndReset.asm
│ │ ├── AsmTestAndReset.s
│ │ ├── AsmTestAndSet.asm
│ │ ├── AsmTestAndSet.s
│ │ ├── AsmVmCall.asm
│ │ ├── AsmVmCall.s
│ │ ├── AsmVmClear.asm
│ │ ├── AsmVmClear.s
│ │ ├── AsmVmLaunch.asm
│ │ ├── AsmVmLaunch.s
│ │ ├── AsmVmPtrLoad.asm
│ │ ├── AsmVmPtrLoad.s
│ │ ├── AsmVmPtrStore.asm
│ │ ├── AsmVmPtrStore.s
│ │ ├── AsmVmRead.asm
│ │ ├── AsmVmRead.s
│ │ ├── AsmVmResume.asm
│ │ ├── AsmVmResume.s
│ │ ├── AsmVmWrite.asm
│ │ ├── AsmVmWrite.s
│ │ ├── AsmVmxOff.asm
│ │ ├── AsmVmxOff.s
│ │ ├── AsmVmxOn.asm
│ │ ├── AsmVmxOn.s
│ │ ├── AsmXGetBv.asm
│ │ ├── AsmXGetBv.s
│ │ ├── AsmXRestore.asm
│ │ ├── AsmXRestore.s
│ │ ├── AsmXSave.asm
│ │ ├── AsmXSave.s
│ │ ├── AsmXSetBv.asm
│ │ ├── AsmXSetBv.s
│ │ └── Vmx64.c
│ ├── Smx.c
│ ├── Vmx.c
│ └── x64
│ │ ├── AsmGetSecCapabilities.asm
│ │ ├── AsmGetSecCapabilities.s
│ │ ├── AsmGetSecParameters.asm
│ │ ├── AsmGetSecParameters.s
│ │ ├── AsmGetSecSenter.asm
│ │ ├── AsmGetSecSenter.s
│ │ ├── AsmGetSecSexit.asm
│ │ ├── AsmGetSecSexit.s
│ │ ├── AsmGetSecSmctrl.asm
│ │ ├── AsmGetSecSmctrl.s
│ │ ├── AsmGetSecWakeup.asm
│ │ ├── AsmGetSecWakeup.s
│ │ ├── AsmInvEpt.asm
│ │ ├── AsmInvEpt.s
│ │ ├── AsmInvVpid.asm
│ │ ├── AsmInvVpid.s
│ │ ├── AsmTestAndReset.asm
│ │ ├── AsmTestAndReset.s
│ │ ├── AsmTestAndSet.asm
│ │ ├── AsmTestAndSet.s
│ │ ├── AsmVmCall.asm
│ │ ├── AsmVmCall.s
│ │ ├── AsmVmClear.asm
│ │ ├── AsmVmClear.s
│ │ ├── AsmVmLaunch.asm
│ │ ├── AsmVmLaunch.s
│ │ ├── AsmVmPtrLoad.asm
│ │ ├── AsmVmPtrLoad.s
│ │ ├── AsmVmPtrStore.asm
│ │ ├── AsmVmPtrStore.s
│ │ ├── AsmVmRead.asm
│ │ ├── AsmVmRead.s
│ │ ├── AsmVmResume.asm
│ │ ├── AsmVmResume.s
│ │ ├── AsmVmWrite.asm
│ │ ├── AsmVmWrite.s
│ │ ├── AsmVmxOff.asm
│ │ ├── AsmVmxOff.s
│ │ ├── AsmVmxOn.asm
│ │ ├── AsmVmxOn.s
│ │ ├── AsmXGetBv.asm
│ │ ├── AsmXGetBv.s
│ │ ├── AsmXRestore.asm
│ │ ├── AsmXRestore.s
│ │ ├── AsmXSave.asm
│ │ ├── AsmXSave.s
│ │ ├── AsmXSetBv.asm
│ │ ├── AsmXSetBv.s
│ │ └── Vmx64.c
├── HashLibTpm2
│ ├── HashLibTpm2.c
│ ├── HashLibTpm2.inf
│ └── HashLibTpm2.uni
├── MpSafeDebugLibSerialPort
│ ├── DebugLib.c
│ └── MpSafeDebugLibSerialPort.inf
├── SimpleSynchronizationLib
│ ├── BaseSynchronizationLibInternals.h
│ ├── Ia32
│ │ ├── GccInline.c
│ │ ├── InterlockedCompareExchange32.asm
│ │ ├── InterlockedCompareExchange32.c
│ │ ├── InterlockedCompareExchange64.asm
│ │ ├── InterlockedCompareExchange64.c
│ │ ├── InterlockedDecrement.asm
│ │ ├── InterlockedDecrement.c
│ │ ├── InterlockedIncrement.asm
│ │ └── InterlockedIncrement.c
│ ├── SimpleSynchronizationLib.inf
│ ├── Synchronization.c
│ ├── SynchronizationGcc.c
│ ├── SynchronizationMsc.c
│ └── X64
│ │ ├── GccInline.c
│ │ ├── InterlockedCompareExchange32.asm
│ │ ├── InterlockedCompareExchange32.c
│ │ ├── InterlockedCompareExchange64.asm
│ │ ├── InterlockedCompareExchange64.c
│ │ ├── InterlockedDecrement.asm
│ │ ├── InterlockedDecrement.c
│ │ ├── InterlockedIncrement.asm
│ │ └── InterlockedIncrement.c
├── Tpm12CommandLib
│ ├── Tpm12CommandLib.inf
│ ├── Tpm12CommandLib.uni
│ ├── Tpm12Crypto.c
│ ├── Tpm12GetCapability.c
│ ├── Tpm12NvStorage.c
│ ├── Tpm12Ownership.c
│ ├── Tpm12Pcr.c
│ ├── Tpm12PhysicalPresence.c
│ ├── Tpm12SelfTest.c
│ └── Tpm12Startup.c
├── Tpm12DeviceLibDTpm
│ ├── Tpm12DeviceLibDTpm.inf
│ ├── Tpm12DeviceLibDTpm.uni
│ └── Tpm12Tis.c
├── Tpm12HashLibTpm
│ ├── Tpm12HashLibTpm.c
│ ├── Tpm12HashLibTpm.inf
│ └── Tpm12HashLibTpm.uni
├── Tpm2CommandLib
│ ├── Tpm2Capability.c
│ ├── Tpm2CommandLib.inf
│ ├── Tpm2CommandLib.uni
│ ├── Tpm2Context.c
│ ├── Tpm2DictionaryAttack.c
│ ├── Tpm2EnhancedAuthorization.c
│ ├── Tpm2Help.c
│ ├── Tpm2Hierarchy.c
│ ├── Tpm2Integrity.c
│ ├── Tpm2Miscellaneous.c
│ ├── Tpm2NVStorage.c
│ ├── Tpm2Object.c
│ ├── Tpm2Random.c
│ ├── Tpm2Sequences.c
│ ├── Tpm2Session.c
│ ├── Tpm2Startup.c
│ └── Tpm2Test.c
└── Tpm2DeviceLibDTpm
│ ├── Tpm2DeviceLibDTpm.c
│ ├── Tpm2DeviceLibDTpm.inf
│ ├── Tpm2DeviceLibDTpm.uni
│ ├── Tpm2Ptp.c
│ └── Tpm2Tis.c
├── License.txt
├── LoaderApp
├── Loader.c
├── Loader.h
└── Loader.inf
├── LoaderDriver
├── Loader.c
├── Loader.h
└── Loader.inf
└── StmService
├── Ia32
├── StmLaunch.asm
└── StmLaunch.s
├── LoadToReserved.c
├── StmService.c
├── StmService.h
├── StmService.inf
└── x64
├── StmLaunch.asm
└── StmLaunch.s
/.gitignore:
--------------------------------------------------------------------------------
1 | Stm/build/*
2 | .DS_Store
3 |
4 |
--------------------------------------------------------------------------------
/Bios/Override/Vlv2BinaryPkg/X64DEBUG/IA32/MemoryInit.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/Override/Vlv2BinaryPkg/X64DEBUG/IA32/MemoryInit.efi
--------------------------------------------------------------------------------
/Bios/Override/Vlv2BinaryPkg/X64DEBUG/IA32/PeiSmmAccess.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/Override/Vlv2BinaryPkg/X64DEBUG/IA32/PeiSmmAccess.efi
--------------------------------------------------------------------------------
/Bios/Override/Vlv2BinaryPkg/X64DEBUG/X64/SmmAccess.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/Override/Vlv2BinaryPkg/X64DEBUG/X64/SmmAccess.efi
--------------------------------------------------------------------------------
/Bios/Override/Vlv2BinaryPkg/X64RELEASE/IA32/MemoryInit.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/Override/Vlv2BinaryPkg/X64RELEASE/IA32/MemoryInit.efi
--------------------------------------------------------------------------------
/Bios/Override/Vlv2BinaryPkg/X64RELEASE/IA32/PeiSmmAccess.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/Override/Vlv2BinaryPkg/X64RELEASE/IA32/PeiSmmAccess.efi
--------------------------------------------------------------------------------
/Bios/Override/Vlv2BinaryPkg/X64RELEASE/X64/SmmAccess.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/Override/Vlv2BinaryPkg/X64RELEASE/X64/SmmAccess.efi
--------------------------------------------------------------------------------
/Bios/StmCpuPkg/Include/Guid/MsegSmram.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | Provides the data format and Name and GUID definition for MsegHob.
3 |
4 | Copyright (c) 2015, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 | #ifndef _MSEG_SMRAM_H_
16 | #define _MSEG_SMRAM_H_
17 |
18 | #define MSEG_SMRAM_GUID \
19 | { \
20 | 0x5802bce4, 0xeeee, 0x4e33, { 0xa1, 0x30, 0xeb, 0xad, 0x27, 0xf0, 0xe4, 0x39 } \
21 | }
22 |
23 | extern EFI_GUID gMsegSmramGuid;
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/Bios/StmCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.uni:
--------------------------------------------------------------------------------
1 | // /** @file
2 | // The CPU specific programming for PiSmmCpuDxeSmm module.
3 | //
4 | // Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
5 | //
6 | // This program and the accompanying materials
7 | // are licensed and made available under the terms and conditions of the BSD License
8 | // which accompanies this distribution. The full text of the license may be found at
9 | // http://opensource.org/licenses/bsd-license.php
10 | //
11 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 | //
14 | // **/
15 |
16 | #string STR_MODULE_ABSTRACT #language en-US "The CPU specific programming for PiSmmCpuDxeSmm module."
17 |
18 | #string STR_MODULE_DESCRIPTION #language en-US "The CPU specific programming for PiSmmCpuDxeSmm module."
19 |
--------------------------------------------------------------------------------
/Bios/StmCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.uni:
--------------------------------------------------------------------------------
1 | // /** @file
2 | // SMM CPU Platform Hook NULL library instance.
3 | //
4 | // Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
5 | //
6 | // This program and the accompanying materials
7 | // are licensed and made available under the terms and conditions of the BSD License
8 | // which accompanies this distribution. The full text of the license may be found at
9 | // http://opensource.org/licenses/bsd-license.php
10 | //
11 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 | //
14 | // **/
15 |
16 | #string STR_MODULE_ABSTRACT #language en-US "SMM CPU Platform Hook NULL library instance"
17 |
18 | #string STR_MODULE_DESCRIPTION #language en-US "SMM CPU Platform Hook NULL library instance."
19 |
--------------------------------------------------------------------------------
/Bios/StmCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.uni:
--------------------------------------------------------------------------------
1 | // /** @file
2 | // CPU SMM driver.
3 | //
4 | // This SMM driver performs SMM initialization, deploy SMM Entry Vector,
5 | // provides CPU specific services in SMM.
6 | //
7 | // Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
8 | //
9 | // This program and the accompanying materials are
10 | // licensed and made available under the terms and conditions of the BSD License
11 | // which accompanies this distribution. The full text of the license may be found at
12 | // http://opensource.org/licenses/bsd-license.php
13 | //
14 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 | //
17 | // **/
18 |
19 | #string STR_MODULE_ABSTRACT #language en-US "CPU SMM driver"
20 |
21 | #string STR_MODULE_DESCRIPTION #language en-US "This SMM driver performs SMM initialization, deploys SMM Entry Vector, and provides CPU-specific services in SMM."
22 |
--------------------------------------------------------------------------------
/Bios/StmCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmmExtra.uni:
--------------------------------------------------------------------------------
1 | // /** @file
2 | // PiSmmCpuDxeSmm Localized Strings and Content
3 | //
4 | // Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
5 | //
6 | // This program and the accompanying materials are
7 | // licensed and made available under the terms and conditions of the BSD License
8 | // which accompanies this distribution. The full text of the license may be found at
9 | // http://opensource.org/licenses/bsd-license.php
10 | //
11 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 | //
14 | // **/
15 |
16 | #string STR_PROPERTIES_MODULE_NAME
17 | #language en-US
18 | "Processor SMM Initialization DXE Driver"
19 |
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/Compatibility/EndOfDxeOnExitPmAuthThunk/EndOfDxeOnExitPmAuthThunk.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | Include file for EndOfDxe Protocol on ExitPmAuth Protocol Thunk driver.
3 |
4 | Copyright (c) 2015, Intel Corporation. All rights reserved.
5 |
6 | This program and the accompanying materials
7 | are licensed and made available under the terms and conditions
8 | of the BSD License which accompanies this distribution. The
9 | full text of the license may be found at
10 | http://opensource.org/licenses/bsd-license.php
11 |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 |
15 | **/
16 |
17 | #ifndef _END_OF_DXE_ON_EXIT_PMAUTH_THUNK_H_
18 | #define _END_OF_DXE_ON_EXIT_PMAUTH_THUNK_H_
19 |
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/StmBin/X64DEBUG/Stm.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/StmBin/X64DEBUG/Stm.bin
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/StmBin/X64RELEASE/Stm.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/StmBin/X64RELEASE/Stm.bin
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/Frm.depex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/Frm.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/Frm.efi
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/Frm.inf:
--------------------------------------------------------------------------------
1 | ## @file
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | #
5 | # This program and the accompanying materials
6 | # are licensed and made available under the terms and conditions of the BSD License
7 | # which accompanies this distribution. The full text of the license may be found at
8 | # http://opensource.org/licenses/bsd-license.php
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | #
13 | ##
14 | ##
15 |
16 | [Defines]
17 | INF_VERSION = 0x00010006
18 | BASE_NAME = Frm
19 | FILE_GUID = 0F50B4B1-C62F-4902-B3AF-E79DBED20109
20 | MODULE_TYPE = DXE_DRIVER
21 | VERSION_STRING = 1.0
22 |
23 | [Binaries.X64]
24 | PE32|Frm.efi|*
25 | DXE_DEPEX|Frm.depex|*
26 |
27 | [Depex]
28 | FALSE
29 |
30 |
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/FrmLoader.depex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/FrmLoader.depex
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/FrmLoader.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/FrmLoader.efi
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/FrmLoaderApp.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/FrmLoaderApp.efi
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/StmService.depex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/StmService.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/TestBin/X64DEBUG/StmService.efi
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/Frm.depex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/Frm.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/Frm.efi
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/Frm.inf:
--------------------------------------------------------------------------------
1 | ## @file
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | #
5 | # This program and the accompanying materials
6 | # are licensed and made available under the terms and conditions of the BSD License
7 | # which accompanies this distribution. The full text of the license may be found at
8 | # http://opensource.org/licenses/bsd-license.php
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | #
13 | ##
14 | ##
15 |
16 | [Defines]
17 | INF_VERSION = 0x00010006
18 | BASE_NAME = Frm
19 | FILE_GUID = 0F50B4B1-C62F-4902-B3AF-E79DBED20109
20 | MODULE_TYPE = DXE_DRIVER
21 | VERSION_STRING = 1.0
22 |
23 | [Binaries.X64]
24 | PE32|Frm.efi|*
25 | DXE_DEPEX|Frm.depex|*
26 |
27 | [Depex]
28 | FALSE
29 |
30 |
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/FrmLoader.depex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/FrmLoader.depex
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/FrmLoader.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/FrmLoader.efi
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/FrmLoaderApp.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/FrmLoaderApp.efi
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/StmService.depex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/StmService.efi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Bios/StmPlatformSamplePkg/TestBin/X64RELEASE/StmService.efi
--------------------------------------------------------------------------------
/Stm/Readme.STMPE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Stm/Readme.STMPE.txt
--------------------------------------------------------------------------------
/Stm/Readme.txt:
--------------------------------------------------------------------------------
1 | Build STM image step:
2 | 0) Install Visual Studio 2015.
3 | 1) Unzip StmPkg zip to target dir, e.g. c:\StmCode
4 | The final directory layout is like below:
5 | c:\StmCode\StmPkg\Core
6 | c:\StmCode\StmPkg\EdkII
7 | ...
8 | 2) Open command window, goto target dir, e.g. c:\StmCode
9 | 3) Type "preparestm.bat" to prepare environment, this need run only once.
10 | 4) Type "buildstm.bat" to build STM image.
11 | 1) If user want debug build, please use "buildstm.bat" or "buildstm.bat DEBUG".
12 | 2) If user want release build, please use "buildstm.bat RELEASE".
13 |
14 | Build STM tool step:
15 | 1) Same as above
16 | 2) Same as above
17 | 3) Same as above
18 | 4) Type "buildstmtool.bat" to build STM tool.
19 |
20 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Core/BaseAsm.h:
--------------------------------------------------------------------------------
1 | #if defined(__GNUC__)
2 | ///
3 | /// For GNU assembly code, .global or .globl can declare global symbols.
4 | /// Define this macro to unify the usage.
5 | ///
6 | #define ASM_GLOBAL .globl
7 | #endif
8 |
9 | //
10 | // For symbol name in GNU assembly code, an extra "_" is necessary
11 | //
12 | #if defined(__GNUC__)
13 | ///
14 | /// Private worker functions for ASM_PFX()
15 | ///
16 | #define _CONCATENATE(a, b) __CONCATENATE(a, b)
17 | #define __CONCATENATE(a, b) a ## b
18 |
19 | ///
20 | /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
21 | /// on symbols in assembly language.
22 | ///
23 | #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
24 | #endif
25 |
26 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Core/Init/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | add_library(StmInit STATIC
3 | #StmInit.c
4 | Paging.c
5 | #Memory.c
6 | VmcsInit.c
7 | IoInit.c
8 | MsrInit.c
9 | Relocate.c
10 | PeVmcsInit.c
11 | x64/AsmStmInit.S
12 | )
13 |
14 | target_include_directories(StmInit PUBLIC
15 | ../Runtime
16 | )
17 |
18 | target_link_libraries(StmInit PUBLIC
19 | SynchronizationLib
20 | StmRuntime
21 | Resource
22 | git_version
23 | )
24 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Core/PeStmEpt.h:
--------------------------------------------------------------------------------
1 | /** @file
2 |
3 | PE EPT Header
4 |
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 | #ifndef _PESTMEPT_H_
15 | #define _PESTMEPT_H_
16 |
17 | UINT32 PeMapRegionEpt(UINT32 VmType,
18 | UINTN membase,
19 | UINTN memsize,
20 | UINTN physbase,
21 | BOOLEAN isRead,
22 | BOOLEAN isWrite,
23 | BOOLEAN isExec,
24 | UINT32 CpuIndex);
25 |
26 | #endif /* STMPEEPT_H_ */
--------------------------------------------------------------------------------
/Stm/StmPkg/Core/Runtime/PeSmmCpuidHandler.c:
--------------------------------------------------------------------------------
1 | /** @file
2 |
3 | CPUID Handler
4 |
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 | #include "StmRuntime.h"
15 | #include "PeStm.h"
16 |
17 | extern UINT64 EndTimeStamp;
18 |
19 | void PeCpuidHandler( IN UINT32 CpuIndex)
20 | {
21 | EndTimeStamp = AsmReadTsc();
22 | DEBUG((EFI_D_ERROR, "%ld PE - CPUID Handler not implemented\n", CpuIndex));
23 | DEBUG((EFI_D_ERROR, "%ld PeCpuidHandler - CpuDeadLoop\n", CpuIndex));
24 | CpuDeadLoop();
25 | return;
26 |
27 | }
--------------------------------------------------------------------------------
/Stm/StmPkg/Core/Runtime/PeSmmCrHandler.c:
--------------------------------------------------------------------------------
1 | /** @file
2 |
3 | CR Handler
4 |
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 | #include "StmRuntime.h"
16 | #include "PeStm.h"
17 |
18 | extern UINT64 EndTimeStamp;
19 |
20 | VOID
21 | SmmCrHandler (
22 | IN UINT32 Index
23 | );
24 |
25 | void PeCrHandler( IN UINT32 CpuIndex)
26 | {
27 | DEBUG((EFI_D_INFO, "%ld PeCrHandler - Entered\n", CpuIndex));
28 | SmmCrHandler(CpuIndex); // use the intel handler since it provides the necessary functionality
29 | DEBUG((EFI_D_INFO, "%ld PeCrHander - done\n", CpuIndex));
30 | return;
31 | }
32 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Core/Runtime/PeSmmPreemptionTimerHandler.c:
--------------------------------------------------------------------------------
1 | /** @file
2 |
3 | Preemption timer handler
4 |
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 | #include "StmRuntime.h"
15 | #include "PeStm.h"
16 | #include "PeLoadVm.h"
17 |
18 | extern UINT64 EndTimeStamp;
19 | extern UINT32 PostPeVmProc(UINT32 rc, UINT32 CpuIndex, UINT32 mode);
20 |
21 | void PePreEmptionTimerHandler(IN UINT32 CpuIndex)
22 | {
23 | EndTimeStamp = AsmReadTsc();
24 | DEBUG((EFI_D_ERROR,
25 | "%ld - PE/VM terminated because of a Premption Timer Runout \n",
26 | CpuIndex));
27 | DumpVmcsAllField(CpuIndex);
28 | PostPeVmProc(PE_SUCCESS, CpuIndex, RELEASE_VM);
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Core/Runtime/PeSmmTripleFaultHandler.c:
--------------------------------------------------------------------------------
1 |
2 | /** @file
3 |
4 | Triple Fault Handler
5 |
6 | This program and the accompanying materials
7 | are licensed and made available under the terms and conditions of the BSD License
8 | which accompanies this distribution. The full text of the license may be found at
9 | http://opensource.org/licenses/bsd-license.php.
10 |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 |
14 | **/
15 | #include "StmRuntime.h"
16 | #include "PeStm.h"
17 | #include "PeLoadVm.h"
18 |
19 | extern UINT64 EndTimeStamp;
20 | extern UINT32 PostPeVmProc(UINT32 rc, UINT32 CpuIndex, UINT32 mode);
21 |
22 | void PeTripleFaultHandler( IN UINT32 CpuIndex)
23 | {
24 | EndTimeStamp = AsmReadTsc();
25 | DEBUG((EFI_D_ERROR,
26 | "%ld PeTripleFaultHandler - Triple Fault occured in VM/PE - terminating\n",
27 | CpuIndex));
28 | PostPeVmProc(PE_VM_TRIPLE_FAULT, CpuIndex, PRESERVE_VM); // bring the VM down
29 | return;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Core/Runtime/VmcsOffsets.h:
--------------------------------------------------------------------------------
1 | /** @file
2 |
3 | Mostly used to dynamically generate the VMCS Offsets for XHIM
4 |
5 | add license stuff
6 | */
7 |
8 | #ifndef _VMCSOFFSETS_H_
9 | #define _VMCSOFFSETS_H_
10 |
11 | #include "Library/Vmx.h"
12 |
13 | typedef struct VmcsFieldOffset
14 | {
15 | UINT32 FieldEncoding;
16 | UINT32 FieldOffset;
17 | } VMCSFIELDOFFSET;
18 |
19 | // initialize all fields to zero
20 |
21 | typedef struct VmcsFieldPrint
22 | {
23 | UINT64 FieldEncoding;
24 | char * FieldPrint;
25 | } VMCSFIELDPRINT;
26 |
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Bin/CYGWIN_NT-5.1-i686/BuildEnv:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #python `dirname $0`/RunToolFromSource.py `basename $0` $*
3 | PYTHONPATH="`dirname $0`/../../Source/Python" \
4 | python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
5 |
6 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Bin/CYGWIN_NT-5.1-i686/Trim:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #python `dirname $0`/RunToolFromSource.py `basename $0` $*
3 |
4 | # If a python2 command is available, use it in preference to python
5 | if command -v python2 >/dev/null 2>&1; then
6 | python_exe=python2
7 | fi
8 |
9 | full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
10 | dir=$(dirname "$full_cmd")
11 | exe=$(basename "$full_cmd")
12 |
13 | export PYTHONPATH="$dir/../../Source/Python"
14 | exec "${python_exe:-python}" "$dir/../../Source/Python/$exe/$exe.py" "$@"
15 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Bin/CYGWIN_NT-5.1-i686/build:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #python `dirname $0`/RunToolFromSource.py `basename $0` $*
3 |
4 | # If a python2 command is available, use it in preference to python
5 | if command -v python2 >/dev/null 2>&1; then
6 | python_exe=python2
7 | fi
8 |
9 | full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
10 | dir=$(dirname "$full_cmd")
11 | cmd=${full_cmd##*/}
12 |
13 | export PYTHONPATH="$dir/../../Source/Python"
14 | exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
15 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/GenStm.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/GenStm.exe
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/Trim.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/Trim.exe
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/_sqlite3.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/_sqlite3.pyd
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/build.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/build.exe
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/python27.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/python27.dll
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/sqlite3.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Stm/StmPkg/EdkII/BaseTools/Bin/Win32/sqlite3.dll
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/BinWrappers/PosixLike/Trim:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #python `dirname $0`/RunToolFromSource.py `basename $0` $*
3 |
4 | # If a python2 command is available, use it in preference to python
5 | if command -v python2 >/dev/null 2>&1; then
6 | python_exe=python2
7 | fi
8 |
9 | full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
10 | dir=$(dirname "$full_cmd")
11 | exe=$(basename "$full_cmd")
12 |
13 | export PYTHONPATH="$dir/../../Source/Python"
14 | exec "${python_exe:-python}" "$dir/../../Source/Python/$exe/$exe.py" "$@"
15 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/BinWrappers/PosixLike/build:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #python `dirname $0`/RunToolFromSource.py `basename $0` $*
3 |
4 | # If a python2 command is available, use it in preference to python
5 | if command -v python2 >/dev/null 2>&1; then
6 | python_exe=python2
7 | fi
8 |
9 | full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
10 | dir=$(dirname "$full_cmd")
11 | cmd=${full_cmd##*/}
12 |
13 | export PYTHONPATH="$dir/../../Source/Python"
14 | exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
15 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Conf/ReadMe.txt:
--------------------------------------------------------------------------------
1 | This directory contains the template files for the next generation of the
2 | EDK II Build infrastructure. These files will be copied into the WORKSPACE's
3 | Conf directory if and only if the target files do not exist.
4 |
5 | These files may be updated frequently.
6 |
7 | The XMLSchema directory contains the EDK II Packaging XML definitions. The
8 | schema may change in the future. It differs somewhat from the early versions
9 | of the XML Schema.
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/C/GenStm/GNUmakefile:
--------------------------------------------------------------------------------
1 | ARCH ?= IA32
2 | MAKEROOT ?= ..
3 |
4 | STM_HOME=$(WORKSPACE)/StmPkg
5 |
6 | # BUGBUG need add "-I $(INC)" to $(INCLUDE)
7 | INC = -I $(STM_HOME)/Include -I $(WORKSPACE)/MdePkg/Include
8 |
9 | APPNAME = GenStm
10 |
11 | LIBS = -lCommon
12 |
13 | OBJECTS = GenStm.o
14 |
15 | include $(MAKEROOT)/Makefiles/app.makefile
16 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/C/GenStm/GenStm.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Stm/StmPkg/EdkII/BaseTools/Source/C/GenStm/GenStm.exe
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/C/GenStm/Makefile:
--------------------------------------------------------------------------------
1 |
2 | STM_HOME=$(WORKSPACE)\StmPkg
3 |
4 | INC = $(INC) -I $(STM_HOME)\include -I $(WORKSPACE)\MdePkg\include
5 |
6 | !INCLUDE ..\Makefiles\ms.common
7 |
8 | APPNAME = GenStm
9 |
10 | LIBS = $(LIB_PATH)\Common.lib
11 |
12 | OBJECTS = GenStm.obj
13 |
14 | !INCLUDE ..\Makefiles\ms.app
15 |
16 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/C/Include/Common/BuildVersion.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | This file is for build version number auto generation
3 |
4 | Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 | #define __BUILD_VERSION ""
16 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/C/Include/Guid/FfsSectionAlignmentPadding.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | Copyright (c) 2015, Linaro Ltd. All rights reserved.
3 |
4 | This program and the accompanying materials are licensed and made available
5 | under the terms and conditions of the BSD License which accompanies this
6 | distribution. The full text of the license may be found at
7 | http://opensource.org/licenses/bsd-license.php
8 |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 |
12 | **/
13 |
14 | #ifndef __FFS_SECTION_ALIGNMENT_PADDING_GUID_H__
15 | #define __FFS_SECTION_ALIGNMENT_PADDING_GUID_H__
16 |
17 | #define EFI_FFS_SECTION_ALIGNMENT_PADDING_GUID \
18 | { \
19 | 0x04132C8D, 0x0A22, 0x4FA8, {0x82, 0x6E, 0x8B, 0xBF, 0xEF, 0xDB, 0x83, 0x6C } \
20 | }
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/C/Include/IndustryStandard/pci23.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | Support for PCI 2.3 standard.
3 |
4 | Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
5 |
6 | This program and the accompanying materials are licensed and made available
7 | under the terms and conditions of the BSD License which accompanies this
8 | distribution. The full text of the license may be found at
9 | http://opensource.org/licenses/bsd-license.php
10 |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 |
14 | **/
15 |
16 | #ifndef _PCI23_H
17 | #define _PCI23_H
18 |
19 | //#include "pci22.h"
20 |
21 | #define PCI_EXP_MAX_CONFIG_OFFSET 0x1000
22 | #define EFI_PCI_CAPABILITY_ID_PCIEXP 0x10
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/C/Makefiles/app.makefile:
--------------------------------------------------------------------------------
1 | ## @file
2 | # Makefiles
3 | #
4 | # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
5 | # This program and the accompanying materials
6 | # are licensed and made available under the terms and conditions of the BSD License
7 | # which accompanies this distribution. The full text of the license may be found at
8 | # http://opensource.org/licenses/bsd-license.php
9 | #
10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 | #
13 |
14 | MAKEROOT ?= ../..
15 |
16 | include $(MAKEROOT)/Makefiles/header.makefile
17 |
18 | APPLICATION = $(MAKEROOT)/bin/$(APPNAME)
19 |
20 | .PHONY:all
21 | all: $(MAKEROOT)/bin $(APPLICATION)
22 |
23 | $(APPLICATION): $(OBJECTS)
24 | $(LINKER) -o $(APPLICATION) $(LFLAGS) $(OBJECTS) -L$(MAKEROOT)/libs $(LIBS)
25 |
26 | $(OBJECTS): ../Include/Common/BuildVersion.h
27 |
28 | include $(MAKEROOT)/Makefiles/footer.makefile
29 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/C/Makefiles/lib.makefile:
--------------------------------------------------------------------------------
1 | ## @file
2 | # Makefiles
3 | #
4 | # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
5 | # This program and the accompanying materials
6 | # are licensed and made available under the terms and conditions of the BSD License
7 | # which accompanies this distribution. The full text of the license may be found at
8 | # http://opensource.org/licenses/bsd-license.php
9 | #
10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 | #
13 |
14 | include $(MAKEROOT)/Makefiles/header.makefile
15 |
16 | LIBRARY = $(MAKEROOT)/libs/lib$(LIBNAME).a
17 |
18 | all: $(MAKEROOT)/libs $(LIBRARY)
19 |
20 | include $(MAKEROOT)/Makefiles/footer.makefile
21 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/C/Makefiles/ms.lib:
--------------------------------------------------------------------------------
1 | ## @file
2 | #
3 | # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 |
12 | !INCLUDE ..\Makefiles\ms.common
13 |
14 | LIBRARY = $(LIB_PATH)\$(LIBNAME).lib
15 |
16 | all: $(LIBRARY)
17 |
18 | $(LIBRARY) : $(OBJECTS)
19 | -@if not exist $(LIB_PATH) mkdir $(LIB_PATH)
20 | $(AR) /nologo /out:$@ $**
21 |
22 | .PHONY:clean
23 | clean:
24 | del /f /q $(OBJECTS) *.pdb > nul
25 |
26 | .PHONY:cleanall
27 | cleanall:
28 | del /f /q $(OBJECTS) $(LIBRARY) *.pdb > nul
29 |
30 | !INCLUDE ..\Makefiles\ms.rule
31 |
32 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/C/Makefiles/ms.rule:
--------------------------------------------------------------------------------
1 | ## @file
2 | # Makefile
3 | #
4 | # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
5 | # This program and the accompanying materials
6 | # are licensed and made available under the terms and conditions of the BSD License
7 | # which accompanies this distribution. The full text of the license may be found at
8 | # http://opensource.org/licenses/bsd-license.php
9 | #
10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 | #
13 |
14 | #DEPFILES = $(OBJECTS:%.o=%.d)
15 |
16 | .c.obj :
17 | $(CC) -c $(CFLAGS) $(INC) $< -Fo$@
18 |
19 | .S.obj :
20 | $(AS) -c $(ASFLAGS) $< -Fo$@
21 |
22 | .cpp.obj :
23 | $(CXX) -c $(CPPFLAGS) $(INC) $< -Fo$@
24 |
25 | #-include $(DEPFILES)
26 |
27 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/Python/AutoGen/__init__.py:
--------------------------------------------------------------------------------
1 | ## @file
2 | # Python 'AutoGen' package initialization file.
3 | #
4 | # This file is required to make Python interpreter treat the directory
5 | # as containing package.
6 | #
7 | # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
8 | # This program and the accompanying materials
9 | # are licensed and made available under the terms and conditions of the BSD License
10 | # which accompanies this distribution. The full text of the license may be found at
11 | # http://opensource.org/licenses/bsd-license.php
12 | #
13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 | #
16 |
17 | __all__ = ["AutoGen"]
18 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/Python/Common/BuildVersion.py:
--------------------------------------------------------------------------------
1 | ## @file
2 | #
3 | # This file is for build version number auto generation
4 | #
5 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
6 | #
7 | # This program and the accompanying materials are licensed and made available
8 | # under the terms and conditions of the BSD License which accompanies this
9 | # distribution. The full text of the license may be found at
10 | # http://opensource.org/licenses/bsd-license.php
11 | #
12 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 | #
15 |
16 | gBUILD_VERSION = ""
17 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/Python/Common/PyUtility.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Stm/StmPkg/EdkII/BaseTools/Source/Python/Common/PyUtility.pyd
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/Python/Common/__init__.py:
--------------------------------------------------------------------------------
1 | ## @file
2 | # Python 'Common' package initialization file.
3 | #
4 | # This file is required to make Python interpreter treat the directory
5 | # as containing package.
6 | #
7 | # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
8 | # This program and the accompanying materials
9 | # are licensed and made available under the terms and conditions of the BSD License
10 | # which accompanies this distribution. The full text of the license may be found at
11 | # http://opensource.org/licenses/bsd-license.php
12 | #
13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 | #
16 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/Python/CommonDataClass/Exceptions.py:
--------------------------------------------------------------------------------
1 | ## @file
2 | # This file is used to define common Exceptions class used in python tools
3 | #
4 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
5 | # This program and the accompanying materials
6 | # are licensed and made available under the terms and conditions of the BSD License
7 | # which accompanies this distribution. The full text of the license may be found at
8 | # http://opensource.org/licenses/bsd-license.php
9 | #
10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | ## Exceptions used in Expression
14 | class EvaluationException(Exception):
15 | pass
16 |
17 | class BadExpression(EvaluationException):
18 | pass
19 |
20 | class WrnExpression(Exception):
21 | pass
22 |
23 | ## Exceptions used in macro replacements
24 | class MacroException(Exception):
25 | pass
26 |
27 | class SymbolNotFound(MacroException):
28 | pass
29 |
30 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/Python/CommonDataClass/__init__.py:
--------------------------------------------------------------------------------
1 | ## @file
2 | # Python 'CommonDataClass' package initialization file.
3 | #
4 | # This file is required to make Python interpreter treat the directory
5 | # as containing package.
6 | #
7 | # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
8 | # This program and the accompanying materials
9 | # are licensed and made available under the terms and conditions of the BSD License
10 | # which accompanies this distribution. The full text of the license may be found at
11 | # http://opensource.org/licenses/bsd-license.php
12 | #
13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 | #
16 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/Python/GNUmakefile:
--------------------------------------------------------------------------------
1 | ## @file
2 | # GNU/Linux makefile for Python tools build.
3 | #
4 | # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
5 | # This program and the accompanying materials
6 | # are licensed and made available under the terms and conditions of the BSD License
7 | # which accompanies this distribution. The full text of the license may be found at
8 | # http://opensource.org/licenses/bsd-license.php
9 | #
10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 | #
13 |
14 | all:
15 |
16 | clean:
17 | find . -name '*.pyc' -exec rm '{}' ';'
18 |
19 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/Python/Workspace/__init__.py:
--------------------------------------------------------------------------------
1 | ## @file
2 | # Python 'Workspace' package initialization file.
3 | #
4 | # This file is required to make Python interpreter treat the directory
5 | # as containing package.
6 | #
7 | # Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.
8 | # This program and the accompanying materials
9 | # are licensed and made available under the terms and conditions of the BSD License
10 | # which accompanies this distribution. The full text of the license may be found at
11 | # http://opensource.org/licenses/bsd-license.php
12 | #
13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 | #
16 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/Python/build/__init__.py:
--------------------------------------------------------------------------------
1 | ## @file
2 | # Python 'build' package initialization file.
3 | #
4 | # This file is required to make Python interpreter treat the directory
5 | # as containing package.
6 | #
7 | # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
8 | # This program and the accompanying materials
9 | # are licensed and made available under the terms and conditions of the BSD License
10 | # which accompanies this distribution. The full text of the license may be found at
11 | # http://opensource.org/licenses/bsd-license.php
12 | #
13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 | #
16 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/Source/Python/sitecustomize.py:
--------------------------------------------------------------------------------
1 | ## @file
2 | #
3 | #
4 | # Copyright (c) 2009 - 2014, Apple Inc. All rights reserved.
5 | #
6 | # This program and the accompanying materials
7 | # are licensed and made available under the terms and conditions of the BSD License
8 | # which accompanies this distribution. The full text of the license may be found at
9 | # http://opensource.org/licenses/bsd-license.php
10 | #
11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 | import sys
14 | import locale
15 |
16 | if sys.platform == "darwin":
17 | DefaultLocal = locale.getdefaultlocale()[1]
18 | if DefaultLocal is None:
19 | DefaultLocal = 'UTF8'
20 | sys.setdefaultencoding(DefaultLocal)
21 |
22 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/BaseTools/building-gcc.txt:
--------------------------------------------------------------------------------
1 | To use GCC with the BaseTools project for edk2 based development purposes,
2 | you will need to build a GCC based cross-compiler (in addition to binutils).
3 |
4 | Instructions for building GCC for this purpose can be found under the
5 | BaseTools source tree. (In addition to the instructions, you will also
6 | find scripts to help automate the build process.)
7 |
8 | If you do not have a tianocore.org account, you can make use of the 'guest'
9 | account with an empty password.
10 |
11 | In a web browser, you can 'browse' the relavent source at this location:
12 | http://sourceforge.net/p/edk2-buildtools/code/HEAD/tree/trunk/BaseTools/gcc
13 |
14 | Or, with subversion, you can download the relavent source with this command:
15 | svn co https://svn.code.sf.net/p/edk2-buildtools/code/trunk/BaseTools/gcc
16 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Include/IndustryStandard/Acpi.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | This file contains the latest ACPI definitions that are
3 | consumed by drivers that do not care about ACPI versions.
4 |
5 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials
7 | are licensed and made available under the terms and conditions of the BSD License
8 | which accompanies this distribution. The full text of the license may be found at
9 | http://opensource.org/licenses/bsd-license.php
10 |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 |
14 | **/
15 |
16 | #ifndef _ACPI_H_
17 | #define _ACPI_H_
18 |
19 | #include
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Include/IndustryStandard/Pci.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | Support for the latest PCI standard.
3 |
4 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials are licensed and made available under
6 | the terms and conditions of the BSD License that accompanies this distribution.
7 | The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 |
16 | **/
17 |
18 | #ifndef _PCI_H_
19 | #define _PCI_H_
20 |
21 | #include
22 | #include
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | Common header file shared by all source files.
3 |
4 | This file includes package header files, dependent library classes.
5 |
6 | Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials
8 | are licensed and made available under the terms and conditions of the BSD License
9 | which accompanies this distribution. The full text of the license may be found at
10 | http://opensource.org/licenses/bsd-license.php.
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 | **/
14 |
15 | #ifndef __BASEIOLIB_INTRINSIC_INTERNAL_H_
16 | #define __BASEIOLIB_INTRINSIC_INTERNAL_H_
17 |
18 |
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseIoLibIntrinsic/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(IoLib STATIC
2 | IoLibMmioBuffer.c
3 | IoHighLevel.c
4 |
5 | IoLibGcc.c
6 | IoLib.c
7 | )
8 |
9 | target_link_libraries(IoLib PUBLIC
10 | DebugLib
11 | BaseLib
12 | )
13 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/CpuPause.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | CpuPause function.
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Requests CPU to pause for a short period of time.
20 |
21 | Requests CPU to pause for a short period of time. Typically used in MP
22 | systems to prevent memory starvation while waiting for a spin lock.
23 |
24 | **/
25 | VOID
26 | EFIAPI
27 | CpuPause (
28 | VOID
29 | )
30 | {
31 | _asm {
32 | pause
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | DisableInterrupts function.
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Disables CPU interrupts.
20 |
21 | **/
22 | VOID
23 | EFIAPI
24 | DisableInterrupts (
25 | VOID
26 | )
27 | {
28 | _asm {
29 | cli
30 | }
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | EnableDisableInterrupts function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Enables CPU interrupts for the smallest window required to capture any
20 | pending interrupts.
21 |
22 | **/
23 | VOID
24 | EFIAPI
25 | EnableDisableInterrupts (
26 | VOID
27 | )
28 | {
29 | _asm {
30 | sti
31 | nop
32 | nop
33 | cli
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | EnableInterrupts function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Enables CPU interrupts.
20 |
21 | **/
22 | VOID
23 | EFIAPI
24 | EnableInterrupts (
25 | VOID
26 | )
27 | {
28 | _asm {
29 | sti
30 | }
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/Invd.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmInvd function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Executes a INVD instruction.
20 |
21 | Executes a INVD instruction. This function is only available on IA-32 and
22 | x64.
23 |
24 | **/
25 | VOID
26 | EFIAPI
27 | AsmInvd (
28 | VOID
29 | )
30 | {
31 | _asm {
32 | invd
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadCs.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadCs function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Code Segment Register (CS).
20 |
21 | Reads and returns the current value of CS. This function is only available on
22 | IA-32 and x64.
23 |
24 | @return The current value of CS.
25 |
26 | **/
27 | UINT16
28 | EFIAPI
29 | AsmReadCs (
30 | VOID
31 | )
32 | {
33 | __asm {
34 | xor eax, eax
35 | mov ax, cs
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadDr0.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadDr0 function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Debug Register 0 (DR0).
20 |
21 | Reads and returns the current value of DR0. This function is only available
22 | on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
23 | x64.
24 |
25 | @return The value of Debug Register 0 (DR0).
26 |
27 | **/
28 | UINTN
29 | EFIAPI
30 | AsmReadDr0 (
31 | VOID
32 | )
33 | {
34 | __asm {
35 | mov eax, dr0
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadDr1.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadDr1 function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Debug Register 1 (DR1).
20 |
21 | Reads and returns the current value of DR1. This function is only available
22 | on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
23 | x64.
24 |
25 | @return The value of Debug Register 1 (DR1).
26 |
27 | **/
28 | UINTN
29 | EFIAPI
30 | AsmReadDr1 (
31 | VOID
32 | )
33 | {
34 | __asm {
35 | mov eax, dr1
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadDr2.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadDr2 function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Debug Register 2 (DR2).
20 |
21 | Reads and returns the current value of DR2. This function is only available
22 | on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
23 | x64.
24 |
25 | @return The value of Debug Register 2 (DR2).
26 |
27 | **/
28 | UINTN
29 | EFIAPI
30 | AsmReadDr2 (
31 | VOID
32 | )
33 | {
34 | __asm {
35 | mov eax, dr2
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadDr3.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadDr3 function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Debug Register 3 (DR3).
20 |
21 | Reads and returns the current value of DR3. This function is only available
22 | on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
23 | x64.
24 |
25 | @return The value of Debug Register 3 (DR3).
26 |
27 | **/
28 | UINTN
29 | EFIAPI
30 | AsmReadDr3 (
31 | VOID
32 | )
33 | {
34 | __asm {
35 | mov eax, dr3
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadDr6.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadDr6 function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Debug Register 6 (DR6).
20 |
21 | Reads and returns the current value of DR6. This function is only available
22 | on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
23 | x64.
24 |
25 | @return The value of Debug Register 6 (DR6).
26 |
27 | **/
28 | UINTN
29 | EFIAPI
30 | AsmReadDr6 (
31 | VOID
32 | )
33 | {
34 | __asm {
35 | mov eax, dr6
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadDr7.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadDr7 function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Debug Register 7 (DR7).
20 |
21 | Reads and returns the current value of DR7. This function is only available
22 | on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
23 | x64.
24 |
25 | @return The value of Debug Register 7 (DR7).
26 |
27 | **/
28 | UINTN
29 | EFIAPI
30 | AsmReadDr7 (
31 | VOID
32 | )
33 | {
34 | __asm {
35 | mov eax, dr7
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadDs.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadDs function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Data Segment Register (DS).
20 |
21 | Reads and returns the current value of DS. This function is only available on
22 | IA-32 and x64.
23 |
24 | @return The current value of DS.
25 |
26 | **/
27 | UINT16
28 | EFIAPI
29 | AsmReadDs (
30 | VOID
31 | )
32 | {
33 | __asm {
34 | xor eax, eax
35 | mov ax, ds
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadEs.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadEs function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of ES Data Segment Register (ES).
20 |
21 | Reads and returns the current value of ES. This function is only available on
22 | IA-32 and x64.
23 |
24 | @return The current value of ES.
25 |
26 | **/
27 | UINT16
28 | EFIAPI
29 | AsmReadEs (
30 | VOID
31 | )
32 | {
33 | __asm {
34 | xor eax, eax
35 | mov ax, es
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadFs.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadFs function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of FS Data Segment Register (FS).
20 |
21 | Reads and returns the current value of FS. This function is only available on
22 | IA-32 and x64.
23 |
24 | @return The current value of FS.
25 |
26 | **/
27 | UINT16
28 | EFIAPI
29 | AsmReadFs (
30 | VOID
31 | )
32 | {
33 | __asm {
34 | xor eax, eax
35 | mov ax, fs
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadGs.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadGs function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of GS Data Segment Register (GS).
20 |
21 | Reads and returns the current value of GS. This function is only available on
22 | IA-32 and x64.
23 |
24 | @return The current value of GS.
25 |
26 | **/
27 | UINT16
28 | EFIAPI
29 | AsmReadGs (
30 | VOID
31 | )
32 | {
33 | __asm {
34 | xor eax, eax
35 | mov ax, gs
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadLdtr function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current Local Descriptor Table Register(LDTR) selector.
20 |
21 | Reads and returns the current 16-bit LDTR descriptor value. This function is
22 | only available on IA-32 and x64.
23 |
24 | @return The current selector of LDT.
25 |
26 | **/
27 | UINT16
28 | EFIAPI
29 | AsmReadLdtr (
30 | VOID
31 | )
32 | {
33 | _asm {
34 | sldt ax
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadSs.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadSs function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Stack Segment Register (SS).
20 |
21 | Reads and returns the current value of SS. This function is only available on
22 | IA-32 and x64.
23 |
24 | @return The current value of SS.
25 |
26 | **/
27 | UINT16
28 | EFIAPI
29 | AsmReadSs (
30 | VOID
31 | )
32 | {
33 | __asm {
34 | xor eax, eax
35 | mov ax, ss
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadTr.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadTr function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Task Register (TR).
20 |
21 | Reads and returns the current value of TR. This function is only available on
22 | IA-32 and x64.
23 |
24 | @return The current value of TR.
25 |
26 | **/
27 | UINT16
28 | EFIAPI
29 | AsmReadTr (
30 | VOID
31 | )
32 | {
33 | _asm {
34 | str ax
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/ReadTsc.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmReadTsc function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Reads the current value of Time Stamp Counter (TSC).
20 |
21 | Reads and returns the current value of TSC. This function is only available
22 | on IA-32 and x64.
23 |
24 | @return The current value of TSC
25 |
26 | **/
27 | UINT64
28 | EFIAPI
29 | AsmReadTsc (
30 | VOID
31 | )
32 | {
33 | _asm {
34 | rdtsc
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/Ia32/Wbinvd.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | AsmWbinvd function
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Executes a WBINVD instruction.
20 |
21 | Executes a WBINVD instruction. This function is only available on IA-32 and
22 | x64.
23 |
24 | **/
25 | VOID
26 | EFIAPI
27 | AsmWbinvd (
28 | VOID
29 | )
30 | {
31 | _asm {
32 | wbinvd
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/X64/CpuBreakpoint.S:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # CpuBreakpoint.S
15 | #
16 | # Abstract:
17 | #
18 | # Implementation of CpuBreakpoint() on x86_64
19 | #
20 | #------------------------------------------------------------------------------
21 |
22 | ASM_GLOBAL ASM_PFX(CpuBreakpoint)
23 | ASM_PFX(CpuBreakpoint):
24 | int $0x3
25 | ret
26 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseLib/X86MemoryFence.c:
--------------------------------------------------------------------------------
1 | /** @file
2 | IA-32/x64 MemoryFence().
3 |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 |
16 |
17 |
18 | /**
19 | Used to serialize load and store operations.
20 |
21 | All loads and stores that proceed calls to this function are guaranteed to be
22 | globally visible when this function returns.
23 |
24 | **/
25 | VOID
26 | EFIAPI
27 | MemoryFence (
28 | VOID
29 | )
30 | {
31 | return;
32 | }
33 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BaseMemoryLib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(BaseMemoryLib STATIC
2 | SetMem.c
3 | ScanMem64Wrapper.c
4 | ScanMem32Wrapper.c
5 | ScanMem16Wrapper.c
6 | ScanMem8Wrapper.c
7 | ZeroMemWrapper.c
8 | CompareMemWrapper.c
9 | SetMem64Wrapper.c
10 | SetMem32Wrapper.c
11 | SetMem16Wrapper.c
12 | SetMemWrapper.c
13 | CopyMemWrapper.c
14 | MemLibGeneric.c
15 | MemLibGuid.c
16 | CopyMem.c
17 | )
18 |
19 | target_link_libraries(BaseMemoryLib PUBLIC
20 | DebugLib
21 | BaseLib
22 | )
23 |
24 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BasePcdLibNull/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(PcdLib STATIC
2 | PcdLib.c
3 | )
4 |
5 | target_link_libraries(PcdLib PUBLIC
6 | DebugLib
7 | BaseMemoryLib
8 | )
9 |
10 | target_include_directories(PcdLib PRIVATE
11 | ../../Include/
12 | ../../Include/X64
13 | )
14 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BasePciCf8Lib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(BasePciCf8Lib STATIC
2 | PciCf8Lib.c
3 | )
4 |
5 | target_link_libraries(BasePciCf8Lib PUBLIC
6 | BaseLib
7 | DebugLib
8 | IoLib
9 | PcdData
10 | )
11 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BasePciExpressLib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(PciExpressLib STATIC
2 | PciExpressLib.c
3 | )
4 |
5 | target_link_libraries(PciExpressLib PUBLIC
6 | BaseLib
7 | PcdLib
8 | DebugLib
9 | IoLib
10 | PcdData
11 | )
12 |
13 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BasePciLibPciExpress/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(PciLib STATIC
2 | PciLib.c
3 | )
4 |
5 | target_link_libraries(PciLib PUBLIC
6 | PciExpressLib
7 | )
8 |
9 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/MdePkg/Library/BasePrintLib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(PrintLib STATIC
2 | PrintLibInternal.c
3 | PrintLib.c
4 | )
5 |
6 | target_link_libraries(PrintLib PUBLIC
7 | DebugLib
8 | BaseLib
9 | )
10 |
--------------------------------------------------------------------------------
/Stm/StmPkg/EdkII/PcAtChipsetPkg/Library/SerialIoLib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(SerialPortLib STATIC
2 | SerialPortLib.c
3 | )
4 |
5 | target_link_libraries(SerialPortLib PUBLIC
6 | BaseLib
7 | IoLib
8 | )
9 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Include/Ia32/CpuArchSpecific.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | CPU arch specific definition
3 |
4 | Copyright (c) 2015, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 | #ifndef _CPU_ARCH_SPECIFIC_H_
16 | #define _CPU_ARCH_SPECIFIC_H_
17 |
18 | #pragma pack (push, 1)
19 | typedef struct _X86_REGISTER {
20 | UINTN Rax; // 0/0
21 | UINTN Rcx; // 4/8
22 | UINTN Rdx; // 8/16
23 | UINTN Rbx; // 12/24
24 | UINTN Rsp; // 16/32
25 | UINTN Rbp; // 20/40
26 | UINTN Rsi; // 24/48
27 | UINTN Rdi; // 28/56
28 | } X86_REGISTER;
29 | #pragma pack (pop)
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/MpSafeDebugLibSerialPort/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(DebugLib STATIC
2 | DebugLib.c
3 | )
4 |
5 | target_link_libraries(DebugLib PUBLIC
6 | SerialPortLib
7 | BaseMemoryLib
8 | PcdLib
9 | PrintLib
10 | BaseLib
11 | SynchronizationLib
12 | corebootLib
13 | )
14 |
15 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/SimpleSynchronizationLib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(SynchronizationLib STATIC
2 |
3 | #X64/InterlockedCompareExchange64.asm | INTEL
4 | #X64/InterlockedCompareExchange32.asm | INTEL
5 |
6 | #X64/InterlockedDecrement.asm | INTEL
7 | #X64/InterlockedIncrement.asm | INTEL
8 | #Synchronization.c | INTEL
9 |
10 | X64/GccInline.c
11 | SynchronizationGcc.c
12 | )
13 |
14 | target_link_libraries(SynchronizationLib PUBLIC
15 | PcdLib
16 | DebugLib
17 | BaseMemoryLib
18 | )
19 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmInvEpt.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmInvEpt.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmInvEpt PROC PUBLIC
24 | mov ecx, [esp + 4]
25 | mov eax, [esp + 8]
26 | DB 066h, 0fh, 38h, 80h, 08h ; INVEPT [rax], rcx
27 | pushfd
28 | pop eax
29 | ret
30 | AsmInvEpt ENDP
31 |
32 | END
33 |
34 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmInvEpt.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmInvEpt.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmInvEpt)
19 | ASM_PFX(AsmInvEpt):
20 | movl 4(%esp), %ecx
21 | movl 8(%esp), %eax
22 | .byte 0x66, 0x0f, 0x38, 0x80, 0x08 # INVEPT [rax], rcx
23 | pushfl
24 | pop %eax
25 | ret
26 |
27 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmInvVpid.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmInvVpid.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmInvVpid PROC PUBLIC
24 | mov ecx, [esp + 4]
25 | mov eax, [esp + 8]
26 | DB 066h, 0fh, 38h, 81h, 08h ; INVVPID [rax], rcx
27 | pushfd
28 | pop eax
29 | ret
30 | AsmInvVpid ENDP
31 |
32 | END
33 |
34 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmInvVpid.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmInvVpid.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmInvVpid)
19 | ASM_PFX(AsmInvVpid):
20 | movl 4(%esp), %ecx
21 | movl 8(%esp), %eax
22 | .byte 0x66, 0x0f, 0x38, 0x81, 0x08 # INVVPID [rax], rcx
23 | pushfl
24 | pop %eax
25 | ret
26 |
27 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmSendInt2.asm:
--------------------------------------------------------------------------------
1 |
2 | .686P
3 | .MMX
4 | .MODEL FLAT,C
5 | .CODE
6 |
7 | AsmSendInt2 PROC PUBLIC
8 | int 2
9 | ret
10 | AsmSendInt2 ENDP
11 |
12 | END
13 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmTestAndReset.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmTestAndReset.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686p
19 | .MODEL flat,c
20 | .CODE
21 |
22 | AsmTestAndReset PROC PUBLIC
23 | mov ecx, [esp + 4]
24 | mov edx, [esp + 8]
25 | xor eax, eax
26 | lock btr [edx], ecx
27 | adc eax, eax
28 | ret
29 | AsmTestAndReset ENDP
30 |
31 | END
32 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmTestAndReset.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmTestAndReset.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmTestAndReset)
19 | ASM_PFX(AsmTestAndReset):
20 | movl 4(%esp), %ecx
21 | movl 8(%esp), %edx
22 | xorl %eax, %eax
23 | lock btr %ecx, (%edx)
24 | adcl %eax, %eax
25 | ret
26 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmTestAndSet.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmTestAndSet.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686p
19 | .MODEL flat,c
20 | .CODE
21 |
22 | AsmTestAndSet PROC PUBLIC
23 | mov ecx, [esp + 4]
24 | mov edx, [esp + 8]
25 | xor eax, eax
26 | lock bts [edx], ecx
27 | adc eax, eax
28 | ret
29 | AsmTestAndSet ENDP
30 |
31 | END
32 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmTestAndSet.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmTestAndSet.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmTestAndSet)
19 | ASM_PFX(AsmTestAndSet):
20 | movl 4(%esp), %ecx
21 | movl 8(%esp), %edx
22 | xorl %eax, %eax
23 | lock bts %ecx, (%edx)
24 | adcl %eax, %eax
25 | ret
26 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmClear.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmClear.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmClear PROC PUBLIC
24 | mov eax, [esp + 4]
25 | DB 066h, 0fh, 0c7h, 030h ; VMCLEAR [rax]
26 | pushfd
27 | pop eax
28 | ret
29 | AsmVmClear ENDP
30 |
31 | END
32 |
33 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmClear.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmClear.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmClear)
19 | ASM_PFX(AsmVmClear):
20 | movl 4(%esp), %eax
21 | .byte 0x66, 0x0f, 0xc7, 0x30 # VMCLEAR [rax]
22 | pushfl
23 | pop %eax
24 | ret
25 |
26 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmPtrLoad.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmPtrLoad.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmPtrLoad PROC PUBLIC
24 | mov eax, [esp + 4]
25 | DB 0fh, 0c7h, 30h ; VMPTRLD [rax]
26 | pushfd
27 | pop eax
28 | ret
29 | AsmVmPtrLoad ENDP
30 |
31 | END
32 |
33 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmPtrLoad.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmPtrLoad.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmPtrLoad)
19 | ASM_PFX(AsmVmPtrLoad):
20 | movl 4(%esp), %eax
21 | .byte 0x0f, 0xc7, 0x30 # VMPTRLD [rax]
22 | pushfl
23 | pop %eax
24 | ret
25 |
26 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmPtrStore.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmPtrStore.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmPtrStore PROC PUBLIC
24 | mov eax, [esp + 4]
25 | DB 0fh, 0c7h, 38h ; VMPTST [rax]
26 | pushfd
27 | pop eax
28 | ret
29 | AsmVmPtrStore ENDP
30 |
31 | END
32 |
33 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmPtrStore.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmPtrStore.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmPtrStore)
19 | ASM_PFX(AsmVmPtrStore):
20 | movl 4(%esp), %eax
21 | .byte 0x0f, 0xc7, 0x38 # VMPTST [rax]
22 | pushfl
23 | pop %eax
24 | ret
25 |
26 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmRead.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmRead.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmRead)
19 | ASM_PFX(AsmVmRead):
20 | movl 4(%esp), %eax
21 | xorl %ecx, %ecx
22 | .byte 0x0f, 0x78, 0xc1 # VMREAD rcx, rax
23 | pushfl
24 | pop %eax
25 | movl 8(%esp), %edx
26 | movl %ecx, (%edx)
27 | ret
28 |
29 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmWrite.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmWrite.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmWrite PROC PUBLIC
24 | mov eax, [esp + 4]
25 | mov ecx, [esp + 8]
26 | DB 0fh, 079h, 0c1h ; VMWRITE rax, rcx
27 | pushfd
28 | pop eax
29 | ret
30 | AsmVmWrite ENDP
31 |
32 | END
33 |
34 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmWrite.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxWrite.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmWrite)
19 | ASM_PFX(AsmVmWrite):
20 | movl 4(%esp), %eax
21 | movl 8(%esp), %ecx
22 | .byte 0x0f, 0x79, 0xc1 # VMWRITE rax, rcx
23 | pushfl
24 | pop %eax
25 | ret
26 |
27 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmxOff.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmxOff.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmxOff PROC PUBLIC
24 | DB 0fh, 01h, 0c4h ; VMXOFF
25 | pushfd
26 | pop eax
27 | ret
28 | AsmVmxOff ENDP
29 |
30 | END
31 |
32 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmxOff.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxOff.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmxOff)
19 | ASM_PFX(AsmVmxOff):
20 | .byte 0x0f, 0x01, 0xc4 # VMXOFF
21 | pushfl
22 | pop %eax
23 | ret
24 |
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmxOn.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmxOn.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmxOn PROC PUBLIC
24 | mov eax, [esp + 4]
25 | DB 0f3h, 0fh, 0c7h, 030h ; VMXON [rax]
26 | pushfd
27 | pop eax
28 | ret
29 | AsmVmxOn ENDP
30 |
31 | END
32 |
33 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmVmxOn.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxOn.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmxOn)
19 | ASM_PFX(AsmVmxOn):
20 | movl 4(%esp), %eax
21 | .byte 0xf3, 0x0f, 0xc7, 0x30 # VMXON [rax]
22 | pushfl
23 | pop %eax
24 | ret
25 |
26 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmXGetBv.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmXGetBv.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686p
19 | .MODEL flat,c
20 | .CODE
21 |
22 | AsmXGetBv PROC PUBLIC
23 | mov ecx, [esp + 4]
24 | db 0fh, 01h, 0d0h ; xgetbv
25 | ret
26 | AsmXGetBv ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmXGetBv.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXGetBv.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXGetBv)
19 | ASM_PFX(AsmXGetBv):
20 | movl 4(%esp), %ecx
21 | xgetbv # edx & eax are zero extended
22 | ret
23 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmXRestore.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXRestore.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXRestore)
19 | ASM_PFX(AsmXRestore):
20 | movl 4(%esp), %eax # eax = mask[31:0]
21 | movl 8(%esp), %edx # edx = mask[63:32]
22 | movl 12(%esp), %ecx # ecx = XStateBuffer
23 | xrstor (%ecx)
24 | ret
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmXSave.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXSave.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXSave)
19 | ASM_PFX(AsmXSave):
20 | movl 4(%esp), %eax # eax = mask[31:0]
21 | movl 8(%esp), %edx # edx = mask[63:32]
22 | movl 12(%esp), %ecx # ecx = XStateBuffer
23 | xsave (%ecx)
24 | ret
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmXSetBv.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmXSetBv.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686p
19 | .MODEL flat,c
20 | .CODE
21 |
22 | AsmXSetBv PROC PUBLIC
23 | mov edx, [esp + 12]
24 | mov eax, [esp + 8]
25 | mov ecx, [esp + 4]
26 | db 0fh, 01h, 0d1h ; xsetbv
27 | ret
28 | AsmXSetBv ENDP
29 |
30 | END
31 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/Ia32/AsmXSetBv.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXSetBv.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXSetBv)
19 | ASM_PFX(AsmXSetBv):
20 | movl 12(%esp), %edx
21 | movl 8(%esp), %eax
22 | movl 4(%esp), %ecx
23 | xsetbv
24 | ret
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmInvEpt.S:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmInvEpt.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmInvEpt)
19 | ASM_PFX(AsmInvEpt):
20 | movq %rdx, %rax
21 | .byte 0x66, 0x0f, 0x38, 0x80, 0x08 # INVEPT [rax], rcx
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmInvEpt.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmInvEpt.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmInvEpt PROC PUBLIC
21 | mov rax, rdx
22 | DB 066h, 0fh, 38h, 80h, 08h ; INVEPT [rax], rcx
23 | pushfq
24 | pop rax
25 | ret
26 | AsmInvEpt ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmInvEpt.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmInvEpt.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmInvEpt)
19 | ASM_PFX(AsmInvEpt):
20 | movq %rdx, %rax
21 | .byte 0x66, 0x0f, 0x38, 0x80, 0x08 # INVEPT [rax], rcx
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmInvVpid.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmInvVpid.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmInvVpid PROC PUBLIC
21 | mov rax, rdx
22 | DB 066h, 0fh, 38h, 81h, 08h ; INVVPID [rax], rcx
23 | pushfq
24 | pop rax
25 | ret
26 | AsmInvVpid ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmInvVpid.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmInvVpid.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmInvVpid)
19 | ASM_PFX(AsmInvVpid):
20 | movq %rdx, %rax
21 | .byte 0x66, 0x0f, 0x38, 0x81, 0x08 # INVVPID [rax], rcx
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmSendInt2.S:
--------------------------------------------------------------------------------
1 | ASM_GLOBAL ASM_PFX(AsmSendInt2)
2 | ASM_PFX(AsmSendInt2):
3 | int $2
4 | ret
5 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmSendInt2.asm:
--------------------------------------------------------------------------------
1 | .CODE
2 |
3 | AsmSendInt2 PROC PUBLIC
4 | int 2
5 | ret
6 | AsmSendInt2 ENDP
7 |
8 | END
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmTestAndReset.S:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmTestAndReset.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmTestAndReset)
19 | ASM_PFX(AsmTestAndReset):
20 | xorl %eax, %eax
21 | lock btr %ecx, (%rdx)
22 | adcl %eax, %eax
23 | ret
24 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmTestAndReset.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmTestAndReset.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmTestAndReset PROC PUBLIC
21 | xor eax, eax
22 | lock btr [rdx], ecx
23 | adc eax, eax
24 | ret
25 | AsmTestAndReset ENDP
26 |
27 | END
28 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmTestAndSet.S:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmTestAndSet.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmTestAndSet)
19 | ASM_PFX(AsmTestAndSet):
20 | xorl %eax, %eax
21 | lock bts %ecx, (%rdx)
22 | adcl %eax, %eax
23 | ret
24 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmTestAndSet.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmTestAndSet.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmTestAndSet PROC PUBLIC
21 | xor eax, eax
22 | lock bts [rdx], ecx
23 | adc eax, eax
24 | ret
25 | AsmTestAndSet ENDP
26 |
27 | END
28 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmClear.S:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmClear.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmClear)
19 | ASM_PFX(AsmVmClear):
20 | movq %rcx, %rax
21 | .byte 0x66, 0x0f, 0xc7, 0x30 # VMCLEAR [rax]
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmClear.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmClear.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmClear PROC PUBLIC
21 | mov rax, rcx
22 | DB 066h, 0fh, 0c7h, 030h ; VMCLEAR [rax]
23 | pushfq
24 | pop rax
25 | ret
26 | AsmVmClear ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmPtrLoad.S:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmPtrLoad.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmPtrLoad)
19 | ASM_PFX(AsmVmPtrLoad):
20 | movq %rcx, %rax
21 | .byte 0x0f, 0xc7, 0x30 # VMPTRLD [rax]
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmPtrLoad.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmPtrLoad.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmPtrLoad PROC PUBLIC
21 | mov rax, rcx
22 | DB 0fh, 0c7h, 30h ; VMPTRLD [rax]
23 | pushfq
24 | pop rax
25 | ret
26 | AsmVmPtrLoad ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmPtrStore.S:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmPtrStore.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmPtrStore)
19 | ASM_PFX(AsmVmPtrStore):
20 | movq %rcx, %rax
21 | .byte 0x0f, 0xc7, 0x38 # VMPTST [rax]
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmPtrStore.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmPtrStore.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmPtrStore PROC PUBLIC
21 | mov rax, rcx
22 | DB 0fh, 0c7h, 38h ; VMPTST [rax]
23 | pushfq
24 | pop rax
25 | ret
26 | AsmVmPtrStore ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmRead.S:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmRead.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmRead)
19 | ASM_PFX(AsmVmRead):
20 | xorq %rax, %rax
21 | movl %ecx, %eax
22 | xorq %rcx, %rcx
23 | .byte 0x0f, 0x78, 0xc1 # VMREAD rcx, rax
24 | pushfq
25 | pop %rax
26 | movq %rcx, (%rdx)
27 | ret
28 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmRead.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmRead.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmRead PROC PUBLIC
21 | xor rax, rax
22 | mov eax, ecx
23 | xor rcx, rcx
24 | DB 0fh, 078h, 0c1h ; VMREAD rcx, rax
25 | pushfq
26 | pop rax
27 | mov [rdx], rcx
28 | ret
29 | AsmVmRead ENDP
30 |
31 | END
32 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmWrite.S:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxWrite.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmWrite)
19 | ASM_PFX(AsmVmWrite):
20 | xorq %rax, %rax
21 | movl %ecx, %eax
22 | movq %rdx, %rcx
23 | .byte 0x0f, 0x79, 0xc1 # VMWRITE rax, rcx
24 | pushfq
25 | pop %rax
26 | ret
27 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmWrite.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmWrite.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmWrite PROC PUBLIC
21 | xor rax, rax
22 | mov eax, ecx
23 | mov rcx, rdx
24 | DB 0fh, 079h, 0c1h ; VMWRITE rax, rcx
25 | pushfq
26 | pop rax
27 | ret
28 | AsmVmWrite ENDP
29 |
30 | END
31 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmxOff.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmxOff.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmxOff PROC PUBLIC
21 | DB 0fh, 01h, 0c4h ; VMXOFF
22 | pushfq
23 | pop rax
24 | ret
25 | AsmVmxOff ENDP
26 |
27 | END
28 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmxOff.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxOff.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmxOff)
19 | ASM_PFX(AsmVmxOff):
20 | .byte 0x0f, 0x01, 0xc4 # VMXOFF
21 | pushfq
22 | pop %rax
23 | ret
24 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmxOn.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmxOn.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmxOn PROC PUBLIC
21 | mov rax, rcx
22 | DB 0f3h, 0fh, 0c7h, 030h ; VMXON [rax]
23 | pushfq
24 | pop rax
25 | ret
26 | AsmVmxOn ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmVmxOn.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxOn.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmxOn)
19 | ASM_PFX(AsmVmxOn):
20 | movq %rcx, %rax
21 | .byte 0xf3, 0x0f, 0xc7, 0x30 # VMXON [rax]
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmXGetBv.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmXGetBv.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmXGetBv PROC PUBLIC
21 | db 0fh, 01h, 0d0h ; xgetbv ; edx & eax are zero extended
22 | shl rdx, 20h
23 | or rax, rdx
24 | ret
25 | AsmXGetBv ENDP
26 |
27 | END
28 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmXGetBv.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXGetBv.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXGetBv)
19 | ASM_PFX(AsmXGetBv):
20 | xgetbv # edx & eax are zero extended
21 | shlq $0x20, %rdx
22 | orq %rdx, %rax
23 | ret
24 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmXSave.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXSave.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXSave)
19 | ASM_PFX(AsmXSave):
20 | movq %rdx, %r8 # r8 = XStateBuffer
21 | movl %ecx, %eax # eax = mask[31:0]
22 | shrq $0x20, %rcx
23 | movl %ecx, %edx # edx = mask[63:32]
24 | movq %r8, %rcx # rcx = XStateBuffer
25 | xsave (%rcx)
26 | ret
27 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmXSetBv.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmXSetBv.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmXSetBv PROC PUBLIC
21 | mov rax, rdx ; meanwhile, rax <- return value
22 | shr rdx, 20h ; edx:eax contains the value to write
23 | db 0fh, 01h, 0d1h ; xsetbv
24 | ret
25 | AsmXSetBv ENDP
26 |
27 | END
28 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmLib/x64/AsmXSetBv.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXSetBv.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXSetBv)
19 | ASM_PFX(AsmXSetBv):
20 | movq %rdx, %rax # meanwhile, rax <- return value
21 | shrq $0x20, %rdx # edx:eax contains the value to write
22 | xsetbv
23 | ret
24 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/StmPlatformLibNull/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | add_library(StmPlatformLib STATIC
3 | StmPlatformLibNull.c
4 | )
5 |
6 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Library/coreboot/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(corebootLib STATIC
2 | coreboot.c
3 | )
4 |
5 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Tool/GenStm/GNUmakefile:
--------------------------------------------------------------------------------
1 | ARCH ?= IA32
2 | MAKEROOT ?= ..
3 |
4 | STM_HOME=$(WORKSPACE)/StmPkg
5 |
6 | # BUGBUG need add "-I $(INC)" to $(INCLUDE)
7 | INC = -I $(STM_HOME)/Include -I $(WORKSPACE)/MdePkg/Include
8 |
9 | APPNAME = GenStm
10 |
11 | LIBS = -lCommon
12 |
13 | OBJECTS = GenStm.o
14 |
15 | include $(MAKEROOT)/Makefiles/app.makefile
16 |
--------------------------------------------------------------------------------
/Stm/StmPkg/Tool/GenStm/GenStm.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Stm/StmPkg/Tool/GenStm/GenStm.exe
--------------------------------------------------------------------------------
/Stm/StmPkg/Tool/GenStm/Makefile:
--------------------------------------------------------------------------------
1 |
2 | STM_HOME=$(WORKSPACE)\StmPkg
3 |
4 | INC = $(INC) -I $(STM_HOME)\include -I $(WORKSPACE)\MdePkg\include
5 |
6 | !INCLUDE ..\Makefiles\ms.common
7 |
8 | APPNAME = GenStm
9 |
10 | LIBS = $(LIB_PATH)\Common.lib
11 |
12 | OBJECTS = GenStm.obj
13 |
14 | !INCLUDE ..\Makefiles\ms.app
15 |
16 |
--------------------------------------------------------------------------------
/Stm/buildstm.sh:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
3 | # This program and the accompanying materials
4 | # are licensed and made available under the terms and conditions of the BSD License
5 | # which accompanies this distribution. The full text of the license may be found at
6 | # http://opensource.org/licenses/bsd-license.php.
7 | #
8 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
10 | #
11 |
12 | build -p StmPkg/StmPkg.dsc -a IA32 -a X64 -t UNIXGCC
13 |
14 | BaseTools/Source/C/bin/GenStm -e --debug 5 -o Build/StmPkg/DEBUG_UNIXGCC/IA32/Stm.bin Build/StmPkg/DEBUG_UNIXGCC/IA32/StmPkg/Core/Stm/DEBUG/Stm.dll
15 | BaseTools/Source/C/bin/GenStm -e --debug 5 -o Build/StmPkg/DEBUG_UNIXGCC/X64/Stm.bin Build/StmPkg/DEBUG_UNIXGCC/X64/StmPkg/Core/Stm/DEBUG/Stm.dll
16 |
17 |
--------------------------------------------------------------------------------
/Stm/buildstmtool.bat:
--------------------------------------------------------------------------------
1 | @REM
2 | @REM Copyright (c) 2015, Intel Corporation
3 | @REM All rights reserved. This program and the accompanying materials
4 | @REM are licensed and made available under the terms and conditions of the BSD License
5 | @REM which accompanies this distribution. The full text of the license may be found at
6 | @REM http://opensource.org/licenses/bsd-license.php.
7 | @REM
8 | @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 | @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
10 | @REM
11 |
12 | @pushd "%BASE_TOOLS_PATH%"\Source\C
13 | nmake
14 | @popd
15 |
16 | @echo STM tool build finish!
17 | @echo ################################################################################
18 | @echo # GENSTM.EXE : %BASE_TOOLS_PATH%\Bin\Win32\GenStm.exe
19 | @echo ################################################################################
20 |
21 |
--------------------------------------------------------------------------------
/Stm/cmake/git_version.c.in:
--------------------------------------------------------------------------------
1 | #include "git_version.h"
2 | const char *kGitHash = "@GIT_HASH@";
3 |
--------------------------------------------------------------------------------
/Stm/cmake/git_version.h:
--------------------------------------------------------------------------------
1 | #ifndef GIT_VERSION_H
2 | #define GIT_VERSION_H
3 |
4 | extern const char *kGitHash;
5 |
6 | #endif // GIT_VERSION_H
7 |
--------------------------------------------------------------------------------
/Test/DmaPkg/DmaPkg.dec:
--------------------------------------------------------------------------------
1 | ## @file DmaPkg.dec
2 | #
3 | # Copyright (c) 2014, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | ##
13 |
14 | [Defines]
15 | DEC_SPECIFICATION = 0x00010005
16 | PACKAGE_NAME = DmaPkg
17 | PACKAGE_GUID = 2C59B8C0-9B9D-4EF8-A002-9FAB1A56C8AF
18 | PACKAGE_VERSION = 0.1
19 |
20 | [Includes]
21 | Include
22 |
23 | [Guids]
24 |
25 | [Protocols]
26 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Core/Runtime/ExceptionHandler.c:
--------------------------------------------------------------------------------
1 | /** @file
2 |
3 | Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | This program and the accompanying materials
5 | are licensed and made available under the terms and conditions of the BSD License
6 | which accompanies this distribution. The full text of the license may be found at
7 | http://opensource.org/licenses/bsd-license.php.
8 |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 |
12 | **/
13 |
14 | #include
15 | #include "FrmHandler.h"
16 |
17 | /**
18 |
19 | This is exception handler in C.
20 |
21 | @param Int Interrupt vector
22 | @param ErrorCode Exception error code.
23 |
24 | **/
25 | VOID
26 | EFIAPI
27 | ExceptionHandlerC (
28 | IN UINTN Int,
29 | IN UINTN ErrorCode
30 | )
31 | {
32 | DEBUG ((EFI_D_ERROR, "(FRM) !!!ExceptionHandlerC!!! - \n"));
33 | CpuDeadLoop ();
34 | return ;
35 | }
36 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Core/Runtime/VmcallHandler.c:
--------------------------------------------------------------------------------
1 | /** @file
2 |
3 | Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | This program and the accompanying materials
5 | are licensed and made available under the terms and conditions of the BSD License
6 | which accompanies this distribution. The full text of the license may be found at
7 | http://opensource.org/licenses/bsd-license.php.
8 |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 |
12 | **/
13 |
14 | #include
15 | #include "FrmHandler.h"
16 |
17 | /**
18 |
19 | This function is VMCALL handler.
20 |
21 | @param Index CPU index
22 |
23 | **/
24 | VOID
25 | VmcallHandler (
26 | IN UINT32 Index
27 | )
28 | {
29 | // VmCallDispatcher (Index, (UINT32)mGuestContextCommon.GuestContextPerCpu[Index].Register.Rax);
30 |
31 | VmWriteN (VMCS_N_GUEST_RIP_INDEX, VmReadN(VMCS_N_GUEST_RIP_INDEX) + VmRead32(VMCS_32_RO_VMEXIT_INSTRUCTION_LENGTH_INDEX));
32 | return ;
33 | }
34 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Core/Tpm.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Test/FrmPkg/Core/Tpm.c
--------------------------------------------------------------------------------
/Test/FrmPkg/FrmBin/Frm.depex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Test/FrmPkg/FrmBin/Frm.inf:
--------------------------------------------------------------------------------
1 | ## @file
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | #
5 | # This program and the accompanying materials
6 | # are licensed and made available under the terms and conditions of the BSD License
7 | # which accompanies this distribution. The full text of the license may be found at
8 | # http://opensource.org/licenses/bsd-license.php
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | #
13 | ##
14 | ##
15 |
16 | [Defines]
17 | INF_VERSION = 0x00010006
18 | BASE_NAME = Frm
19 | FILE_GUID = 0F50B4B1-C62F-4902-B3AF-E79DBED20109
20 | MODULE_TYPE = DXE_DRIVER
21 | VERSION_STRING = 1.0
22 |
23 | [Binaries.X64]
24 | PE32|Frm.efi|*
25 | DXE_DEPEX|Frm.depex|*
26 |
27 | [Depex]
28 | FALSE
29 |
30 |
--------------------------------------------------------------------------------
/Test/FrmPkg/FrmBin/FrmLoader.depex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EugeneDMyers/STM/3a30f0e296bcda772d9ea5ca304e24fe496a83dd/Test/FrmPkg/FrmBin/FrmLoader.depex
--------------------------------------------------------------------------------
/Test/FrmPkg/FrmBin/StmService.depex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Test/FrmPkg/FrmPkg.Sample.fdf:
--------------------------------------------------------------------------------
1 | ## @file FrmPkg.Sample.fdf
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | ##
13 |
14 | INF USE=X64 FrmPkg/TestBin/X64$(TARGET)/Frm.inf
15 | INF USE=X64 FrmPkg/TestBin/X64$(TARGET)/StmService.inf
16 | INF USE=X64 FrmPkg/TestBin/X64$(TARGET)/FrmLoader.inf
17 |
18 | [Rule.Common.DXE_DRIVER.BINARY]
19 | FILE DRIVER = $(NAMED_GUID) {
20 | DXE_DEPEX DXE_DEPEX Optional |.depex
21 | PE32 PE32 |.efi
22 | UI STRING="$(MODULE_NAME)" Optional
23 | VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
24 | }
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Include/Ia32/CpuArchSpecific.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | CPU arch specific definition
3 |
4 | Copyright (c) 2015, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials
6 | are licensed and made available under the terms and conditions of the BSD License
7 | which accompanies this distribution. The full text of the license may be found at
8 | http://opensource.org/licenses/bsd-license.php.
9 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 |
13 | **/
14 |
15 | #ifndef _CPU_ARCH_SPECIFIC_H_
16 | #define _CPU_ARCH_SPECIFIC_H_
17 |
18 | #pragma pack (push, 1)
19 | typedef struct _X86_REGISTER {
20 | UINTN Rax; // 0/0
21 | UINTN Rcx; // 4/8
22 | UINTN Rdx; // 8/16
23 | UINTN Rbx; // 12/24
24 | UINTN Rsp; // 16/32
25 | UINTN Rbp; // 20/40
26 | UINTN Rsi; // 24/48
27 | UINTN Rdi; // 28/56
28 | } X86_REGISTER;
29 | #pragma pack (pop)
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmInvEpt.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmInvEpt.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmInvEpt PROC PUBLIC
24 | mov ecx, [esp + 4]
25 | mov eax, [esp + 8]
26 | DB 066h, 0fh, 38h, 80h, 08h ; INVEPT [rax], rcx
27 | pushfd
28 | pop eax
29 | ret
30 | AsmInvEpt ENDP
31 |
32 | END
33 |
34 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmInvEpt.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmInvEpt.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmInvEpt)
19 | ASM_PFX(AsmInvEpt):
20 | movl 4(%esp), %ecx
21 | movl 8(%esp), %eax
22 | .byte 0x66, 0x0f, 0x38, 0x80, 0x08 # INVEPT [rax], rcx
23 | pushfl
24 | pop %eax
25 | ret
26 |
27 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmInvVpid.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmInvVpid.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmInvVpid PROC PUBLIC
24 | mov ecx, [esp + 4]
25 | mov eax, [esp + 8]
26 | DB 066h, 0fh, 38h, 81h, 08h ; INVVPID [rax], rcx
27 | pushfd
28 | pop eax
29 | ret
30 | AsmInvVpid ENDP
31 |
32 | END
33 |
34 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmInvVpid.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmInvVpid.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmInvVpid)
19 | ASM_PFX(AsmInvVpid):
20 | movl 4(%esp), %ecx
21 | movl 8(%esp), %eax
22 | .byte 0x66, 0x0f, 0x38, 0x81, 0x08 # INVVPID [rax], rcx
23 | pushfl
24 | pop %eax
25 | ret
26 |
27 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmTestAndReset.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmTestAndReset.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686p
19 | .MODEL flat,c
20 | .CODE
21 |
22 | AsmTestAndReset PROC PUBLIC
23 | mov ecx, [esp + 4]
24 | mov edx, [esp + 8]
25 | xor eax, eax
26 | lock btr [edx], ecx
27 | adc eax, eax
28 | ret
29 | AsmTestAndReset ENDP
30 |
31 | END
32 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmTestAndReset.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmTestAndReset.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmTestAndReset)
19 | ASM_PFX(AsmTestAndReset):
20 | movl 4(%esp), %ecx
21 | movl 8(%esp), %edx
22 | xorl %eax, %eax
23 | lock btr %ecx, (%edx)
24 | adcl %eax, %eax
25 | ret
26 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmTestAndSet.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmTestAndSet.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686p
19 | .MODEL flat,c
20 | .CODE
21 |
22 | AsmTestAndSet PROC PUBLIC
23 | mov ecx, [esp + 4]
24 | mov edx, [esp + 8]
25 | xor eax, eax
26 | lock bts [edx], ecx
27 | adc eax, eax
28 | ret
29 | AsmTestAndSet ENDP
30 |
31 | END
32 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmTestAndSet.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmTestAndSet.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmTestAndSet)
19 | ASM_PFX(AsmTestAndSet):
20 | movl 4(%esp), %ecx
21 | movl 8(%esp), %edx
22 | xorl %eax, %eax
23 | lock bts %ecx, (%edx)
24 | adcl %eax, %eax
25 | ret
26 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmClear.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmClear.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmClear PROC PUBLIC
24 | mov eax, [esp + 4]
25 | DB 066h, 0fh, 0c7h, 030h ; VMCLEAR [rax]
26 | pushfd
27 | pop eax
28 | ret
29 | AsmVmClear ENDP
30 |
31 | END
32 |
33 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmClear.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmClear.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmClear)
19 | ASM_PFX(AsmVmClear):
20 | movl 4(%esp), %eax
21 | .byte 0x66, 0x0f, 0xc7, 0x30 # VMCLEAR [rax]
22 | pushfl
23 | pop %eax
24 | ret
25 |
26 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmPtrLoad.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmPtrLoad.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmPtrLoad PROC PUBLIC
24 | mov eax, [esp + 4]
25 | DB 0fh, 0c7h, 30h ; VMPTRLD [rax]
26 | pushfd
27 | pop eax
28 | ret
29 | AsmVmPtrLoad ENDP
30 |
31 | END
32 |
33 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmPtrLoad.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmPtrLoad.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmPtrLoad)
19 | ASM_PFX(AsmVmPtrLoad):
20 | movl 4(%esp), %eax
21 | .byte 0x0f, 0xc7, 0x30 # VMPTRLD [rax]
22 | pushfl
23 | pop %eax
24 | ret
25 |
26 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmPtrStore.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmPtrStore.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmPtrStore PROC PUBLIC
24 | mov eax, [esp + 4]
25 | DB 0fh, 0c7h, 38h ; VMPTST [rax]
26 | pushfd
27 | pop eax
28 | ret
29 | AsmVmPtrStore ENDP
30 |
31 | END
32 |
33 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmPtrStore.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmPtrStore.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmPtrStore)
19 | ASM_PFX(AsmVmPtrStore):
20 | movl 4(%esp), %eax
21 | .byte 0x0f, 0xc7, 0x38 # VMPTST [rax]
22 | pushfl
23 | pop %eax
24 | ret
25 |
26 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmRead.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmRead.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmRead)
19 | ASM_PFX(AsmVmRead):
20 | movl 4(%esp), %eax
21 | xorl %ecx, %ecx
22 | .byte 0x0f, 0x78, 0xc1 # VMREAD rcx, rax
23 | pushfl
24 | pop %eax
25 | movl 8(%esp), %edx
26 | movl %ecx, (%edx)
27 | ret
28 |
29 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmWrite.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmWrite.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmWrite PROC PUBLIC
24 | mov eax, [esp + 4]
25 | mov ecx, [esp + 8]
26 | DB 0fh, 079h, 0c1h ; VMWRITE rax, rcx
27 | pushfd
28 | pop eax
29 | ret
30 | AsmVmWrite ENDP
31 |
32 | END
33 |
34 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmWrite.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxWrite.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmWrite)
19 | ASM_PFX(AsmVmWrite):
20 | movl 4(%esp), %eax
21 | movl 8(%esp), %ecx
22 | .byte 0x0f, 0x79, 0xc1 # VMWRITE rax, rcx
23 | pushfl
24 | pop %eax
25 | ret
26 |
27 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmxOff.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmxOff.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmxOff PROC PUBLIC
24 | DB 0fh, 01h, 0c4h ; VMXOFF
25 | pushfd
26 | pop eax
27 | ret
28 | AsmVmxOff ENDP
29 |
30 | END
31 |
32 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmxOff.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxOff.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmxOff)
19 | ASM_PFX(AsmVmxOff):
20 | .byte 0x0f, 0x01, 0xc4 # VMXOFF
21 | pushfl
22 | pop %eax
23 | ret
24 |
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmxOn.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmxOn.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686P
19 | .MMX
20 | .MODEL FLAT,C
21 | .CODE
22 |
23 | AsmVmxOn PROC PUBLIC
24 | mov eax, [esp + 4]
25 | DB 0f3h, 0fh, 0c7h, 030h ; VMXON [rax]
26 | pushfd
27 | pop eax
28 | ret
29 | AsmVmxOn ENDP
30 |
31 | END
32 |
33 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmVmxOn.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxOn.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmxOn)
19 | ASM_PFX(AsmVmxOn):
20 | movl 4(%esp), %eax
21 | .byte 0xf3, 0x0f, 0xc7, 0x30 # VMXON [rax]
22 | pushfl
23 | pop %eax
24 | ret
25 |
26 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmXGetBv.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmXGetBv.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686p
19 | .MODEL flat,c
20 | .CODE
21 |
22 | AsmXGetBv PROC PUBLIC
23 | mov ecx, [esp + 4]
24 | db 0fh, 01h, 0d0h ; xgetbv
25 | ret
26 | AsmXGetBv ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmXGetBv.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXGetBv.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXGetBv)
19 | ASM_PFX(AsmXGetBv):
20 | movl 4(%esp), %ecx
21 | xgetbv # edx & eax are zero extended
22 | ret
23 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmXRestore.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXRestore.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXRestore)
19 | ASM_PFX(AsmXRestore):
20 | movl 4(%esp), %eax # eax = mask[31:0]
21 | movl 8(%esp), %edx # edx = mask[63:32]
22 | movl 12(%esp), %ecx # ecx = XStateBuffer
23 | xrstor (%ecx)
24 | ret
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmXSave.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXSave.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXSave)
19 | ASM_PFX(AsmXSave):
20 | movl 4(%esp), %eax # eax = mask[31:0]
21 | movl 8(%esp), %edx # edx = mask[63:32]
22 | movl 12(%esp), %ecx # ecx = XStateBuffer
23 | xsave (%ecx)
24 | ret
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmXSetBv.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmXSetBv.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .686p
19 | .MODEL flat,c
20 | .CODE
21 |
22 | AsmXSetBv PROC PUBLIC
23 | mov edx, [esp + 12]
24 | mov eax, [esp + 8]
25 | mov ecx, [esp + 4]
26 | db 0fh, 01h, 0d1h ; xsetbv
27 | ret
28 | AsmXSetBv ENDP
29 |
30 | END
31 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/Ia32/AsmXSetBv.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXSetBv.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXSetBv)
19 | ASM_PFX(AsmXSetBv):
20 | movl 12(%esp), %edx
21 | movl 8(%esp), %eax
22 | movl 4(%esp), %ecx
23 | xsetbv
24 | ret
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmInvEpt.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmInvEpt.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmInvEpt PROC PUBLIC
21 | mov rax, rdx
22 | DB 066h, 0fh, 38h, 80h, 08h ; INVEPT [rax], rcx
23 | pushfq
24 | pop rax
25 | ret
26 | AsmInvEpt ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmInvEpt.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmInvEpt.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmInvEpt)
19 | ASM_PFX(AsmInvEpt):
20 | movq %rdx, %rax
21 | .byte 0x66, 0x0f, 0x38, 0x80, 0x08 # INVEPT [rax], rcx
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmInvVpid.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmInvVpid.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmInvVpid PROC PUBLIC
21 | mov rax, rdx
22 | DB 066h, 0fh, 38h, 81h, 08h ; INVVPID [rax], rcx
23 | pushfq
24 | pop rax
25 | ret
26 | AsmInvVpid ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmInvVpid.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmInvVpid.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmInvVpid)
19 | ASM_PFX(AsmInvVpid):
20 | movq %rdx, %rax
21 | .byte 0x66, 0x0f, 0x38, 0x81, 0x08 # INVVPID [rax], rcx
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmTestAndReset.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmTestAndReset.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmTestAndReset PROC PUBLIC
21 | xor eax, eax
22 | lock btr [rdx], ecx
23 | adc eax, eax
24 | ret
25 | AsmTestAndReset ENDP
26 |
27 | END
28 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmTestAndReset.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmTestAndReset.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmTestAndReset)
19 | ASM_PFX(AsmTestAndReset):
20 | xorl %eax, %eax
21 | lock btr %ecx, (%rdx)
22 | adcl %eax, %eax
23 | ret
24 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmTestAndSet.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmTestAndSet.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmTestAndSet PROC PUBLIC
21 | xor eax, eax
22 | lock bts [rdx], ecx
23 | adc eax, eax
24 | ret
25 | AsmTestAndSet ENDP
26 |
27 | END
28 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmTestAndSet.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmTestAndSet.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmTestAndSet)
19 | ASM_PFX(AsmTestAndSet):
20 | xorl %eax, %eax
21 | lock bts %ecx, (%rdx)
22 | adcl %eax, %eax
23 | ret
24 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmClear.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmClear.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmClear PROC PUBLIC
21 | mov rax, rcx
22 | DB 066h, 0fh, 0c7h, 030h ; VMCLEAR [rax]
23 | pushfq
24 | pop rax
25 | ret
26 | AsmVmClear ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmClear.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmClear.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmClear)
19 | ASM_PFX(AsmVmClear):
20 | movq %rcx, %rax
21 | .byte 0x66, 0x0f, 0xc7, 0x30 # VMCLEAR [rax]
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmPtrLoad.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmPtrLoad.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmPtrLoad PROC PUBLIC
21 | mov rax, rcx
22 | DB 0fh, 0c7h, 30h ; VMPTRLD [rax]
23 | pushfq
24 | pop rax
25 | ret
26 | AsmVmPtrLoad ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmPtrLoad.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmPtrLoad.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmPtrLoad)
19 | ASM_PFX(AsmVmPtrLoad):
20 | movq %rcx, %rax
21 | .byte 0x0f, 0xc7, 0x30 # VMPTRLD [rax]
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmPtrStore.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmPtrStore.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmPtrStore PROC PUBLIC
21 | mov rax, rcx
22 | DB 0fh, 0c7h, 38h ; VMPTST [rax]
23 | pushfq
24 | pop rax
25 | ret
26 | AsmVmPtrStore ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmPtrStore.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmPtrStore.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmPtrStore)
19 | ASM_PFX(AsmVmPtrStore):
20 | movq %rcx, %rax
21 | .byte 0x0f, 0xc7, 0x38 # VMPTST [rax]
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmRead.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmRead.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmRead PROC PUBLIC
21 | xor rax, rax
22 | mov eax, ecx
23 | xor rcx, rcx
24 | DB 0fh, 078h, 0c1h ; VMREAD rcx, rax
25 | pushfq
26 | pop rax
27 | mov [rdx], rcx
28 | ret
29 | AsmVmRead ENDP
30 |
31 | END
32 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmRead.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmRead.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmRead)
19 | ASM_PFX(AsmVmRead):
20 | xorq %rax, %rax
21 | movl %ecx, %eax
22 | xorq %rcx, %rcx
23 | .byte 0x0f, 0x78, 0xc1 # VMREAD rcx, rax
24 | pushfq
25 | pop %rax
26 | movq %rcx, (%rdx)
27 | ret
28 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmWrite.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmWrite.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmWrite PROC PUBLIC
21 | xor rax, rax
22 | mov eax, ecx
23 | mov rcx, rdx
24 | DB 0fh, 079h, 0c1h ; VMWRITE rax, rcx
25 | pushfq
26 | pop rax
27 | ret
28 | AsmVmWrite ENDP
29 |
30 | END
31 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmWrite.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxWrite.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmWrite)
19 | ASM_PFX(AsmVmWrite):
20 | xorq %rax, %rax
21 | movl %ecx, %eax
22 | movq %rdx, %rcx
23 | .byte 0x0f, 0x79, 0xc1 # VMWRITE rax, rcx
24 | pushfq
25 | pop %rax
26 | ret
27 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmxOff.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmxOff.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmxOff PROC PUBLIC
21 | DB 0fh, 01h, 0c4h ; VMXOFF
22 | pushfq
23 | pop rax
24 | ret
25 | AsmVmxOff ENDP
26 |
27 | END
28 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmxOff.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxOff.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmxOff)
19 | ASM_PFX(AsmVmxOff):
20 | .byte 0x0f, 0x01, 0xc4 # VMXOFF
21 | pushfq
22 | pop %rax
23 | ret
24 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmxOn.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmVmxOn.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmVmxOn PROC PUBLIC
21 | mov rax, rcx
22 | DB 0f3h, 0fh, 0c7h, 030h ; VMXON [rax]
23 | pushfq
24 | pop rax
25 | ret
26 | AsmVmxOn ENDP
27 |
28 | END
29 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmVmxOn.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmVmxOn.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmVmxOn)
19 | ASM_PFX(AsmVmxOn):
20 | movq %rcx, %rax
21 | .byte 0xf3, 0x0f, 0xc7, 0x30 # VMXON [rax]
22 | pushfq
23 | pop %rax
24 | ret
25 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmXGetBv.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmXGetBv.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmXGetBv PROC PUBLIC
21 | db 0fh, 01h, 0d0h ; xgetbv ; edx & eax are zero extended
22 | shl rdx, 20h
23 | or rax, rdx
24 | ret
25 | AsmXGetBv ENDP
26 |
27 | END
28 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmXGetBv.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXGetBv.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXGetBv)
19 | ASM_PFX(AsmXGetBv):
20 | xgetbv # edx & eax are zero extended
21 | shlq $0x20, %rdx
22 | orq %rdx, %rax
23 | ret
24 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmXSave.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXSave.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXSave)
19 | ASM_PFX(AsmXSave):
20 | movq %rdx, %r8 # r8 = XStateBuffer
21 | movl %ecx, %eax # eax = mask[31:0]
22 | shrq $0x20, %rcx
23 | movl %ecx, %edx # edx = mask[63:32]
24 | movq %r8, %rcx # rcx = XStateBuffer
25 | xsave (%rcx)
26 | ret
27 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmXSetBv.asm:
--------------------------------------------------------------------------------
1 | ;------------------------------------------------------------------------------
2 | ;
3 | ; Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | ; This program and the accompanying materials
5 | ; are licensed and made available under the terms and conditions of the BSD License
6 | ; which accompanies this distribution. The full text of the license may be found at
7 | ; http://opensource.org/licenses/bsd-license.php.
8 | ;
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | ;
12 | ; Module Name:
13 | ;
14 | ; AsmXSetBv.asm
15 | ;
16 | ;------------------------------------------------------------------------------
17 |
18 | .CODE
19 |
20 | AsmXSetBv PROC PUBLIC
21 | mov rax, rdx ; meanwhile, rax <- return value
22 | shr rdx, 20h ; edx:eax contains the value to write
23 | db 0fh, 01h, 0d1h ; xsetbv
24 | ret
25 | AsmXSetBv ENDP
26 |
27 | END
28 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/FrmLib/x64/AsmXSetBv.s:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | #
3 | # Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | # This program and the accompanying materials
5 | # are licensed and made available under the terms and conditions of the BSD License
6 | # which accompanies this distribution. The full text of the license may be found at
7 | # http://opensource.org/licenses/bsd-license.php.
8 | #
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 | #
12 | # Module Name:
13 | #
14 | # AsmXSetBv.s
15 | #
16 | #------------------------------------------------------------------------------
17 |
18 | ASM_GLOBAL ASM_PFX(AsmXSetBv)
19 | ASM_PFX(AsmXSetBv):
20 | movq %rdx, %rax # meanwhile, rax <- return value
21 | shrq $0x20, %rdx # edx:eax contains the value to write
22 | xsetbv
23 | ret
24 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/HashLibTpm2/HashLibTpm2.uni:
--------------------------------------------------------------------------------
1 | // /** @file
2 | // Provides hash service using TPM2 device
3 | //
4 | // This library uses TPM2 device to calculate hash. Platform can use PcdTpm2HashMask to
5 | // mask some hash calculation.
6 | //
7 | // Copyright (c) 2014, Intel Corporation. All rights reserved.
8 | //
9 | // This program and the accompanying materials
10 | // are licensed and made available under the terms and conditions of the BSD License
11 | // which accompanies this distribution. The full text of the license may be found at
12 | // http://opensource.org/licenses/bsd-license.php
13 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 | //
16 | // **/
17 |
18 |
19 | #string STR_MODULE_ABSTRACT #language en-US "Provides hash service using TPM2 device"
20 |
21 | #string STR_MODULE_DESCRIPTION #language en-US "This library uses TPM2 device to calculate hash. Platform can use PcdTpm2HashMask to mask some hash calculation."
22 |
23 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/Tpm12CommandLib/Tpm12CommandLib.uni:
--------------------------------------------------------------------------------
1 | // /** @file
2 | // Provides some TPM 1.2 commands
3 | //
4 | // This library is used by other modules to send TPM 1.2 command.
5 | //
6 | // Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
7 | //
8 | // This program and the accompanying materials
9 | // are licensed and made available under the terms and conditions of the BSD License
10 | // which accompanies this distribution. The full text of the license may be found at
11 | // http://opensource.org/licenses/bsd-license.php
12 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 | //
15 | // **/
16 |
17 |
18 | #string STR_MODULE_ABSTRACT #language en-US "Provides some TPM 1.2 command functions"
19 |
20 | #string STR_MODULE_DESCRIPTION #language en-US "This library is used by other modules to send TPM 1.2 command."
21 |
22 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/Tpm12HashLibTpm/Tpm12HashLibTpm.uni:
--------------------------------------------------------------------------------
1 | // /** @file
2 | // Provides hash service using TPM12 device
3 | //
4 | // This library uses TPM12 device to calculate hash.
5 | //
6 | // Copyright (c) 2016, Intel Corporation. All rights reserved.
7 | //
8 | // This program and the accompanying materials
9 | // are licensed and made available under the terms and conditions of the BSD License
10 | // which accompanies this distribution. The full text of the license may be found at
11 | // http://opensource.org/licenses/bsd-license.php
12 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 | //
15 | // **/
16 |
17 |
18 | #string STR_MODULE_ABSTRACT #language en-US "Provides hash service using TPM12 device"
19 |
20 | #string STR_MODULE_DESCRIPTION #language en-US "This library uses TPM12 device to calculate hash."
21 |
22 |
--------------------------------------------------------------------------------
/Test/FrmPkg/Library/Tpm2CommandLib/Tpm2CommandLib.uni:
--------------------------------------------------------------------------------
1 | // /** @file
2 | // Provides some TPM 2.0 commands
3 | //
4 | // This library is used by other modules to send TPM 2.0 command.
5 | //
6 | // Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
7 | //
8 | // This program and the accompanying materials
9 | // are licensed and made available under the terms and conditions of the BSD License
10 | // which accompanies this distribution. The full text of the license may be found at
11 | // http://opensource.org/licenses/bsd-license.php
12 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 | //
15 | // **/
16 |
17 |
18 | #string STR_MODULE_ABSTRACT #language en-US "Provides some TPM 2.0 command functions"
19 |
20 | #string STR_MODULE_DESCRIPTION #language en-US "This library is used by other modules to send TPM 2.0 command."
21 |
22 |
--------------------------------------------------------------------------------
/Test/FrmPkg/LoaderApp/Loader.h:
--------------------------------------------------------------------------------
1 | /** @file
2 |
3 | Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | This program and the accompanying materials
5 | are licensed and made available under the terms and conditions of the BSD License
6 | which accompanies this distribution. The full text of the license may be found at
7 | http://opensource.org/licenses/bsd-license.php.
8 |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 |
12 | **/
13 |
14 | #ifndef _LOADER_H_
15 | #define _LOADER_H_
16 |
17 | #define LOW_MEMORY_SIZE 0x4000 // 16K
18 | #define HIGH_MEMORY_SIZE_COMMON 0x4000000 // 64M
19 | #define HIGH_MEMORY_SIZE_PER_CPU 0x2000000 // 32M
20 | #define EBDA_MEMORY_SIZE 0x1000 // 4K
21 | #define EBDA_BASE_ADDRESS 0x40E
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/Test/FrmPkg/LoaderDriver/Loader.h:
--------------------------------------------------------------------------------
1 | /** @file
2 |
3 | Copyright (c) 2015, Intel Corporation. All rights reserved.
4 | This program and the accompanying materials
5 | are licensed and made available under the terms and conditions of the BSD License
6 | which accompanies this distribution. The full text of the license may be found at
7 | http://opensource.org/licenses/bsd-license.php.
8 |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 |
12 | **/
13 |
14 | #ifndef _LOADER_H_
15 | #define _LOADER_H_
16 |
17 | #define LOW_MEMORY_SIZE 0x4000 // 16K
18 | #define HIGH_MEMORY_SIZE_COMMON 0x4000000 // 64M
19 | #define HIGH_MEMORY_SIZE_PER_CPU 0x2000000 // 32M
20 | #define EBDA_MEMORY_SIZE 0x1000 // 4K
21 | #define EBDA_BASE_ADDRESS 0x40E
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------