summaryrefslogtreecommitdiffstats
path: root/RedfishPkg
Commit message (Collapse)AuthorAgeFilesLines
* RedfishPkg/HostInterfaceBmcUsbNic: Fix potential memory corruption issueAbner Chang2023-12-051-2/+2
| | | | | | | | | | | | Wrong memory allocation issue may result in memory corruption. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/HostInterfaceBmcUsbNic: Fix incorrect HI protocol record sizeAbner Chang2023-12-051-2/+2
| | | | | | | | | | | | The size of structure must be minus with byte that is occupied by the initial array. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/HostInterfaceBmcUsbNic: Correct MAC address referenceAbner Chang2023-12-051-1/+1
| | | | | | | | | | | | MAC address reference is incorrect when it is copied to Host Interface DeviceDescriptor. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/RedfishDiscovery: Refine SMBIOS 42h codeAbner Chang2023-12-052-2/+20
| | | | | | | | | | | | Refine SMBIOS 42h code add mode debug message for the error conditions. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/RedfishDiscovery: Add more debug messageAbner Chang2023-12-051-0/+23
| | | | | | | | | Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/RedfishConfigHandler: Correct the prototype of callback functionAbner Chang2023-12-051-2/+2
| | | | | | | | | Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/RedfishConfigHandler: Use Redfish HI readiness notificationAbner Chang2023-12-052-61/+116
| | | | | | | | | | | | Wait until Redfish Host Interface is installed on the system then acquire Redfish service. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/RedfishHostInterfaceDxe: Add Redfish HI readiness notificationAbner Chang2023-12-053-1/+23
| | | | | | | | | | | | | Introduce gEdkIIRedfishHostInterfaceReadyProtocolGuid and produce it when Redfish Host Interface is installed on system. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/BmcUsbNicLib: Update BMC USB NIC searching algorithmAbner Chang2023-12-051-60/+128
| | | | | | | | | | | | | Update BMC USB NIC searching algorithm for IPv4 only. Signed-off-by: Abner Chang <abner.chang@amd.com> Co-authored-by: Mike Maslenkin <mike.maslenkin@gmail.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/HostInterfaceBmcUsbNic: Set default Redfish service portAbner Chang2023-12-013-3/+8
| | | | | | | | | | | BZ #4607 Create a PCD for the default Redfish service port. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
* RedfishPkg: add explicit variable initializationMike Maslenkin2023-11-301-0/+1
| | | | | | | | | | | | | | | | Ancient GCC 4.8.5 warned about variable may be unitialied. And it doesn't look like false alarm. The warning is: edk2/RedfishPkg/Library/HiiUtilityLib/HiiUtilityInternal.c: In function 'GetQuestionDefault': edk2/RedfishPkg/Library/HiiUtilityLib/HiiUtilityInternal.c:5519:6: error: 'ConfigAccess' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (ConfigAccess != NULL) { Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg: fix memory leak in HiiUtilityLibMike Maslenkin2023-11-301-0/+2
| | | | | | | | Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flowedk2-stable202311Igor Kulchytskyy2023-11-222-57/+145
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4602 Filter out the network interfaces which are not supported by Redfish Host Interface. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com> Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
* RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed after RestExIgor Kulchytskyy2023-11-221-15/+16
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4602 Supported function of the driver changed to wait for all network interface to be installed. Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by Mike Maslenkin <mike.maslenkin@gmail.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com> Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
* Revert "RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed later"Liming Gao2023-11-221-16/+15
| | | | | | This reverts commit 06b27ccb90302bffbb34e4ddf31a6e2843dd20f5. Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
* Revert "RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flow"Liming Gao2023-11-222-105/+33
| | | | | | This reverts commit 3db76e6476e493d3cda45b81bba99a645180cf35. Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
* RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flowIgor Kulchytskyy2023-11-152-33/+105
| | | | | | | | | | Filter out the network interfaces which are not supported by Redfish Host Interface. Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by Mike Maslenkin <mike.maslenkin@gmail.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com>
* RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed after RestExIgor Kulchytskyy2023-11-151-15/+16
| | | | | | | | | | Supported function of the driver changed to wait for all network interface to be installed. Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by Mike Maslenkin <mike.maslenkin@gmail.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com>
* RedfishPkg/RedfishCrtLib: remove multiple definitions.Nickle Wang2023-11-011-105/+0
| | | | | | | | | | | | | | | | There are two definitions for below functions in RedfishCrtLib.h. Create this change to remote duplicated functions. Function list: strcmp(), strncmp(), strncpy(), strcpy(), strcat(), strlen(), strchr(), strcasecmp(), strstr(), memcmp(), memset(), memcpy(), memchr(), memcmp() and memmove(). Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/RedfishLib: return HTTP headers to callerNickle Wang2023-10-261-3/+7
| | | | | | | | | | Call Ex interface to get HTTP headers and return to caller. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/libredfish: introduce new interfaces.Nickle Wang2023-10-264-25/+394
| | | | | | | | | | | | | - Add new interfaces to return HTTP headers back to caller. New interfaces are: getUriFromServiceEx(), patchUriFromServiceEx(), postUriFromServiceEx() and putUriFromServiceEx(). - Fix compile error in payload.c Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishLib: introduce new interfaces.Nickle Wang2023-10-264-37/+226
| | | | | | | | | | | | Add two new interface: RedfishServiceInPayload() and RedfishPutToUri() for Redfish HTTP protocol implementation. Fix several typos and add missing JsonLib in INF file. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishDiscoverDxe: remove Redfish false alarmNickle Wang2023-10-241-6/+10
| | | | | | | | | | | | | - It is expected that caller receives EFI_NO_MAPPING status when call issues Configure() to unconfigured network interface. Remove this false alarm in GetSubnetInfo() function. - Fix typos Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishPlatformConfigDxe: add debug message.Nickle Wang2023-10-241-1/+122
| | | | | | | | | | | | Add debug prints to show HII option name when assert happens. This helps developer to debug assert issue easily while Redfish failed to convert HII value to Redfish value. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: CI: Add PrEval entryJoey Vagedes2023-10-231-0/+3
| | | | | | | | | | | | | | | | | | | Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com
* RedfishPkg/RedfishDiscoverDxe: introduce PcdRedfishSendReceiveTimeoutNickle Wang2023-10-183-2/+7
| | | | | | | | | | | | | Introduce PCD PcdRedfishSendReceiveTimeout to RedfishDiscoverDxe driver. The SendReceiveTimeout is hard-code value in Redfish discover driver. With this PCD, platform owner can configure timeout value easily. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com>
* RedfishPkg: Use base version SortLib for the specific modulesAbner Chang2023-10-112-3/+8
| | | | | | | | | | | | | | | | | | BZ #: 4566 Update Redfish modules to use the small footprint version of base SortLib by the means of module scoped subelement <LibraryClass>. With this the platform level SortLib (full version) is not impacted if Redfish.dsc.inc is included in platform DSC. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Reviewed-by: Nhi Pham <nhi@os.amperecomputing.com> Tested-by: Nhi Pham <nhi@os.amperecomputing.com>
* RedfishPkg/JsonLib: fix JsonObjectGetValue issueNickle Wang2023-09-222-0/+36
| | | | | | | | | | | | | | | JsonObjectGetValue() cannot find corresponding JSON value when the EDKII_JSON_VALUE object is created by another UEFI driver. This is because "hashtable_seed" is initialized by current time while JsonLib is loaded. So, "hashtable_seed" will be different in each individual UEFI driver. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishRestExDxe: return HTTP status code to caller.Nickle Wang2023-09-191-13/+14
| | | | | | | | | | | | | | | | Return unsupported HTTP status code to caller so caller can handle HTTP error status code. Current implementation only return EFI error to caller. Without knowing the HTTP status code, caller has trouble to handle HTTP request failure. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg/PlatformHostInterfaceBmcUsbNicLib: Fix DEBUG macro argsMichael Kubacki2023-09-191-4/+4
| | | | | | | | | | | Some macros added have a mismatched number of print specifiers to arguments. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishPlatformConfigDxe: fix can not set one-of option issue.Nickle Wang2023-09-131-6/+5
| | | | | | | | | | | StatementValue->Buffer is converted from ASCII to Unicode by caller already so we don't have to convert it again. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com>
* RedfishPkg/RedfishPlatformConfigDxe: Fix unused variableNhi Pham2023-08-291-1/+2
| | | | | | | This fixes an unused variable 'Index' error in release build. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishDiscoverDxe: fix netmask check issueNickle Wang2023-07-265-4/+53
| | | | | | | | | | | | | | - Add NTOHL() for coverting IP address from EFI_IPv4_ADDRESS to IP4_ADDR so that IP4_IS_VALID_NETMASK() return correct value. - Add DumpIpv4Address() in RedfishDebugLib and print IP address when invalid IP or subnet mask address is detected. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishRestExDxe: reset session when TCP timeout happensNickle Wang2023-07-173-2/+20
| | | | | | | | | | | Call ResetHttpTslSession() to reset HTTP session when TCP timeout failure happens. So that application can perform retry to the same URI. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishDebugLib: add new interfacesNickle Wang2023-07-062-0/+146
| | | | | | | | | | | Introduce DumpHiiStatementValue() and DumpRedfishValue() to RedfishDebugLib. Application uses these functions to debug print the value of HII_STATEMENT_VALUE and EDKII_REDFISH_VALUE. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/JsonLib: add object clear interfaceNickle Wang2023-07-062-16/+56
| | | | | | | | | | | | -Add JsonObjectClear() interface for application to clear all elements in JSON object. -Fix typo. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishPlatformConfigDxe: hide debug messageNickle Wang2023-07-062-13/+13
| | | | | | | | | | | Change debug message level of showing ordered list op-code to REDFISH_PLATFORM_CONFIG_DEBUG. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishRestExDxe: fix CPU exception in RedfishRestExDxeNickle Wang2023-07-061-1/+3
| | | | | | | | | | | | RedfishRestExDxe driver failed to uninstall service binding protocol when driver binding stop is called. Application drivers may still use RedfishRestExDxe after it is disconnected in system. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: Fix SortLib library class name typo.Mike Maslenkin2023-06-302-2/+2
| | | | | | | | | BaseSortLib is the library instance name not the class name. Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com>
* RedfishPkg: update Readme.mdNickle Wang2023-06-071-11/+11
| | | | | | | | | | | RedfishClientPkg is moved from edk2-staging repository to edk2-redfish-client repository. Update the link in Readme.md to new location. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: Use DEBUG_MANAGEABILITYAbner Chang2023-05-3112-61/+61
| | | | | | | | | | Use debug print level DEBUG_MANAGEABILITY in RedfishPkg. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
* RedfishPkg/RedfishPlatformConfigDxe: fix value type issue.Nickle Wang2023-05-301-0/+10
| | | | | | | | | | | | | | | Fix incorrect value type issue for checked-box op-code. When the variable for checked-box is defined as UINT8 in varstore structure, IFR compiler assign its value type to EFI_IFR_TYPE_NUM_SIZE_8 instead of EFI_IFR_TYPE_BOOLEAN. However, the value type for checked-box is boolean value. Redfish service may return error because of incorrect value type passed to BIOS attribute registry. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishPlatformConfigDxe: Fix string assert issueNickle Wang2023-05-294-27/+169
| | | | | | | | | | | | | | When calling SetValue() with string type input, there is assertion of providing zero string ID to HII string function. Fix this issue by creating string ID for input string buffer. Fix Unicode and Ascii code convert issue together. Add text op-code support Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com>
* RedfishPkg: Fix compile issue on LinuxVu Nguyen2023-05-081-1/+4
| | | | | | | | | | | It requires a fixed size array to store the content of device path PCD. Add the array size to solve this issue. Signed-off-by: Minh Nguyen <minhnguyen1@os.amperecomputing.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <Abner.Chang@amd.com>
* RedfishPkg: Add missing newline characterNhi Pham2023-05-081-1/+2
| | | | | | | | | | | This adds a missing newline character to make the error log readable in case the module is failed. Signed-off-by: Minh Nguyen <minhnguyen1@os.amperecomputing.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
* RedfishPkg: Create RestEx child on selected interfaceVu Nguyen2023-05-083-100/+73
| | | | | | | | | | | | | | | When a MAC address matching interface is found, a RestEx child will be created to provide the Redfish communication on that interface. Currently, It will try to locate all RestEx binding services and choose the first satisfied instance without taking care about current selected interface. This might raise an issue on the system with multiple network devices that the RestEx child was installed on wrong interface. Signed-off-by: Minh Nguyen <minhnguyen1@os.amperecomputing.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <Abner.Chang@amd.com>
* RedfishPkg: Fix condition checking of error statusVu Nguyen2023-05-081-1/+2
| | | | | | | | | | | This change fixes condition checking of error status, the condition should be compared with TRUE status to be identical with an error message. Signed-off-by: Minh Nguyen <minhnguyen1@os.amperecomputing.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
* RedfishPkg: Correct variable type to prevent memory corruptionVu Nguyen2023-05-081-1/+2
| | | | | | | | | | | Id will be casted by CoreOpenProtocol, declare this variable with a wrong type might result in the corruption of other local variables. Signed-off-by: Minh Nguyen <minhnguyen1@os.amperecomputing.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
* RedfishPkg: Add Redfish Platform Config Protocol to RedfishPkgNickle Wang2023-04-284-0/+12
| | | | | | | | | | | | Add RedfishPlatformConfigDxe driver and corresponding library to RedfishPkg. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Igor Kulchytskyy <igork @ami.com>
* RedfishPkg: Helper library of EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOLNickle Wang2023-04-285-0/+534
| | | | | | | | | | | | This is the helper library for using EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Igor Kulchytskyy <igork @ami.com>