summaryrefslogtreecommitdiffstats
path: root/RedfishPkg
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* RedfishPkg/RedfishDebugLib: provide Redfish debugNickle Wang2023-03-069-15/+387
| | | | | | | | | | | | | | Introduce RedfishDebugLib to RedfishPkg. This library provides several debugging functions for Redfish application. Redfish drivers rely on Rest Ex protocol to communicate with BMC and the communication data may be big and complicated. Use RedfishDebugLib in RedfishRestExDxe to simplify debugging process. 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: Two PCDs for controlling the requestsAbner Chang2023-02-094-62/+116
| | | | | | | | | | | | Since BIOS should work with different BMC implementation chunked requests as well as Expect header should be optional. - One PCD is used to enable/disable Expect header. - Another PCD is used to enable/disable chunked requests. Reviewed-by: Abner Chang <abner.chang@amd.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com>
* RedfishPkg: fix multiple SMBIOS type 42 version issueNickle Wang2023-02-061-0/+8
| | | | | | | | | | | | | | RedfishHostInterfaceDxe does not close protocol notify event in event callback function. This could cause multiple version of type 42 records issue if the protocol is installed more than once. Close the event in callback function so we only create one type 42 record. 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/Include: Redfish USB Interface V2 updateAbner Chang2023-01-191-1/+24
| | | | | | | | | | | Support USB_INTERFACE_DEVICE_DESCRIPTOR_V2 which is updated in Redfish Host Interface spec v1.3. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
* RedfishPkg/Include: Add Redfish IPMI definitionsAbner Chang2023-01-191-0/+51
| | | | | | | | | | | Add the definitions of Redfish Host Interface credential bootstrapping IPMI commands. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Igor Kulchytskyy<igork@ami.com> Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
* RedfishPkg/RedfishHostInterface: Platform Redfish HI notificationAbner Chang2022-12-203-6/+121
| | | | | | | | | | | | | | | | For some use cases, Redfish host interface table relies on the certain EFI protocols installation at the driver connection. Redfish host interface DXE driver is not able to build the SMBIOS type 42h record at driver entry point. This patch adds the mechanism in Redfish host interface DXE driver to listen to EFI protocol installed by platform library that indicates the necessary information is ready for building SMBIOS 42h record. 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: Remove overlapping private include path in DEC fileMichael D Kinney2022-12-061-1/+0
| | | | | | | | | | | | | | | | | | | | | Update ReadfishPkg.dec to remove PrivateInclude from the [Includes.Common.Private] section. The PrivateInclude directory does not contain any include files, and the PrivateInclude/Crt include path remaining in the [Includes.Common.Private] section providing the include path required to access the CRT related include files by components within the RedfishPkg. Without this update, there are two forms of #include statements that can be used to include the CRT related include files. Include files should only be available using one form of #include statements. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com>
* RedfishPkg: Fix typos of the .inc filenamesRebecca Cran2022-12-052-2/+2
| | | | | | | | | Fix a typo of "RedfishLibs.dsc.inc" in RedfishLibs.dsc.inc, and correct the name of the .fdf.inc filename in Redfish.fdf.inc. Signed-off-by: Rebecca Cran <rebecca@quicinc.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishDiscoverDxe: Fix memory free issueAbner Chang2022-11-011-6/+10
| | | | | | | | | Check the memory block pointer before freeing it. Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
* RedfishPkg/JsonLib: Fix JsonLib build failureNickle Wang2022-09-231-0/+2
| | | | | | | | | | | VS2019 reports build failure: "warning C4701: potentially uninitialized local variable 'Ucs2Str' used". Initial Ucs2Str to NULL at the beginning of function. Cc: Abner Chang <abner.chang@amd.com> Cc: Nick Ramirez <nramirez@nvidia.com> Signed-off-by: Nickle Wang <nicklew@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishRestExDxe: Remove extra debug macro argumentMichael Kubacki2022-09-093-5/+5
| | | | | | | | | | | The debug macro argument in this change is removed since it does have a corresponding print specifier in the debug message string. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nickle@csie.io> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Nickle Wang <nickle@csie.io>
* RedfishPkg/RedfishDiscoverDxe: Install protocol on each network interfaceAbner Chang2022-09-062-52/+81
| | | | | | | | | | | | | | | | | | | BZ 4037: Install EFI_DISCOVER_PROTOCOL on each network interface. This fixes the issue that causes the high-level Redfish driver on the network interface is stopped when: 1. EFI_DISCOVER_PROTOCOL is reinstalled on a new-found network interface, or 2. EFI_DISCOVER_PROTOCOL is stopped on the network interface other than the one which is used to communicate with Redfish service. Cc: Nickle Wang <nickle@csie.io> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Nickle Wang <nickle@csie.io> Reviewed-by: Igor Kulchytskyy <igork@ami.com>
* RedfishPkg: Redfish functions for REST requests are not fully spec compliedAbner Chang2022-08-234-2/+309
| | | | | | | | | | | There is no function to send POST request with the ContentType different from "application\json". There is no function to send DELETE request with the body. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nickle.wang@hpe.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: Redfish modules may need to use the functions which are privateAbner Chang2022-08-232-1/+1
| | | | | | | | | | | Definitions of the required functions to send requests to BMC are in the PrivateInclude folder. So they cannot be used by the other Redfish packages. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nickle.wang@hpe.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg/RedfishDiscoverDxe: USB Redfish host interface is not supportedAbner Chang2022-08-231-3/+8
| | | | | | | | | | | | | | Host Interface details are described by the SMBIOS Type 42 table. The table is published by the RedfishHostInterfaceDxe driver. That driver supports PCI-E and USB host interface types.The table is consumed by the edfishGetHostInterfaceProtocolData function in the RedfishDiscoverDxe driver. The function only supports PCI-E host interface type. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nickle.wang@hpe.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* RedfishPkg: fix memory leak issueWenyi Xie2022-03-111-9/+7
| | | | | | | | | | | The calloc memory is not free when function collectionEvalOp return in the halfway. Cc: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com> Reviewed-by: Abner Chang <abner.chang@hpe.com>
* RedfishPkg/RedfishRestExDxe:Simplify status checkWenyi Xie2022-01-201-21/+18
| | | | | | | | | Remove redundant determine statements. No functional change. Cc: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
* RedfishPkg: Apply uncrustify changesMichael Kubacki2021-12-0756-4486/+5937
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the RedfishPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Abner Chang <abner.chang@hpe.com>
* RedfishPkg: Change OPTIONAL keyword usage styleMichael D Kinney2021-12-071-1/+1
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Abner Chang <abner.chang@hpe.com>
* RedfishPkg: Add more information to Readme.mdAbner Chang2021-10-301-0/+16
| | | | | | | | | | Add more information of network settings for EDK2 Redfish service on EmulatorPkg. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg: Update link to staging/RedfishClientPkg in Readme.mdNickle Wang2021-10-291-1/+1
| | | | | | | | | | Redfish feature DXE drivers are contributed to staging/RedfishClientPkg. Add link to Readme.md in staging/RedfishClientPkg. Signed-off-by: Nickle Wang <nickle.wang@hpe.com> Cc: Abner Chang <abner.chang@hpe.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Abner Chang <abner.chang@hpe.com>
* RedfishPkg: Fix various typosAbner Chang2021-09-075-6/+6
| | | | | | | | | Fix various typos in comments and documentation. Signed-off-by: Cheng Zhou <zhoucheng@phytium.com.cn> Reviewed-by: Nickle Wang <nickle.wang@hpe.com> Cc: Abner Chang <abner.chang@hpe.com> Reviewed-by: Abner Chang <abner.chang@hpe.com>
* RedfishPkg/RefishCrtLib: Public RefishCrtLibAbner Chang2021-08-116-6/+6
| | | | | | | | | | Public the header file, move RefishCrtLib.h from PrivateInclude/ to Include/. RefishCrtLib.lib will be public later. (Moved out from PrivateLibrary/) Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/JsonLib: Add more JsonLib functionsAbner Chang2021-08-102-22/+261
| | | | | | Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg: Add EDK2 Redfish Foundation diagramsAbner Chang2021-04-162-0/+1082
| | | | | | | | | | | | | | | | | | | | The Readme.md to delineate the EDK2 Redfish foundation driver stack diagrams. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Ting Ye <ting.ye@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Fan Wang <fan.wang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* RedfishPkg/RedfishConfigHandler: EDKII RedfishConfigHandler ProtocolAbner Chang2021-04-127-0/+1174
| | | | | | | | | | | | | | | | | | | | | | | | | BZ:2919 The driver is used to manage EDK2 Redfish Configuration Handler Protocol installed by EDK2 Redfish feature drivers. This is the EDK2 Redfish client driver written based on the EDK2 Redfish foundation to initialize EDK2 Redfish feature drivers. EDK2 Redfish feature drivers are used to provision/consume/update the firmware owns Redfish properties during system power on initialization. RedfishConfigHandlerCommon.c has the common code for the driver instances used in different EDK2 boot phases or used by different driver models in the future contribution. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Fan Wang <fan.wang@intel.com> Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/RedfishDiscoverDxe: EFI Redfish Discover ProtocolAbner Chang2021-04-127-2/+2539
| | | | | | | | | | | | | | BZ#:2906 EDK2 EFI Redfish Discover Protocol implementation. Refer to UEFI spec 2.9 section 31.1. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Fan Wang <fan.wang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg: Consume MdeLibs.dsc.inc for RegisterFilterLibDandan Bi2021-03-311-1/+3
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246 MdeLibs.dsc.inc was added for some basic/default library instances provided by MdePkg and RegisterFilterLibNull Library was also added into it as the first version of MdeLibs.dsc.inc. So update platform dsc to consume MdeLibs.dsc.inc for RegisterFilterLibNull which will be consumed by IoLib and BaseLib. Cc: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Abner Chang <abner.chang@hpe.com>
* MdePkg/Include: EFI Redfish Discover protocolAbner Chang2021-03-262-202/+0
| | | | | | | | | | | | | | | Move GUID definition of EFI Redfish Discover protocol to under MdePkg. With this we don't have dependency of RedfishPkg in ShellPkg. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Peter O'Hanley <peter.ohanley@hpe.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* RedfishPkg/Library: RedfishLibAbner Chang2021-03-1116-3/+4493
| | | | | | | | | | | | | | | | | | | | | | | | | | | | EDK2 port of DMTF libredfish project. We clone the necessary files from open source project libredfish (https://github.com/DMTF/ libredfish) tag v1.0.0 and revise it to incorporate with edk2 firmware code base. The reason of cloning the necessary files instead of using extern submodule of libredfish project: libredfish as a C library which is executed under Windows and Linux. It could be binded with other programming languages such as java and python. The library uses curl library as the communication service with Redfish, which is not easy to be abstracted and replaced with EFI specific protocols (e.g. EFI_REST_EX_PROTOCOL or payload encode/decode library) and EFI data types. We had the conversation with DMTF community and they think edk2 is a firmware solution but not the programming language, therefore they rejected to have edk2 as a binding to libredfish. According to above, we decide to clone the necessary files from libredfish modify it to incorporate with edk2. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Ting Ye <ting.ye@intel.com> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Fan Wang <fan.wang@intel.com> Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/RedfishContentCodingLib: EDKII Redfish En/Decode libraryAbner Chang2021-02-245-2/+199
| | | | | | | | | | | | | | | | | | | BZ#:3174 Platform library to provide the encoding/decoding algorithms for the Redfish packets. The supported value could be one of below or any which is platform-specific. - HTTP_CONTENT_ENCODING_IDENTITY "identity" - HTTP_CONTENT_ENCODING_GZIP "gzip" - HTTP_CONTENT_ENCODING_COMPRESS "compress" - HTTP_CONTENT_ENCODING_DEFLATE "deflate" - HTTP_CONTENT_ENCODING_BROTLI "br" Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/Include: EDKII Redfish Config Handler Protocol header fileAbner Chang2021-02-242-0/+81
| | | | | | | | | | | | | | | BZ:2911 This is the header file of EDKII Redfish config handler protocol, which is used by EDKII Redfish feature driver in order to manipulate Redfish properties based on the Redfish schema. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Fan Wang <fan.wang@intel.com> Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/JsonLib: Ignore the build error of conditional expression.Abner Chang2021-02-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore the build error of assignment within conditional expression. Add build option to ignore the build error of "assignment within conditional expression". This build error is caused by the macros defined in open source project jansson header file jansson.h. - json_object_foreach - json_object_foreach_safe - json_array_foreach We use build option to avoid the build errors on Visual Studio (GCC doesn't havvve this problem) for now. Already sent an email to jansson open source community to revise these macro as Leif's suggestion as below, for (key = json_object_iter_key(json_object_iter(object)); \        key; \        key = json_object_iter_key(                            \             json_object_iter_next(object, json_object_key_to_iter(key)))) { \   value = json_object_iter_value(json_object_key_to_iter(key));        \ if (!value) \ break; \ } \ We will remove this build option once the patch is accepted and upstreamed. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/JsonLib: Fix the mistake of removing code by a accidentAbner Chang2021-02-241-2/+2
| | | | | | | | | | | | | json_string_value() in JsonValueGetAsciiString () is removed by a accident when clean up the code. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/JsonLib: Add JsonLoadString functionAbner Chang2021-02-242-0/+47
| | | | | | | | | | | Add JsonLoadString function to load a NULL terminated-string JSON Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/RedfishCrtLib: Add more CRT functionsAbner Chang2021-02-241-1/+121
| | | | | | | | | | | | | | | | | Add more functions which were missed in the first time commit, that causes the build error with EDK2 Redfish feature driver. strerror - We don't support this on edk2 environment. strpbrk - Cloned this function from edk2-LibC File operation functions - Not supported on edk2 environment. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com> Acked-by: Leif Lindholm <leif@nuviainc.com>