summaryrefslogtreecommitdiffstats
path: root/RedfishPkg
Commit message (Collapse)AuthorAgeFilesLines
* RedfishPkg/RedfishPlatformConfigDxe: Config language searching optimizationabnchang2024-04-043-72/+877
| | | | | | | | | | | | Build up the x-uefi-redfish string database for the Redfish confg language searching, instead of using HII String protocol. This can improve the time consumption lot on searching strings. 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>
* RedfishPkg/RedfishCrtLib: fix unresolved external symbol issueNickle Wang2024-02-293-1/+45
| | | | | | | | | | | | | | | -Fix below compiler error reported in edk2 CI. ERROR - Linker #2001 from JsonLib.lib(load.obj) : unresolved external symbol __ftol2 -The file MathFtol.c is copied from IntrinsicLib in CryptoPkg. -Add MathFtol.c to EccCheck IgnoreFiles. 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/RedfishDebugLib: use RedfishHttpLibNickle Wang2024-02-293-3/+4
| | | | | | | | | | | | Remove RedfishLib and use RedfishHttpLib for debug printing Redfish response data. 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/RedfishLib: include RedfishServiceData.hNickle Wang2024-02-291-16/+1
| | | | | | | | | | | | Redfish common structures are moved to RedfishServiceData.h. Remove them from RedfishLib.h 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: introduce RedfishHttpLibNickle Wang2024-02-296-2/+963
| | | | | | | | | | | | RedfishHttpLib is a wrapper library for Redfish feature drivers to call Redfish HTTP Protocol easily. 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: implement Redfish HTTP protocolNickle Wang2024-02-2911-4/+3164
| | | | | | | | | | | | | implement Redfish HTTP protocol driver. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Co-authored-by: Igor Kulchytskyy <igork@ami.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> Reviewed-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* RedfishPkg: introduce Redfish HTTP protocolNickle Wang2024-02-293-1/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce Redfish HTTP protocol to improve Redfish performance and communication stability between BIOS and Redfish service. - Feature drivers often query same Redfish resource multiple times for different purpose. Implement HTTP cache mechanism to improve HTTP GET performance. "UseCache" parameter is provided if application likes to send HTTP GET request to Redfish service without using cache data. - This driver will retire stale cache data automatically when application modify Redfish resource at service side. - PCD PcdHttpCacheDisabled is used to disable cache mechanism in this driver for debugging purpose. - PCD PcdRedfishServiceContentEncoding is used to enable content encoding while sending data to Redfish service. - Redfish HTTP protocol also implement retry mechanism to retry HTTP request when BIOS receive unexpected response from Redfish service. This function helps BIOS Redfish to finish its job as much as possible. - PCDs are defined to control how many times BIOS will retry the request and how many time BIOS will wait between retries. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Co-authored-by: Igor Kulchytskyy <igork@ami.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/RestJsonStructureDxe: Refine REST JSON C Structure DXE driverAbner Chang2024-02-273-6/+96
| | | | | | | | | | | | | | | | | | | BZ #: 4711 - Add mode debug messages. - Remove the references of "Redfish" from this driver. As REST JSON C Structure was not designed for Redfish only. Any RESTful applications can register the converter and provide JSON-C structure conversions through EFI_REST_JSON_STRUCTURE_PROTOCOL. Therefore this driver shouldn't have a dependency on Redfish package and the references of "Redfish" terminology. - Fix the missing parameter of DEBUG macros used in this driver. 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/JsonLib: Add JSON delete object functionAbner Chang2024-01-162-0/+41
| | | | | | | | | To support the deletion on a specified JSON object. 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/RedfishCrtLib: handle floating point number in JSONNickle Wang2024-01-152-7/+30
| | | | | | | | | | | | | | When the value type is defined as number in Redfish schema, floating point number is allowed. RedfishCrtLib raises assert without handling this case now. Follow the way in EDK2 to call AsciiStrDecimalToUintnS and handle the floating point number. Only the integer value is returned. 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 function to print buffer.Nickle Wang2024-01-102-4/+61
| | | | | | | | | | | | Introduce DumpBuffer function to print the buffer content. This helps developer to debug Redfish issue. 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: Update Supported functionAbner Chang2024-01-101-0/+15
| | | | | | | | | | Update Supported function to check it the given controller handle is already started. 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/RedfishRestExDxe: Uncrustify RedfishRestExDriver.hAbner Chang2024-01-101-11/+11
| | | | | | | 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/RedfishRestExDxe: Implement EDKII_HTTP_CALLBACK_PROTOCOLAbner Chang2024-01-103-10/+95
| | | | | | | | | | | Implement EDKII_HTTP_CALLBACK_PROTOCOL that listens to HttpEventTlsConfigured event for reconfiguring TLS configuration data. 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: RedfishDiscoverDxe: add [] brackets to URI for IPv6 addressesMike Maslenkin2023-12-271-2/+15
| | | | | | | | | | | | | | | | URI is generated based on the RedfishLocation containing an ASCII string representing the IP address. So, in the case of IPv4 the canonical representation of an IPv4 address was inserted into the resulting Unicode string i.e: "http{,s}://X.X.X.X/". In the case of IPv6, to access resources, the IP address must be specified in brackets, i.e. the resulting string should look like: "http{,s}://[X::X:X:X:X]/". Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishDiscoverDxe: handle memory allocation error conditions.Mike Maslenkin2023-12-271-11/+78
| | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4625 Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishDiscoverDxe: release resources when refreshing information dataMike Maslenkin2023-12-271-0/+2
| | | | | | | | | | It is required to free previously allocated strings stored in DiscoveredInstance->Information structure. Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishDiscoverDxe: add a helper function deallocating string resources.Mike Maslenkin2023-12-271-24/+44
| | | | | | | | | | This patch adds a handy helper function deallocating resources from the EFI_REDFISH_DISCOVERED_INFORMATION structure instance. Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishDiscoverDxe: refine InitInformationData() functionMike Maslenkin2023-12-271-13/+21
| | | | | | | | | Cache size of ASCII string in local variable. Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishDiscoverDxe: refine InitInformationData(), remove unnecessary castsMike Maslenkin2023-12-271-18/+18
| | | | | | | | Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Pedro Falcato <pedro.falcato@gmail.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishDiscoverDxe: introduce InitInformationData helper functionMike Maslenkin2023-12-271-34/+74
| | | | | | | Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: add proper initialization of IPMI requestMike Maslenkin2023-12-271-3/+5
| | | | | | | | | | All fields of IPMI_CHANNEL_INFO_CHANNEL_NUMBER union must be initialized to avoid error condition on BMC side. Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: add Component Name protocols to RedfishConfigHandler driverMike Maslenkin2023-12-274-3/+230
| | | | | | | | | | | Currently there is no description for RedfishConfigHandler driver. This leads to <null string> in the "DRIVER NAME" column of a `drivers` command for example. Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: RedfishDiscoverDxe: fix memory leak on error path.Mike Maslenkin2023-12-271-4/+4
| | | | | | | Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: RedfishPlatformConfigDxe: reduce memory allocationsMike Maslenkin2023-12-271-3/+1
| | | | | | | | | | | | It's unclear why the new string is allocated as copy of the original string if its pointer is stored in an array and the original string is released immediately after the copy is created. All data allocated in the same pool. Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: get rid of unused definitions from RedfishCrtLib.hMike Maslenkin2023-12-271-34/+11
| | | | | | | | | | | | | | It seems that initial implementation of this header file is based on CrtLibSupport.h from CryptoPkg. But uid, euid, gid, egid and sa_family_t sre not used in RedfishPkg. So remove them. Also take "true" and "false" definition from MdePkg's LibFdtSupport.h header file, that also seems based on a header mentioned above. Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: fix RedfishPlatformCredentialLib library class name typo.Mike Maslenkin2023-12-271-1/+1
| | | | | | | | | | RedfishPlatformCredentialIpmiLib is the library instance name not the class name. Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: fix RedfishPlatformHostInterfaceLib library class name typo.Mike Maslenkin2023-12-271-1/+1
| | | | | | | | | | PlatformHostInterfaceBmcUsbNicLib is the library instance name not the class name. Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishDicovery: Remedy Redfish service discovery flowAbner Chang2023-12-131-70/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remedy Redfish service discovery flow changes made in commit 8736b8fd. The above fix creates the dependency with SMBIOS 42h record, which has a problem as SMBIOS 42h may not be created when RedfishDiscovery.Supported() is invoked even all of the required protocols are ready on the ControllerHandle. We can’t guarantee SMBIOS 42 structure will be always created before ConnectController(). USB NIC maybe detected late and it means PlatformHostInterfaceBmcUsbNicLib can populate SMBIOS 42h information late as well. Calling to RedfishServiceGetNetworkInterface with the previous fix may result in no network interface for BMC-exposed NIC as SMBIOS 42h is not ready yet.This is the first issue. Second, to skip the network interface when NetworkInterfaceGetSubnetInfo() returns a failure also has problem, as the NIC may be configured via RestEx->Configure(). This happens after the Host interface is discovered, as at this moment we have the sufficient network information to configure BMC-exposed NIC. Base on Redfish spec in 31.1.5.2, “EFI Redfish Client may provide selection UI of network interfaces for Redfish service discovery.", This means edk2 Redfish client gets all network interfaces through RedfishServiceGetNetworkInterface and choose the desired network interface at its discretion for Redfish service. So the fix here is: 1. In BuildNetworkInterface(), we don’t skip any network interface. In RedfishServiceGetNetworkInterface, we don’t skip any network interface even the subnet information is not retrieved. We will still return all of network interfaces to client. 2. In RedfishServiceAcquireService for EFI_REDFISH_RISCOVER_HOST_INTERFACE case, we don’t skip any network interface even the subnet information is not retrieved. 3. Added some more debug information. Note: The subnet information is used for the scenario the system is managed by a centralized Redfish service (not on BMC), says the multiple Redfish computer system instances. As it mentions in 31.1.5.2, Redfish client they may have to know the subnet information so they can know the network domain the NIC is connected. There may have multiple subnets in the corporation network environment. So the subnet information provides client an idea when they choose the network interface, so does VLAN ID. 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: Igor Kulchytskyy <igork@ami.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* 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>