-/** @file\r
-This file includes the function that can be customized by OEM.\r
-\r
-Copyright (c) 2013-2015 Intel Corporation.\r
-\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "CommonHeader.h"\r
-\r
-/**\r
- This function allows the user to force a system recovery\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-OemInitiateRecovery (\r
- VOID\r
- )\r
-{\r
- UINT32 Data32;\r
-\r
- //\r
- // Set 'B_CFG_STICKY_RW_FORCE_RECOVERY' sticky bit so we know we need to do a recovery following warm reset\r
- //\r
- Data32 = QNCAltPortRead (QUARK_SCSS_SOC_UNIT_SB_PORT_ID, QUARK_SCSS_SOC_UNIT_CFG_STICKY_RW);\r
- Data32 |= B_CFG_STICKY_RW_FORCE_RECOVERY;\r
- QNCAltPortWrite (QUARK_SCSS_SOC_UNIT_SB_PORT_ID, QUARK_SCSS_SOC_UNIT_CFG_STICKY_RW, Data32);\r
-\r
- //\r
- // Initialte the warm reset\r
- //\r
- ResetWarm ();\r
-}\r
-\r
-/**\r
- This function allows the user to force a system recovery and deadloop.\r
-\r
- Deadloop required since system should not execute beyond this point.\r
- Deadloop should never happen since OemInitiateRecovery () called within\r
- this routine should never return since it executes a Warm Reset.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-OemInitiateRecoveryAndWait (\r
- VOID\r
- )\r
-{\r
- volatile UINTN Index;\r
-\r
- OemInitiateRecovery ();\r
- for (Index = 0; Index == 0;);\r
-}\r