]> git.proxmox.com Git - mirror_edk2.git/commit - QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c
QuarkPlatformPkg/PlatformInit: Fix recovery detection issues
authorMichael Kinney <michael.d.kinney@intel.com>
Mon, 3 Oct 2016 18:13:42 +0000 (11:13 -0700)
committerMichael Kinney <michael.d.kinney@intel.com>
Fri, 7 Oct 2016 22:00:21 +0000 (15:00 -0700)
commit69a0854b8fa8317dcf459c6e753fefa3a89340e6
tree1c6ded15cf0c5405152a793fe29325f00c0dc269
parent9c3dea8ddab0272729d106ab0fda632fd63ec2ec
QuarkPlatformPkg/PlatformInit: Fix recovery detection issues

https://bugzilla.tianocore.org/show_bug.cgi?id=137
https://bugzilla.tianocore.org/show_bug.cgi?id=139

There are four supported methods to generate a boot mode of
BOOT_IN_RECOVERY_MODE on the Galileo platforms:

* Detect a corrupt FV
* Detect a forced recovery from the ForceRecovery UEFI application
  that sets a bit in a sticky R/W register
* The RESET button for the Arduino shield is held while the system
  is powered up
* The RESET button for the Arduino shield is held while the system
  is rebooted using the REBOOT button.

The logic in the PlatformInit module is cleaned up and updated to
support all three of the recovery detection methods.  The clean
ups include:

* Remove extra debug messages
* Remove user input from serial port

In addition, once one of the recovery methods is detected and a
boot mode of BOOT_IN_RECOVERY_MODE is set, the Galileo platforms
would get an error attempting to use the USB host controller to
detect and read a recovery image from a USB drive.  The issue is
the IMR protection registers are programmed to prevent DMA to
memory owned by the PEI Core. The IMR register programming is
updated to allow DMA to memory that is allocated by the recovery
modules using the PEI AllocatePages() service.

Cc: Kelly Steele <kelly.steele@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>
QuarkPlatformPkg/Platform/Pei/PlatformInit/BootMode.c
QuarkPlatformPkg/Platform/Pei/PlatformInit/CommonHeader.h
QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c
QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.h
QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.c
QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.inf