ICE_TEA_BIOS/Board/Oem/L05AlderLakePMultiBoardPkg/Library/BaseOemSvcChipsetLib/OemSvcEcSetLowPowerMode.c
LCFC\AiXia.Jiang a870bff2f4 1.Frist commit
2022-09-30 14:59:06 +08:00

55 lines
1.7 KiB
C

/** @file
Provide hook function for OEM to set Low Power Mode to EC.
;******************************************************************************
;* Copyright (c) 2014 - 2018, Insyde Software Corporation. All Rights Reserved.
;*
;* You may not reproduce, distribute, publish, display, perform, modify, adapt,
;* transmit, broadcast, present, recite, release, license or otherwise exploit
;* any part of this publication in any form, by any means, without the prior
;* written permission of Insyde Software Corporation.
;*
;******************************************************************************
*/
#include <Library/BaseOemSvcChipsetLib.h>
#include <Library/EcCommands.h>
#include <Library/EcLib.h>
/**
Set Low Power Mode to EC.
@param[in] LowPowerMode Low Power Mode.
TRUE Enable Low Power Mode
FALSE Disable Low Power Mode
@retval EFI_UNSUPPORTED Returns unsupported by default.
@retval EFI_MEDIA_CHANGED Alter the Configuration Parameter.
@retval EFI_SUCCESS The function performs the same operation as caller.
The caller will skip the specified behavior and assuming
that it has been handled completely by this function.
*/
EFI_STATUS
OemSvcEcSetLowPowerMode (
IN BOOLEAN LowPowerMode
)
{
//[-start-210519-KEBIN00001-modify]//
#ifdef LCFC_SUPPORT
return EFI_UNSUPPORTED;
#else
UINT8 Data;
Data = 0;
if (LowPowerMode) {
Data |= EC_DEBUG_LOW_POWER_ENABLE;
}
SendEcCommand (EC_POWER_FEATURES_CMD);
SendEcData (Data);
return EFI_MEDIA_CHANGED;
#endif
//[-end-210519-KEBIN00001-modify]//
}