forked from tianocore/edk2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
b0be425
commit c8f5680
Showing
7 changed files
with
262 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.