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

52 lines
1.7 KiB
C

/** @file
Provide hook function for OEM to retrieve pcie dock status.
;******************************************************************************
;* Copyright (c) 2014 - 2017, 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/EcMiscLib.h>
/**
Get pcie dock status from EC.
@param[out] *CommandStatus Command status.
@param[out] *Dock Dock Status.
The bit0 is PCIe Dock Status, 1 = docked
@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
OemSvcEcGetPcieDockStatus (
OUT EFI_STATUS *CommandStatus,
OUT UINT8 *Dock
)
{
//[-start-210519-KEBIN00001-modify]//
#ifdef LCFC_SUPPORT
*CommandStatus = EFI_UNSUPPORTED;
return EFI_MEDIA_CHANGED;
#else
UINT8 PortData;
*CommandStatus = GetPcieDockStatus (&PortData);
*Dock = PortData;
return EFI_MEDIA_CHANGED;
#endif
//[-start-210519-KEBIN00001-modify]//
}