RedfishPkg/RedfishPlatformConfigDxe:Add RefishDebugLib support
Add RedfishPlatformConfigDxe debug capability that aligns with edk2 Redfish debug mechanism. - PcdRedfishPlatformConfigDebugProperty, add PCD to control RedfishPlatformConfigDxe subordinate of Redfish debug capabilities. - PcdRedfishPlatformConfigFeatureProperty, add PCD to manage RedfishPlatformConfigDxe features. Signed-off-by: Abner Chang <abner.chang@amd.com> Co-authored-by: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com>
This commit is contained in:
committed by
mergify[bot]
parent
b0be42516e
commit
c8f56800fd
@@ -0,0 +1,58 @@
|
||||
/** @file
|
||||
The implementation of EDKII Redfish Platform Config Capability.
|
||||
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#include "RedfishPlatformConfigDxe.h"
|
||||
#include "RedfishPlatformConfigImpl.h"
|
||||
|
||||
/**
|
||||
Check if the debug property is enabled or not.
|
||||
|
||||
@param[in] DebugType Debug enablement type
|
||||
|
||||
@retval TRUE, the debug property is enabled.
|
||||
FALSE, the debug property is not enabled.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
RedfishPlatformConfigDebugProp (
|
||||
IN UINT64 DebugType
|
||||
)
|
||||
{
|
||||
UINT64 DebugProp;
|
||||
|
||||
DebugProp = FixedPcdGet64 (PcdRedfishPlatformConfigDebugProperty);
|
||||
if ((DebugProp & DebugType) != 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
Check if the Platform Configure feature is enabled or not.
|
||||
|
||||
@param[in] FeatureType Redfish platform config feature enablement
|
||||
|
||||
@retval TRUE, the feature is enabled.
|
||||
FALSE, the feature is not enabled.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
RedfishPlatformConfigFeatureProp (
|
||||
IN UINT64 FeatureType
|
||||
)
|
||||
{
|
||||
UINT64 FeatureProp;
|
||||
|
||||
FeatureProp = FixedPcdGet64 (PcdRedfishPlatformConfigFeatureProperty);
|
||||
if ((FeatureProp & FeatureType) != 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
Reference in New Issue
Block a user