================================================================================
Intel(R) 2015-STM Release
July 28th, 2015
================================================================================

================================================================================
                                  DISCLAIMER
================================================================================
This release note as well as the software described in it is furnished under license
and may only be used or copied in accordance with the terms of the license. The
information in this manual is furnished for informational use only, is subject to
change without notice, and should not be construed as a commitment by Intel Corporation.
Intel Corporation assumes no responsibility or liability for any errors or inaccuracies
that may appear in this document or any software that may be provided in association
with this document.
Except as permitted by such license, no part of this document may be reproduced,
stored in a retrieval system, or transmitted in any form or by any means without
the express written consent of Intel Corporation.

================================================================================
                               ADDITIONAL DISCLAIMER
================================================================================
This package is targeted at STM Packages Release.
Please refer to "FEATURES IN RELEASE" section.

================================================================================
                                    INDEX
================================================================================
1.  FILES LIST
2.  HOW TO BUILD
3.  FEATURES
4.  KNOWN LIMITATION
5.  MISC

================================================================================
                                  FILES LIST
================================================================================
1. "ReleaseNote.txt"
   Release note for Intel(R) 2015-STM Release.
2. "Stm.zip"
   The STM Package
3. "Test.zip"
   The Test module to test STM.
4. "BIOS.zip"
   The BIOS module to enable STM.

================================================================================
                                 HOW TO BUILD
================================================================================
A. How to build STM.
0. Install Visual Studio 2010.
1. Build STM package.
   1) Unzip StmPkg zip to target dir, e.g. c:\StmCode
      The final directory layout is like below:
        c:\StmCode\StmPkg\Core
        c:\StmCode\StmPkg\EdkII
        ...
   2) Open command window, goto target dir, e.g. c:\StmCode
   3) Type "preparestm.bat" to prepare environment, this need run only once.
   4) Type "buildstm.bat" to build STM image.
      1) If user want debug build, please use "buildstm.bat" or "buildstm.bat DEBUG".
      2) If user want release build, please use "buildstm.bat RELEASE".
2. Build STM tool (optional)
   1) Same as above
   2) Same as above
   3) Same as above
   4) Type "buildstmtool.bat" to build STM tool.

B. How to build STM test module.
1. Download EDKII repository.
2. Build STM test package.
   1) Unzip Test zip to target dir, e.g. c:\EDKII
      The final directory layout is like below:
        c:\EDKII\FrmPkg\Core
   2) Open command window, goto target dir, e.g. c:\EDKII
   3) Type "edksetup.bat" to setup EDKII build env.
   4) Type "build -p FrmPkg\FrmPkg.dsc -a X64 -t VS2010x86" to build binary.
   
C. How to build STM BIOS.
1. Download EDKII repository and MinnowMax binaries.
2. Build MinnowMax STM BIOS.
   1) Unzip BIOS zip to target dir, e.g. c:\EDKII
      The final directory layout is like below:
        c:\EDKII\IA32FamilyCpuStmSamplePkg
        c:\EDKII\StmPlatformSamplePkg
   2) Copy Override\Vlv2BinaryPkg to Vlv2BinaryPkg.
        This MUST be done because default Vlv2BinaryPkg has limitation to block STM running.
   3) Update Vlv2TbltDevicePkg\PlatformPkgX64.dsc:
        Add "StmPlatformSamplePkg/MsegSmramPei/MsegSmramPei.inf" to "[Components.IA32]" section.
        Add "IA32FamilyCpuStmSamplePkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf {
              <LibraryClasses>
                CpuConfigLib|IA32FamilyCpuStmSamplePkg/Library/CpuConfigLib/CpuConfigLib.inf
            }" to "[Components.X64]" section.
        Add "StmPlatformSamplePkg/StmPlatformSmm/StmPlatformSmm.inf" to "[Components.X64]" section.
        Add "StmPlatformSamplePkg/EndOfDxeOnExitPmAuthThunk/EndOfDxeOnExitPmAuthThunk.inf" to "[Components.X64]" section.
   4) Update Vlv2TbltDevicePkg\PlatformPkg.fdf:
        Add "INF StmPlatformSamplePkg/MsegSmramPei/MsegSmramPei.inf" to "[FV.FVRECOVERY]" section.
        Replace "INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PiSmmCpuDxeSmm.inf"
          by "INF IA32FamilyCpuStmSamplePkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf" in "[FV.MAIN]" section.
        Add "INF StmPlatformSamplePkg/StmPlatformSmm/StmPlatformSmm.inf" to "[FV.MAIN]" section.
        Add "INF StmPlatformSamplePkg/EndOfDxeOnExitPmAuthThunk/EndOfDxeOnExitPmAuthThunk.inf" to "[FV.MAIN]" section.
        Add "FILE FREEFORM = PCD(gStmPlatformTokenSpaceGuid.PcdStmBinFile) {
               SECTION RAW = StmPlatformSamplePkg/StmBin/X64$(TARGET)/Stm.bin
            }" to "[FV.MAIN]" section.
        Add "INF USE=X64 StmPlatformSamplePkg/TestBin/X64$(TARGET)/Frm.inf" to "[FV.MAIN]" section.
        Add "INF USE=X64 StmPlatformSamplePkg/TestBin/X64$(TARGET)/StmService.inf" to "[FV.MAIN]" section.
        Add "INF USE=X64 StmPlatformSamplePkg/TestBin/X64$(TARGET)/FrmLoader.inf" to "[FV.MAIN]" section.
   5) Build MinnowMax BIOS accroding to MinnowMax release notes.
   
================================================================================
                      FEATURES
================================================================================
A. STM feature
1. STM binary need to be integrated to STM-BIOS.
2. STM is validated on MinnowMax platform X64 version BIOS, boot to UEFI Yacto.
3. STM package provides STM sample implementation for "STM User Guide, Revision 1.0".
   1) STM image generation.
   2) STM launch and STM teardown.
   3) VMCALL interface between BIOS and STM, such as exception handler.
   4) VMCALL interface between MLE and STM, such as MLE resource protection.
   5) SMRAM context generation.
4. High level structure for StmPkg:
   Core    -> The main part of STM, including Init part and Runtime part.
   EdkII   -> The EdkII libraries used by STM, including BaseTools, MdePkg, and
              PcAtChipsetPkg. They are lightweight version.
   Include -> STM include files.
   Library -> STM specific libraries, including MpSafeDebugLibSerialPort, 
              SimpleSynchronizationLib, and StmLib.
   Tool    -> STM specific build tool, including GenStm.

B. STM TEST Module feature
1. FRM binary is a tiny VMM to launch STM in UEFI environment for test purpose.
   It shows the concept on how VMM interacts with STM.
2. StmService provides the API between VMM and STM.
3. FrmLoader is the UEFI driver to load FRM binary.

================================================================================
                                  KNOWN LIMITATION
================================================================================
1. STM Domain type is NOT fully implemented.

================================================================================
                                     MISC
================================================================================
1. Virus scanned by McAfee VirusScan Enterprise 8.8.0, Virus Definitions 7873, 
   no virus detected.

[END OF RELEASE NOTES]
