summaryrefslogtreecommitdiffstats
path: root/RedfishPkg
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* RedfishPkg: Implementation of EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOLNickle Wang2023-04-285-0/+4329
| | | | | | | | | | | | | This is the Implementation of EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL, which is the EDKII Redfish Platform Config driver instance that accesses EDK2 HII configuration format and storage. 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 HII utility helper libraryNickle Wang2023-04-289-0/+12571
| | | | | | | | | | | | HiiUtilityLib is a helper library that provides the functions to manipulate HII options. 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 EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOLNickle Wang2023-04-282-0/+260
| | | | | | | | | | | | | | | | EDKII Redfish Platform Config Protocol defines the protocol interfaces that abstracts the platform configuration format and storage from EDK2 Redfish Feature driver. This protocol provides the interfaces to get and set platform configuration with the format and configuration storage agnostic to the Redfish feature 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: Abner Chang <abner.chang@amd.com> Reviewed-by: Igor Kulchytskyy <igork @ami.com>
* RedfishPkg: Remove the Discover Token global variablesIgor Kulchytskyy2023-04-263-119/+139
| | | | | | | | | | | | | gRedfishDiscoveredToken may be allocated several times, if multiple NIC installed on the system. To avoid this issue Discover Token related global variables replaced with the local variables. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-109-93/+93
| | | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout RedfishPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
* RedfishPkg/RedfishPlatformCredentialIpmiLib: IPMI implementationNickle Wang2023-03-306-0/+599
| | | | | | | | | | | | | This library follows Redfish Host Interface specification and use IPMI command to get bootstrap account credential(NetFn 2Ch, Command 02h) from BMC. RedfishHostInterfaceDxe will use this credential for the following communication between BIOS and BMC. 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: fix config handler driver issuesNickle Wang2023-03-292-6/+8
| | | | | | | | | | | | | | | Bug fix: - function stack fault - config handler driver requires the dependency of Redfish Credential Protocol - incorrect caller id installation when failed to perform init() - 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: Redfish discover driver improvementNickle Wang2023-03-293-57/+120
| | | | | | | | | | | | | | | | | | | | | | | Bug fix: - function stack fault - properly handle "SubnetAddrInfoIPv6" when there is no IPv6 support - copy-n-paste error in RedfishGetHostInterfaceProtocolData() - fix typo Enhancement: - Redfish discover driver now can configure host IP address based on the information from SMBIOS type 42 record. This saves the effort of configuring host IP address in setup menu. - Performance improvement to driver binding process. Redfish discover driver will wait until all required drivers are ready and do driver binding start(). - Use CopyGuid() to copy GUID instead of intrinsic function. - Error handling when SMBIOS data is corrupted. 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/JsonLib: address coverity issueNickle Wang2023-03-291-1/+2
| | | | | | | | | | Fix implicit conversion issue in JsonLib. 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: Update Readme.mdAbner Chang2023-03-204-8/+1001
| | | | | | | | | | Update readme.md and add figures to delineate the relationship of edk2 Redfish, USB NIC and IPMI. 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: Update Redfish DSCAbner Chang2023-03-201-0/+7
| | | | | | | | | | Update Redfish DSC for PlatformHostInterfaceBmcUsbNicLib. 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/Library: Redfish BMC USBNIC Host InterfaceAbner Chang2023-03-205-1/+1435
| | | | | | | | | | BMC exposed USB NIC platform Redfish Host Interface library implementation. 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>