2 Application that sets a sticky bit to force recovery on next reset.
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Library/UefiRuntimeServicesTableLib.h>
12 #include <Library/QNCAccessLib.h>
15 The user Entry Point for Application. The user code starts with this function
16 as the real entry point for the application.
18 @param[in] ImageHandle The firmware allocated handle for the EFI image.
19 @param[in] SystemTable A pointer to the EFI System Table.
21 @retval EFI_SUCCESS The entry point is executed successfully.
22 @retval other Some error occurs when executing this entry point.
28 IN EFI_HANDLE ImageHandle
,
29 IN EFI_SYSTEM_TABLE
*SystemTable
33 // Set 'B_CFG_STICKY_RW_FORCE_RECOVERY' sticky bit so we know we need to do a recovery following warm reset
36 QUARK_SCSS_SOC_UNIT_SB_PORT_ID
,
37 QUARK_SCSS_SOC_UNIT_CFG_STICKY_RW
,
38 QNCAltPortRead (QUARK_SCSS_SOC_UNIT_SB_PORT_ID
, QUARK_SCSS_SOC_UNIT_CFG_STICKY_RW
) | B_CFG_STICKY_RW_FORCE_RECOVERY
44 gRT
->ResetSystem (EfiResetWarm
, EFI_SUCCESS
, 0, NULL
);