diff options
author | Abner Chang <abner.chang@amd.com> | 2024-03-18 11:18:32 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-04-04 14:24:31 +0000 |
commit | c8f56800fd3a280b1ce9ff6da7f9581304b6a40d (patch) | |
tree | 5475fa3852919eabf353259acd6edbbc2baa6801 /RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c | |
parent | b0be42516e757ff54fb92b9a984ecb84512460d7 (diff) | |
download | edk2-c8f56800fd3a280b1ce9ff6da7f9581304b6a40d.tar.gz edk2-c8f56800fd3a280b1ce9ff6da7f9581304b6a40d.tar.bz2 edk2-c8f56800fd3a280b1ce9ff6da7f9581304b6a40d.zip |
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>
Diffstat (limited to 'RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c')
-rw-r--r-- | RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c new file mode 100644 index 0000000000..753c4d393f --- /dev/null +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c @@ -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;
+}
|