]> git.proxmox.com Git - mirror_edk2.git/commitdiff
QuarkPlatformPkg: Add Readme.md for QuarkPlatformPkg
authorMichael Kinney <michael.d.kinney@intel.com>
Fri, 29 Jan 2016 00:54:32 +0000 (00:54 +0000)
committermdkinney <mdkinney@Edk2>
Fri, 29 Jan 2016 00:54:32 +0000 (00:54 +0000)
Add a Readme.md for the QuarkPlatformPkg that describes how to
clone, build, boot, debug, and enable/disable features for the
Intel(R) Galileo Development Board and the Intel(R) Galileo Gen 2
Development Board.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19764 6f19259b-4bc3-4df7-8a09-765794883524

QuarkPlatformPkg/Readme.md [new file with mode: 0644]

diff --git a/QuarkPlatformPkg/Readme.md b/QuarkPlatformPkg/Readme.md
new file mode 100644 (file)
index 0000000..b48e072
--- /dev/null
@@ -0,0 +1,666 @@
+# **EDK II firmware for Intel(R) Quark SoC X1000 based platforms**\r
+\r
+## **Features**\r
+* UEFI firmware image with ability to enable/disable major features such as\r
+    - Logging\r
+    - Source level debug using [Intel(R) UEFI Development Kit Debugger Tool](\r
+      https://firmware.intel.com/develop/intel-uefi-tools-and-utilities/intel-uefi-development-kit-debugger-tool)\r
+    - Boot Performance Measurements\r
+    - UEFI Secure Boot with Physical Presence\r
+    - TCG Measured Boot using TPM 1.2 hardware devices on I2C bus\r
+* Minimal firmware image for initial power-on and debug\r
+* UEFI Shell built into FLASH image\r
+* UEFI Linux operating system boot support from Micro SD FLASH\r
+* Hardware Support\r
+    -  [Intel(R) Quark SoC X1000 CPU](\r
+       http://www.intel.com/content/www/us/en/embedded/products/quark/quark-x1000-datasheet.html)\r
+    -  [Intel(R) Galileo Development Board](\r
+       http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-g1-datasheet.html)\r
+    -  [Intel(R) Galileo Gen 2 Development Board](\r
+       http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-overview.html)\r
+    -  HPET Timer\r
+    -  Real Time Clock\r
+* Major I/O Subsystems\r
+    - PCI including support for Mini PCI Express Cards\r
+    - USB using EHCI and OHCI host controllers\r
+    - Micro SD FLASH with FAT file system support\r
+    - Serial UART up to 921600 baud for console, logging, and debug\r
+* ACPI Tables with ACPI S3 sleep state support\r
+* SMBIOS Tables\r
+\r
+## **Windows Build Instructions**\r
+\r
+### Pre-requisites\r
+\r
+* GIT client: Available from https://git-scm.com/downloads\r
+* Microsoft Visual Studio.\r
+  - Visual Studio 2015 recommended and is used in the examples below.\r
+* Microsoft Windows Driver Development Kit 3790.1830\r
+  - http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso\r
+  - Mount ISO image\r
+  - Right click on ```x86\kitsetup.exe``` & choose **Run as administrator**\r
+  - Install to C:\WINDDK\3790.1830\r
+  - Uncheck all Component Groups\r
+  - Expand Build Environment Component\r
+  - Check Windows Driver Development Kit 16-bit Additional Build Tools\r
+  - Install\r
+* ASL compiler: Available from http://www.acpica.org\r
+  - Install into ```C:\ASL``` to match default tools_def.txt configuration.\r
+\r
+Create a new directory for an EDK II WORKSPACE.\r
+\r
+The code block below shows the GIT clone operations required to pull the EDK II\r
+source tree, the FatPkg sources, the pre-built versions of BaseTools as WIN32\r
+binaries, and the edk2-non-osi repository that provides a binary file for the\r
+Quark Remote Management Unit (RMU).\r
+\r
+Next it sets environment variables that must be set before running\r
+```edksetup.bat```. Since content is being pulled from multiple repositories,\r
+the EDK II [Multiple Workspace](\r
+https://github.com/tianocore/tianocore.github.io/wiki/Multiple_Workspace)\r
+feature is used.\r
+\r
+Next, the ```edksetup.bat``` file is run to complete the initialization of an\r
+EDK II build environment.  Two example build commands are shown.  The first one\r
+in ```QuarkPlatformPlg/Quark.dsc``` builds a full UEFI firmware image that is\r
+able to boot the built-in UEFI Shell and Linux from a micro SD FLASH card.  The\r
+second one in ```QuarkPlatformPkg/QuarkMin.dsc``` builds a minimal firmware\r
+image that is useful for initial power-on and debug of new features.\r
+\r
+```cmd\r
+git clone https://github.com/tianocore/edk2.git\r
+git clone https://github.com/tianocore/edk2-FatPkg.git FatPkg\r
+git clone https://github.com/tianocore/edk2-BaseTools-win32.git\r
+git clone https://github.com/tianocore/edk2-non-osi.git\r
+\r
+set WORKSPACE=%CD%\r
+set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-non-osi\r
+set EDK_TOOLS_BIN=%WORKSPACE%\edk2-BaseTools-win32\r
+\r
+cd edk2\r
+edksetup.bat\r
+\r
+build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc\r
+build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/QuarkMin.dsc\r
+```\r
+\r
+## **Linux Build Instructions**\r
+\r
+### Pre-requisites\r
+\r
+* GIT client\r
+* GCC 4.9 compiler\r
+* ASL compiler: Available from http://www.acpica.org.\r
+\r
+Create a new directory for an EDK II WORKSPACE.\r
+\r
+The code block below shows the GIT clone operations required to pull the EDK II\r
+source tree, the FatPkg sources, and the edk2-non-osi repository that provides a\r
+binary file for the Quark Remote Management Unit (RMU).\r
+\r
+Next it sets environment variables that must be set before running\r
+```edksetup.bat```. Since content is being pulled from multiple repositories,\r
+the EDK II [Multiple Workspace](\r
+https://github.com/tianocore/tianocore.github.io/wiki/Multiple_Workspace)\r
+feature is used.\r
+\r
+Next, the EDK II BaseTools required to build firmware images are built.\r
+\r
+Next, the ```edksetup.bat``` file is run to complete the initialization of an\r
+EDK II build environment.  Two example build commands are shown.  The first one\r
+in ```QuarkPlatformPlg/Quark.dsc``` builds a full UEFI firmware image that is\r
+able to boot the built-in UEFI Shell and Linux from a micro SD FLASH card.  The\r
+second one in ```QuarkPlatformPkg/QuarkMin.dsc``` builds a minimal firmware\r
+image that is useful for initial power-on and debug of new features.\r
+\r
+```sh\r
+git clone https://github.com/tianocore/edk2.git\r
+git clone https://github.com/tianocore/edk2-FatPkg.git FatPkg\r
+git clone https://github.com/tianocore/edk2-non-osi.git\r
+\r
+export WORKSPACE=$PWD\r
+export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/edk2-non-osi\r
+export EDK_TOOLS_PATH=$WORKSPACE/edk2/BaseTools\r
+\r
+make -C edk2/BaseTools\r
+\r
+cd $WORKSPACE/edk2\r
+\r
+. edksetup.sh BaseTools\r
+\r
+build -a IA32 -t GCC49 -p QuarkPlatformPkg/Quark.dsc\r
+build -a IA32 -t GCC49 -p QuarkPlatformPkg/QuarkMin.dsc\r
+```\r
+\r
+## **Build Features**\r
+\r
+The table below contains a summary of the build flags to enable or disable\r
+features on the build command line using ```-D``` flags.\r
+\r
+| **Define Name**            | **Default Value** | **Supported Values** |\r
+| -------------------------- | ----------------- | -------------------- |\r
+| ```GALILEO```              |              GEN2 | GEN1, GEN2           |\r
+| ```LOGGING```              |              TRUE | TRUE, FALSE          |\r
+| ```SOURCE_DEBUG_ENABLE```  |             FALSE | TRUE, FALSE          |\r
+| ```PERFORMANCE_ENABLE```   |             FALSE | TRUE, FALSE          |\r
+| ```SECURE_BOOT_ENABLE```   |             FALSE | TRUE, FALSE          |\r
+| ```MEASURED_BOOT_ENABLE``` |             FALSE | TRUE, FALSE          |\r
+| ```TPM_12_HARDWARE```      |              NONE | NONE, LPC, ATMEL_I2C, INFINEON_I2C |\r
+\r
+* ```GALILEO``` - Used to specify the type of Intel(R) Galileo board type.  The\r
+  default is ```GEN2``` for the [Intel(R) Galileo Gen 2 Development Board](\r
+  http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-overview.html).\r
+  The other supported value is ```GEN1``` for the [Intel(R) Galileo Development Board](\r
+  http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-g1-datasheet.html).\r
+  Add ```-D GALILEO=GEN1``` to the build command for [Intel(R) Galileo Development Board](\r
+  http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-g1-datasheet.html).\r
+\r
+* ```LOGGING``` - Used to enable/disable logging messages from DEBUG() macros to\r
+  a serial UART.  The default is TRUE for enabled when the BUILDTARGET is DEBUG\r
+  (```-b DEBUG```).  The default is FALSE for disabled when the BUILDTARGET is\r
+  not DEBUG (e.g. ```-b RELEASE```).  Add ```-D LOGGING``` to the build command\r
+  to force logging enabled.  Add ```-D LOGGING=FALSE``` to force logging\r
+  disabled.\r
+\r
+* ```SOURCE_DEBUG_ENABLE``` - Used to enable/disable source level debug using the\r
+  [Intel(R) UEFI Development Kit Debugger Tool](\r
+  https://firmware.intel.com/develop/intel-uefi-tools-and-utilities/intel-uefi-development-kit-debugger-tool).\r
+  The default is FALSE for disabled.  Add ```-D SOURCE_DEBUG_ENABLE``` to the\r
+  build command line to enable source level debug.\r
+\r
+* ```PERFORMANCE_ENABLE``` - Used to enable/disable boot performance measurement.\r
+  The default is FALSE for disabled.  Add ```-D PERFORMANCE_ENABLE``` to the\r
+  build command line to enable boot performance measurement.  When this feature\r
+  is enabled, both ```LOGGING``` and ```SOURCE_DEBUG_ENABLE``` are automatically\r
+  disabled so there is not boot time overhead from the serial UART for logging\r
+  messages or the debug agent.\r
+\r
+* ```SECURE_BOOT_ENABLE``` - Used to enable/disable UEFI Secure Boot features.\r
+  The default is FALSE for disabled.  Add ```-D SECURE_BOOT_ENABLE``` to the\r
+  build command line to enable UEFI Secure Boot features.\r
+\r
+* ```MEASURED_BOOT_ENABLE``` - Used to enable/disable measurement of firmware\r
+  code and data into a TPM 1.2 hardware device.  The default is FALSE for\r
+  disabled.  Add ```-D MEASURED_BOOT_ENABLE``` to the build command line to\r
+  enable UEFI Secure Boot features.\r
+\r
+* ```TPM_12_HARDWARE``` - Used to specify the type of TPM 1.2 hardware device\r
+  that is connected to the Galileo board.  This define is valid if the measure\r
+  boot feature is enabled using ```-D MEASURED_BOOT_ENABLE```.  The default is\r
+  NONE for no TPM 1.2 hardware device connected.  Add ```-D TPM_12_HARDWARE=LPC```\r
+  for a TPM hardware device attached to an LPC bus (not supported on on Intel(R)\r
+  Quark SoC X1000).  Add ```-D TPM_12_HARDWARE=ATMEL_I2C``` for an\r
+  [Atmel AT97SC3204T](http://www.atmel.com/devices/AT97SC3204T.aspx) or\r
+  [Atmel AT97SC3205T](http://www.atmel.com/images/atmel-8883s-tpm-at97sc3205t-datasheet-summary.pdf)\r
+  attached to the I2C bus of the Galileo Arduino header.  Add\r
+  ```-D TPM_12_HARDWARE=INFINION_I2C``` for an [Infineon SLB9645](\r
+  http://www.infineon.com/dgdl/Infineon-TPM+SLB+9645-DS-v01_00-EN.pdf?fileId=5546d4625185e0e201518b83d0c63d7c)\r
+  attached to the I2C bus of the Galileo Arduino header.  The ATMEL_I2C setting\r
+  has been tested with the [CryptoShield](https://www.sparkfun.com/products/13183)\r
+  available from [SparkFun](https://www.sparkfun.com/).\r
+\r
+\r
+### **Example Build Commands**\r
+\r
+Default build with logging enabled:\r
+\r
+```build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc```\r
+\r
+Release build with logging disabled:\r
+\r
+```build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc -b RELEASE```\r
+\r
+Enable source level debugging:\r
+\r
+```build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc -D SOURCE_DEBUG_ENABLE```\r
+\r
+Enable boot performance metrics:\r
+\r
+```build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc -D PERFORMANCE_ENABLE```\r
+\r
+Enable UEFI Secure Boot features:\r
+\r
+```build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc -D UEFI_SECURE_BOOT```\r
+\r
+Enable UEFI Secure Boot and Measured Boot using Atmel I2C TPM hardware device:\r
+\r
+```build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc -D UEFI_SECURE_BOOT\r
+-D MEASURED_BOOT_ENABLE -D TPM_12_HARDWARE=ATMEL_I2C```\r
+\r
+## **FLASH Update using DediProg SF100**\r
+\r
+Once the sources have been downloaded, an EDK II build environment established,\r
+and an EDK II firmware image has been built, the EDK II firmware image needs to\r
+installed into the FLASH device on the target Galileo development board.  One\r
+way to do this is with the [Dediprog SF100 IC Programmer](\r
+http://www.dediprog.com/pd/spi-flash-solution/SF100).\r
+\r
+* Install the DediProg SF100 software.\r
+\r
+* Connect the DediProg SF100 to the Galileo development board.\r
+\r
+    ![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/Dediprog.jpg)\r
+\r
+* Make sure ```dpcmd.exe``` is in ```PATH```\r
+\r
+  ```PATH=%PATH%;"c:\Program Files (x86)\DediProg\SF100"```\r
+\r
+* **NOTE**: It is recommended that the FLASH image that was shipped with the\r
+  Galileo development board be read and saved before updating FLASH image.  The\r
+  command shown below read the FLASH image and saves it to the file\r
+  called ```GalileoOriginalFirmware.bin```.\r
+\r
+  ```dpcmd.exe -r GalileoOriginalFirmware.bin```\r
+\r
+* Update FLASH image using either the DediProg SF100 GUI or ```dpcmd.exe```.\r
+  - Example update of Galileo firmware image when BUILDTARGET is DEBUG (default)\r
+\r
+    ```dpcmd.exe -u%WORKSPACE%\Build\Quark\DEBUG_VS2015x86\FV\QUARK.fd ```\r
+\r
+  - Example update of Galileo firmware image when BUILDTARGET is RELEASE\r
+    (```-b RELEASE```)\r
+\r
+    ```dpcmd.exe -u%WORKSPACE%\Build\Quark\RELEASE_VS2015x86\FV\QUARK.fd ```\r
+\r
+## **Setting up a Serial Console and Booting to UEFI Shell**\r
+\r
+After the FLASH is updated on Galileo, a serial cable is connected between the\r
+host system and the Galileo target.  A serial terminal emulator (such as\r
+[Tera Term](https://en.osdn.jp/projects/ttssh2/releases/)) can be used to see\r
+the logging messages from DEBUG() macros and the serial console for the UEFI\r
+Boot Manager, UEFI Shell, and operating system.\r
+\r
+The default serial communication parameters for the Intel(R) Galileo Gen 2\r
+Development Board is 921600,n,8,1 with no hardware flow control.\r
+\r
+![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/TeraTermSerialParameters.png)\r
+\r
+The default serial communication parameters for the Intel(R) Galileo Development\r
+Board is 461800,n,8,1 with no hardware flow control.\r
+\r
+The following changes to the [Tera Term](https://en.osdn.jp/projects/ttssh2/releases/)\r
+configuration files are recommended for UEFI serial console compatibility.\r
+Some of the later use cases involve using the TCPIP mode, so some of these\r
+recommendation apply to the TCPIP use cases.\r
+\r
+* TERATERM.INI - Set terminal size to 80 x 25 and terminal settings to UTF8.\r
+\r
+![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/TeraTermTerminal.png)\r
+\r
+* TERATERM.INI - Set font type to Terminal to support box drawing glyphs.\r
+\r
+![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/TeraTermFont.png)\r
+\r
+* TERATERM.INI - Disable line mode to make TCPIP mode work like COM port mode.\r
+\r
+```ini\r
+; Line at a time mode\r
+EnableLineMode=off\r
+```\r
+\r
+* KEYBOARD.CNF - Disable VT function keys for F5..F10\r
+\r
+```ini\r
+[VT function keys]\r
+;F6 key\r
+;F6=64\r
+;F7 key\r
+;F7=65\r
+;F8 key\r
+;F8=66\r
+;F9 key\r
+;F9=67\r
+;F10 key\r
+;F10=68\r
+```\r
+\r
+* KEYBOARD.CNF - Disable X function keys for F1..F4\r
+\r
+```ini\r
+[X function keys]\r
+; F1 key\r
+XF1=off\r
+; F2 key\r
+;XF2=60\r
+XF2=off\r
+; F3 key\r
+;XF3=61\r
+XF3=off\r
+; F4 key\r
+;XF4=62\r
+XF4=off\r
+; F5 key\r
+;XF5=63\r
+```\r
+\r
+* KEYBOARD.CNF - Add UEFI serial console sequences for F1..F10\r
+\r
+```ini\r
+[User keys]\r
+User1=59,0,$1B[M\r
+User2=60,0,$1B[N\r
+User3=61,0,$1B[O\r
+User4=62,0,$1B[P\r
+User5=63,0,$1B[Q\r
+User6=64,0,$1B[R\r
+User7=65,0,$1B[S\r
+User8=66,0,$1B[T\r
+User9=67,0,$1B[U\r
+User10=68,0,$1B[V\r
+```\r
+\r
+Connect power adapter to Galileo development board, and the logging messages\r
+should be seen, followed by 5 second countdown, followed by an automatic boot to\r
+the built-in UEFI Shell.\r
+\r
+![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/UefiShell.png)\r
+\r
+## **Source Level Debug Using Intel(R) UEFI Development Kit Debugger Tool**\r
+\r
+### Pre-requisites\r
+\r
+* Intel(R) UEFI Development Kit Debugger Tool User Manual for Ver 1.5 or higher:\r
+  Available from https://firmware.intel.com/develop/intel-uefi-tools-and-utilities/intel-uefi-development-kit-debugger-tool\r
+* Intel(R) UEFI Development Kit Debugger Tool Ver 1.5 or higher: Available from\r
+  https://firmware.intel.com/develop/intel-uefi-tools-and-utilities/intel-uefi-development-kit-debugger-tool\r
+* [Tera Term](https://en.osdn.jp/projects/ttssh2/releases/) or other serial\r
+  terminal emulator with TCPIP support\r
+\r
+Follow instructions in Intel(R) UEFI Development Kit Debugger Tool User manual\r
+to setup host system.\r
+\r
+Build a firmware image with SOURCE_DEBUG_ENABLE enabled\r
+(```-D SOURCE_DEBUG_ENABLE```).  This will select the appropriate libraries,\r
+debug agent, and PCDs for Galileo.  Galileo does not support a USB 2.0 debug\r
+port, so only the UART based communications library is used.\r
+\r
+Use Dediprog SF100 to update the Galileo development board FLASH image.\r
+\r
+Update the ```[Debug Port]``` section of the SoftDebugger.ini file with the host\r
+side UART configuration settings.  The following example uses COM5, which must\r
+be updated with the COM port the Galileo target is attached.  The following\r
+example also shows a baud rate of 921600 which is correct for a Galileo Gen 2.\r
+If a Galileo Gen 1 is being used, set the baud rate to 460800.  By default, the\r
+Galileo console is redirected to TCPIP port 20715.\r
+\r
+```ini\r
+[Debug Port]\r
+Channel = Serial\r
+Port = COM5\r
+FlowControl = 0\r
+BaudRate = 921600\r
+Server =\r
+```\r
+\r
+Connect power adapter to Galileo development board and run a command script with\r
+the contents below to start a Tera Term session on TCPIP port 20715 and start\r
+the Intel(R) UEFI Development Kit Debugger Tool using UART connection between\r
+the host and target and WinDbg.  The REBOOT button on the Galileo development\r
+board may need to be pressed for the debugger to perform the initial connect.\r
+\r
+```cmd\r
+start "Console" /B "c:\Program Files (x86)\teraterm\ttermpro.exe" localhost:20715 /nossh\r
+start "Debugger" /B "C:\Program Files (x86)\Intel\Intel(R) UEFI Development Kit Debugger Tool\eXdi.exe" /LaunchWinDbg\r
+```\r
+\r
+The figure below should be seen when a connection is made.  The SoftDebugger\r
+Debug Console window shows the status of the connection between the host and the\r
+target.  The Tera Term window shows the console output from the SEC phase until\r
+the debug agent is initialized.  The WinDbg window shows that the debugger is\r
+connected and the WinDbg application can be used for run control, breakpoint\r
+management, and viewing call stacks, local variables,  global variables, etc.\r
+\r
+![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/UdkDebugger.png)\r
+\r
+## **Debug Using Intel(R) System Debugger using OpenOCD**\r
+\r
+Setup hardware and software components following the instructions in the article at:\r
+https://software.intel.com/en-us/articles/using-intel-system-debugger-with-openocd\r
+\r
+Connect power adapter to Galileo development board.\r
+\r
+The following batch file starts Tera Term serial console on COM5 at 921600 baud,\r
+starts OpenOCD using a Flyswatter2, and starts Intel(R) System Studio Debugger.\r
+Select the **Connect** button to complete the host to target connection.\r
+\r
+```cmd\r
+set OPENOCD="C:\Program Files (x86)\IntelSWTools\system_studio_for_windows_2016.0.023\debugger\openocd"\r
+start "Console" /B "c:\Program Files (x86)\teraterm\ttermpro.exe" /C=5 /BAUD=921600\r
+start "OpenOcd" /B %OPENOCD%\bin\openocd.exe -f ..\scripts\interface\ftdi\flyswatter2.cfg -f ..\scripts\board\quark_x10xx_board.cfg\r
+call "C:\Program Files (x86)\IntelSWTools\System Debugger 2016\system_debugger\start_xdb_gdb_remote.bat"\r
+```\r
+\r
+When **Reset Target** is selected, the Galileo development board does not always\r
+halt at the first instruction at the reset vector.  If debug is required from\r
+the first instruction of the reset vector, then update the file\r
+```UefiCpuPkg/SecCore/Ia32/ResetVector.asm``` and change the two NOP\r
+instructions at the label ```ResetHandler:``` to ```JMP $```.  This puts the CPU\r
+into a wait loop until the debugger is connected and the debugger is used to set\r
+instruction pointer to the next instruction.\r
+\r
+```\r
+;\r
+; For IA32, the reset vector must be at 0xFFFFFFF0, i.e., 4G-16 byte\r
+; Execution starts here upon power-on/platform-reset.\r
+;\r
+ResetHandler:\r
+;    nop\r
+;    nop\r
+    jmp $\r
+ApStartup:\r
+    ;\r
+    ; Jmp Rel16 instruction\r
+    ; Use machine code directly in case of the assembler optimization\r
+    ; SEC entry point relative address will be fixed up by some build tool.\r
+    ;\r
+    ; Typically, SEC entry point is the function _ModuleEntryPoint() defined in\r
+    ; SecEntry.asm\r
+    ;\r
+    DB      0e9h\r
+    DW      -3\r
+```\r
+\r
+## **Install, Configure, and Boot Linux**\r
+\r
+* Download SD Card Linux Image: Available at\r
+  http://www.intel.com/content/www/us/en/support/boards-and-kits/intel-galileo-boards/000005614.html\r
+* Extract the SD Card Linux Image to a FAT formatted Micro SD FLASH device\r
+* Install Micro SD FLASH device into Galileo development board\r
+\r
+Connect power adapter to Galileo development board and boot to the UEFI Shell.\r
+\r
+From the UEFI Shell execute the following commands to copy the GRUB EFI boot\r
+loader to ```\efi\boot\bootia32.efi```.  This allows the UEFI Boot Manager, on\r
+all future boots, to auto detect that the Micro SD FLASH device is bootable.\r
+\r
+```\r
+Shell> connect -r\r
+Shell> map -r\r
+Shell> fs0:\r
+FS0:> mkdir efi\r
+FS0:> mkdir efi\boot\r
+FS0:> cp grub.efi efi\boot\bootia32.efi\r
+```\r
+\r
+The GRUB boot loader is set to a UART baud rate of 115200.  A couple changes are\r
+required to change the baud rate to 460800 for Galileo Gen 1 or 921600 for\r
+Galileo Gen 2.  From the UEFI Shell, execute the following commands to make a\r
+backup copy and edit the GRUB configuration file.\r
+\r
+```\r
+FS0:> cp boot\grub\grub.conf boot\grub\grub.conf.org\r
+FS0:> edit boot\grub\grub.conf\r
+```\r
+\r
+* Delete the lines associated with the boot option with the following title.\r
+\r
+```\r
+title Clanton SVP kernel-SPI initrd-SPI IMR-On IO-APIC/HPET NoEMU\r
+```\r
+\r
+* Replace the two instances of 115200 in the following line to 460800 for\r
+  Galileo Gen 1 or 921600 for Galileo Gen 2.\r
+\r
+```\r
+kernel /bzImage root=/dev/ram0 console=ttyS1,115200n8 earlycon=uart8250,mmio32,$EARLY_CON_ADDR_REPLACE,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5 rootimage=image-full-galileo-clanton.ext3\r
+```\r
+* Press F3 to save the file\r
+* Run the ```exit``` command to exit from the UEFI Shell and return to the\r
+  UEFI Boot Manager\r
+* Select **Boot Manager**\r
+* Select **UEFI Misc Device** for the Micro SD FLASH device.\r
+* GRUB should run and Linux should boot with serial log messages.\r
+* When the serial log messages stop, change the Tera Term baud rate to 115200\r
+* Login as ```root```.   No password is required.\r
+* Use ```vi``` to edit ```/etc/inittab```\r
+* Change the baud rate of ttyS1 from 115200 to 460800 for Galileo Gen 1 or\r
+  921600 for Galileo Gen 2.  The line that need to be updated is shown below\r
+\r
+```\r
+S:2345:respawn:/sbin/getty 115200 ttyS1\r
+```\r
+\r
+* Save the updated ```/etc/inittab```\r
+* Run ```reboot -f``` to shutdown Linux and reboot the platform.\r
+* Set the Tera Term baud rate back to 460800 for Galileo Gen 1 or 921600 for\r
+  Galileo Gen 2.\r
+\r
+After these changes both the EDK II firmware and the Linux operating system use\r
+the same baud rate.\r
+\r
+### **Testing ACPI S3 Sleep**\r
+\r
+The ACPI S3 Sleep and Resume feature can be tested on a Galileo development\r
+board using the Real Time Clock (RTC) for a wake event.  The shell script shown\r
+below arms the RTC wake alarm 10 seconds in the future and puts the system to\r
+sleep.  A shorter time in seconds can be passed in as the first argument to the\r
+script, but do not use times shorter than 2 or 3 seconds.\r
+\r
+**NOTE**: The stmmac module is unloaded because the module is not compatible\r
+with S3 resume.\r
+\r
+```sh\r
+#\r
+# Unload NIC driver that causes S3 to fail\r
+#\r
+rmmod stmmac\r
+\r
+#\r
+# Disable RTC wake alarm\r
+#\r
+echo 0 > /sys/class/rtc/rtc0/wakealarm\r
+\r
+#\r
+# Compute wake time that is $1 seconds in the future\r
+#\r
+let WakeTime=`date '+%s'`\r
+echo $WakeTime\r
+if ["$1" = ""]; then\r
+  let WakeTime=$WakeTime+10\r
+else\r
+  let WakeTime=$WakeTime+$1\r
+fi\r
+echo $WakeTime\r
+\r
+#\r
+# Enable RTC wake alarm $1 seconds in the future\r
+#\r
+echo $WakeTime > /sys/class/rtc/rtc0/wakealarm\r
+\r
+#\r
+# Put systems into ACPI S3 sleep state\r
+#\r
+echo mem > /sys/power/state\r
+```\r
+\r
+## **UEFI Secure Boot Feature and Physical Presence**\r
+\r
+Build a firmware image with SECURE_BOOT_ENABLE enabled\r
+(```-D SECURE_BOOT_ENABLE```). This builds in support for UEFI authenticated\r
+variables, UEFI image verification, and UEFI Secure Boot configuration screens\r
+in the Device Manager. In order to change the UEFI Secure Boot configuration,\r
+the user must assert physical presence.  The Galileo development board only has\r
+two push buttons (REBOOT and RESET).  The REBOOT button unconditionally reboots\r
+the platform. The RESET button asserts the reset signal on the Arduino header\r
+and is also connected to a GPIO pin, so the state of the RESET button can be\r
+read.  The user asserts physical presence by holding the RESET button while the\r
+Galileo development board boots, or by holding the RESET button while selecting\r
+the **Secure Boot Configuration** option in the Device Manager.\r
+\r
+Use Dediprog SF100 to update the Galileo development board FLASH image.\r
+\r
+Connect power adapter to Galileo development board and boot to the UEFI Boot\r
+Manager by pressing F2 or running the ```exit``` command from the UEFI Shell.\r
+Select **Device Manager** and then**Secure Boot Configuration**.  Change\r
+**Customize Secure Boot** to **Customized** and then select **Custom Secure Boot\r
+Options**.  If **Custom Secure Boot Options** can not be selected, then physical\r
+presence was not asserted using one of two methods listed above.  Assert\r
+physical presence and try again.\r
+\r
+The **Custom Secure Boot Options** screen allows the Galileo development board\r
+to be enrolled into UEFI Secure Boot.  See [How to Sign UEFI Drivers & Application V1.31](\r
+http://sourceforge.net/projects/edk2/files/General%20Documentation/SigningUefiImages%20-v1dot31.pdf/download)\r
+in the [SecurityPkg Wiki](https://github.com/tianocore/tianocore.github.io/wiki/SecurityPkg)\r
+for details on how to complete the UEFI Secure Boot enrollment.\r
+\r
+## **Enable Measured Boot Feature using Atmel I2C TPM on CryptoShield**\r
+\r
+Build a firmware image with MEASURED_BOOT_ENABLE enabled\r
+(```-D MEASURED_BOOT_ENABLE```) and TPM_12_HARDWARE set to ATMEL_I2C\r
+(```-D TMP_12_HARDWARE=ATMEL_I2C```). This builds in the TCG PEIM and DXE\r
+modules and uses the library for the Atmel I2C TPM hardware device.\r
+\r
+Use Dediprog SF100 to update the Galileo development board FLASH image.\r
+\r
+Attach the CryptoShield to the Arduino header of the Galileo development board\r
+as shown below.\r
+\r
+![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/GalileoCryptoShield.jpg)\r
+\r
+Connect power adapter to Galileo development board and boot to the UEFI Shell.\r
+In the boot logging messages, messages similar to the following should be seen\r
+as the Atmel I2C TPM hardware device is detected and used to measure the\r
+contents of firmware volumes and firmware tables.\r
+\r
+```\r
+Loading PEIM at 0x0000FC75188 EntryPoint=0x0000FC75260 TrEEConfigPei.efi\r
+PROGRESS CODE: V03020002 I0\r
+TrEEConfiguration.TpmDevice from Setup: 1\r
+DetectTpmDevice:\r
+TpmDevice final: 1\r
+TpmDevice PCD: 8B01E5B6-4F19-46E8-AB93-1C53671B90CC\r
+. . .\r
+Loading PEIM at 0x0000FC70190 EntryPoint=0x0000FC70260 TcgPei.efi\r
+PROGRESS CODE: V03020002 I0\r
+Install PPI: E9DB0D58-D48D-47F6-9C6E-6F40E86C7B41\r
+Install PPI: A030D115-54DD-447B-9064-F206883D7CCC\r
+PROGRESS CODE: V03020003 I0\r
+The FV which is measured by TcgPei starts at: 0xFFF10000\r
+The FV which is measured by TcgPei has the size: 0xF0000\r
+The FV which is measured by TcgPei starts at: 0xFFD00000\r
+The FV which is measured by TcgPei has the size: 0x1E0000\r
+. . .\r
+Loading driver at 0x0000F620000 EntryPoint=0x0000F620260 TcgDxe.efi\r
+. . .\r
+TPM TcgDxe Measure Data when ReadyToBoot\r
+```\r
+See the [SecurityPkg Wiki](https://github.com/tianocore/tianocore.github.io/wiki/SecurityPkg)\r
+for additional details on EDK II TPM support\r
+\r
+## **Measuring Boot Performance**\r
+\r
+Build a firmware image with PERFORMANCE_ENABLE enabled\r
+(```-D PERFORMANCE_ENABLE```). This builds in the UEFI Shell and the DP.EFI\r
+(Dump Performance) into a firmware volume and also includes a simple file system\r
+driver for firmware volumes so the DP.EFI command can be run out of the FLASH.\r
+\r
+Use Dediprog SF100 to update the Galileo development board FLASH image.\r
+\r
+Connect power adapter to Galileo development board and let it boot to the UEFI\r
+Shell.  Then use the REBOOT button or the ```reset``` UEFI Shell command to\r
+reboot the Galileo development board.  The first boot after a FLASH update does\r
+extra work that is only performed one time.  In order to get correct performance\r
+measurements, use the 2nd or later boots.  After the 2nd boot, run the\r
+```dp -s``` command.  The output should look similar to the figure below.\r
+\r
+![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/DpCommand.png)\r