Files
system76-edk2/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c
Abner Chang c8f56800fd 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>
2024-04-04 14:24:31 +00:00

59 lines
1.2 KiB
C

/** @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;
}