1 Reply Latest reply on Jul 27, 2017 1:20 PM by Intel Corporation

    Intel Galileo board has hanged after 53 power cycles with edk2 BIOS


      Hello Team,


      For each power cycle Quark BIOS is consuming 872 bytes of runtime variable space from Variable store on FLASH and

      it is not releasing unused variable space memory.

      After 53 power cycles  the remaining run time variable space(0x28 Bytes) is below the threshold value (0x400 bytes) and BIOS is trying to reclaim the unused variable space from the below file.

      edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +3627




      Reclaim()  //Line 3627


      But failed with below error:



      "F2  key    to enter Boot Manager Menu.

      ENTER   to boot directly.



      WARNING: Capsule Test Key is used.

      [Bds]OsIndication: 0000000000000000

      [Bds]=============Begin Load Options Dumping ...=============

        Driver Options:

        SysPrep Options:

        Boot Options:

          Boot0002: UEFI Misc Device 0x0001

          Boot0000: UiApp 0x0109

          Boot0001: UEFI Shell 0x0001

        PlatformRecovery Options:

          PlatformRecovery0000: Default PlatformRecovery 0x0001

      [Bds]=============End Load Options Dumping=============

      [Bds]BdsWait ...Zzzzzzzzzzzz...


      5  seconds remained...[Bds]BdsWait(4)..Zzzz...

      4  seconds remained...[Bds]BdsWait(3)..Zzzz...

      3  seconds remained...[Bds]BdsWait(2)..Zzzz...

      2  seconds remained...[Bds]BdsWait(1)..Zzzz...

      1  seconds remained...[Bds]Exit the waiting!

      Ftw: Remaining work space size - 1FE0

      Ftw: Remaining work space size - 1FE0

      ASSERT_EFI_ERROR (Status = Aborted)

      ASSERT [VariableSmm] c:\varalaxmi\bkp\edk2_original\MdeModulePkg\Universal\Variable\RuntimeDxe\Variable.c(3637): !EFI_ERROR (Status)


      I debugged this Issue:

      As part of reclaim operation BIOS is erasing the variable space on flash and trying to write again without unused variables to flash but SPI protection is enabled and  SPI write failed.





      My current Fix for the above problem:

      I disabled the SPI protection in the below file:

      QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperLib.c +81




          RegVal |= B_QNC_RCRB_SPIPBRn_WPE; //Disabled this line;



      Is this the correct solution for the above issue?

      Anybody observed this issue?