+++ /dev/null
-/** @file\r
-This library includes the recovery function that can be customized by OEM,\r
-including how to select the recovery capsule if more than one capsule found,\r
-and security check.\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
-#ifndef __RECOVERY_OEM_HOOK_LIB_H__\r
-#define __RECOVERY_OEM_HOOK_LIB_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
-/**\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
-#endif\r
+++ /dev/null
-/** @file\r
-Common header file shared by all source files.\r
-\r
-This file includes package header files, library classes and protocol, PPI & GUID definitions.\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
-#ifndef __COMMON_HEADER_H_\r
-#define __COMMON_HEADER_H_\r
-\r
-\r
-\r
-#include <PiPei.h>\r
-\r
-#include <Ppi/DeviceRecoveryModule.h>\r
-\r
-#include <Library/RecoveryOemHookLib.h>\r
-#include <Library/QNCAccessLib.h>\r
-#include <Library/ResetSystemLib.h>\r
-\r
-#endif\r
+++ /dev/null
-/** @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
+++ /dev/null
-## @file\r
-# Library Hook Point functions for Intel QNC.\r
-#\r
-# This library provides hook points for OEM w.r.t recovery\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
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = RecoveryOemHookLib\r
- FILE_GUID = DE6D4FB9-12DB-4dbb-ACF1-92514388355F\r
- MODULE_TYPE = BASE\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = RecoveryOemHookLib\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-# VALID_ARCHITECTURES = IA32\r
-#\r
-\r
-[Sources]\r
- RecoveryOemHookLib.c\r
- CommonHeader.h\r
-\r
-\r
-[Packages]\r
- MdePkg/MdePkg.dec\r
- MdeModulePkg/MdeModulePkg.dec\r
- QuarkPlatformPkg/QuarkPlatformPkg.dec\r
- QuarkSocPkg/QuarkSocPkg.dec\r
-\r
-[LibraryClasses]\r
- QNCAccessLib\r
- ResetSystemLib\r
-\r
-[Ppis]\r
- gEfiPeiDeviceRecoveryModulePpiGuid # PPI SOMETIMES_CONSUMED\r
-\r