From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112860+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112860+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458955; cv=none; d=zohomail.com; s=zohoarc; b=ZoVaYmmI4zVsMfKaT1Llt/EZ1b2d/oxC2UlmaAzrOx+SekaHgXJyidYiJysDL5iYiXimw9Qk/lNLyQ1NOKtTidx86QmNUDvWbctCKanGgISHL+AdDMKpup+pLOv3Gps/dExdoMniRi3qObdbqXGey/GNmUbFexWAVFGoFSiHBok= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458955; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=kGhz6tc3aNzr+f0z20NBIKQMPSGfytMwWVG5ZfC6Wts=; b=Jkak9LBsL1fhoxwUWXutX/R/OQtfgSyGmix+h2foJll3gAigAFZezRKv4m1RTO943lepsHiQ6G22Eq3J9waQm6Gj+hidH4UUrAZCWF+2CpmwTTRK+wWqKRCWsuSM66MVWwxVb7Qnx5LC+mPq11wz/LqEZ/ALtOYDSmy2HHwSlb0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112860+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458955233830.3615267248665; Sun, 24 Dec 2023 15:02:35 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=f+NGooKBaLi2SdzN2SEJ62vbScLzV66gUFyVti3INWk=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458954; v=1; b=kEN+SMtVmUebOxOBHKV0zNrroJrKDC4qkG9kWbupksNBEteYMrgR2kEKfyYrqxQlGoqyZvyZ J5il4XdYoaVYWcIRngh+tYSDbzm1LCJwzYn49fCJ76x2YWj+bkMJTQYogEbijerPyKeofv426PT bEFwqrFHk2cIckne3jn1T5Aw= X-Received: by 127.0.0.2 with SMTP id uxUXYY1788612xIO5vn7RKxW; Sun, 24 Dec 2023 15:02:34 -0800 X-Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mx.groups.io with SMTP id smtpd.web10.35939.1703458773896329398 for ; Sun, 24 Dec 2023 14:59:34 -0800 X-Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2ccad57dadbso18388121fa.1 for ; Sun, 24 Dec 2023 14:59:33 -0800 (PST) X-Gm-Message-State: MkOMiY4jzi4qc818eLR7kpxCx1787277AA= X-Google-Smtp-Source: AGHT+IFBPZ7nEcBjmB1q7CTNWaidXftoJiMp0sBSRl8wT2+3vBdYJvWBaoOWXhg7uq/mFFgMQM02NA== X-Received: by 2002:ac2:4882:0:b0:50e:39b3:d43e with SMTP id x2-20020ac24882000000b0050e39b3d43emr1616660lfc.66.1703458771808; Sun, 24 Dec 2023 14:59:31 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:31 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 01/16] RedfishPkg: fix RedfishPlatformHostInterfaceLib library class name typo. Date: Mon, 25 Dec 2023 01:59:12 +0300 Message-Id: <20231224225927.9119-2-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458957698100001 Content-Type: text/plain; charset="utf-8" PlatformHostInterfaceBmcUsbNicLib is the library instance name not the class name. Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../PlatformHostInterfaceBmcUsbNicLib.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformH= ostInterfaceBmcUsbNicLib.inf b/RedfishPkg/Library/PlatformHostInterfaceBmcU= sbNicLib/PlatformHostInterfaceBmcUsbNicLib.inf index 838a1721a7ae..3660249a3588 100644 --- a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInte= rfaceBmcUsbNicLib.inf +++ b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInte= rfaceBmcUsbNicLib.inf @@ -14,7 +14,7 @@ FILE_GUID =3D C4837B58-225E-4352-8FDC-4C52A5D65891 MODULE_TYPE =3D DXE_DRIVER VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D PlatformHostInterfaceBmcUsbNicLib + LIBRARY_CLASS =3D RedfishPlatformHostInterfaceLib =20 [Sources] PlatformHostInterfaceBmcUsbNicLib.c --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112860): https://edk2.groups.io/g/devel/message/112860 Mute This Topic: https://groups.io/mt/103354120/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112861+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112861+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458776; cv=none; d=zohomail.com; s=zohoarc; b=LAnM4KlgxgBgA1ChyYUQi7J8uFunmkBjxtGm56ZeKE6IVRrhFXatgqNlXragD2sAG2eJdruJ37epy8ggb38Yd5w5S9U3rnQ4ZrfD5qrUdr9lA0PESaHjwQL2bIFEWB4Vy0Rq46ASitsUQNONGH/KbpjRt92+H4Bi4EgREDtdWGk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458776; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=0HbHQ5uuvDYWOxirjODt4/63uhPyXibF79x+LvUlPdQ=; b=Ky9Av0y+D0fAyNj3Hd1fg8uPpb87GZ7YMPcgDouViP6H+M4Cm0IQTvIYBt9dklOC7YLivWR+9V/62jgRyFn5BIvbN5vdSGYka0D4Mk88OESlN3m342/U6GwAkFzy6BHeHaZ2/yBuaTe3lVi9TjjbgMix77eKaysHmGthdpBXuqo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112861+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458776146705.1849489153881; Sun, 24 Dec 2023 14:59:36 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=qrM6MselxlsVwhyKlSqDEuQqBnk1SXHVBFjkRPSYsX8=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458775; v=1; b=izLG1DJTWoqdlGXrJAnB65C87YxeNxXeRDL4N4y1Sr2N4KFmAKiIDsx21D5PTNKCU3gcUC7g rYKk2593kzjQaGD/1aijWLR46wyy/O/jwOsd9Uco5qYe1qjSSAY6L4z77/wrobSOS3Gg8rlXwjO eMZTjWpDyQBIrLa3CLnGAPps= X-Received: by 127.0.0.2 with SMTP id y9AzYY1788612xBgw390aSE3; Sun, 24 Dec 2023 14:59:35 -0800 X-Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mx.groups.io with SMTP id smtpd.web10.35940.1703458774578962607 for ; Sun, 24 Dec 2023 14:59:34 -0800 X-Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-50e6a806e4aso1943964e87.1 for ; Sun, 24 Dec 2023 14:59:34 -0800 (PST) X-Gm-Message-State: 2PZfVeg2vhklRrSdMtgnNBR5x1787277AA= X-Google-Smtp-Source: AGHT+IHS4iohHcB2e3H/Pvdu43IyEJaehaX4OvpvVl/OfXCOG/gyo/A3boqEKTV0u6RUCu6OnfrSXg== X-Received: by 2002:a05:6512:3294:b0:50e:73a1:f513 with SMTP id p20-20020a056512329400b0050e73a1f513mr711726lfe.73.1703458772573; Sun, 24 Dec 2023 14:59:32 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:32 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 02/16] RedfishPkg: fix RedfishPlatformCredentialLib library class name typo. Date: Mon, 25 Dec 2023 01:59:13 +0300 Message-Id: <20231224225927.9119-3-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458776501100005 Content-Type: text/plain; charset="utf-8" RedfishPlatformCredentialIpmiLib is the library instance name not the class name. Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../RedfishPlatformCredentialIpmiLib.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPla= tformCredentialIpmiLib.inf b/RedfishPkg/Library/RedfishPlatformCredentialIp= miLib/RedfishPlatformCredentialIpmiLib.inf index 5c20ea22f894..935461e1dcd0 100644 --- a/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCr= edentialIpmiLib.inf +++ b/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCr= edentialIpmiLib.inf @@ -13,7 +13,7 @@ FILE_GUID =3D 9C45D622-4C66-417F-814C-F76246D97233 MODULE_TYPE =3D DXE_DRIVER VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D RedfishPlatformCredentialIpmiLib + LIBRARY_CLASS =3D RedfishPlatformCredentialLib =20 [Sources] RedfishPlatformCredentialIpmiLib.c --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112861): https://edk2.groups.io/g/devel/message/112861 Mute This Topic: https://groups.io/mt/103354121/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112862+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112862+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458776; cv=none; d=zohomail.com; s=zohoarc; b=GD+z3h3tHGs+UapwrY9h9rzr1MCPLaZ+VZJEp6D1+QK2gTHGLdmRrG/HgcscoAYhZcdi7hQrjJSaV6GDNV0pvMRMXa978RzhOvfpj+4mY05MG2J7zKYBoePsB9Ok/UL9aIEHosFsyaEVToFT4/c2we9cliTzm4cdSNRO911aL0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458776; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=m+Yr0fEiSzyvcXbsGlldgavTdRCplyn+txtVPaYsbG0=; b=G/ECrWDyHIrqvrI7inoybhGQlADNbUXtUdesdOYjloB6CFPTIplRwyz5K24oPNoGBcykmh8rifC0jdro2V+a+/T+gCQVz2OB+a5bkiPwveGppsimXSWAqan+ictAmme4Oi87wP8pmpsN4g3ukZjYqWSyAADHiEJlQcNKfa5AvsA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112862+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458776642751.3992105129724; Sun, 24 Dec 2023 14:59:36 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=82GHOn/nW3jNQBf5bWolGuVoCUjw3SKr38gLWNoNcDs=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458776; v=1; b=fbHpr+DguKHtKR0N85WlRk12ufTutqt5Zve/ApJGCzUZSefUWUQr410TGwtB9iy8Pjv5GMTh x90J83uZAdoKIhE1qd/21tzhIbyI41MIoJwkdvrNOVPg/VN3C9pjfh8xVUhsgsQRynyzh8QH+V3 3bIgYRCYKdceRg4axoQSgCuw= X-Received: by 127.0.0.2 with SMTP id rhpKYY1788612xlVBrYjS5fy; Sun, 24 Dec 2023 14:59:36 -0800 X-Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mx.groups.io with SMTP id smtpd.web10.35941.1703458775509170236 for ; Sun, 24 Dec 2023 14:59:35 -0800 X-Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-50e73b068beso1086119e87.1 for ; Sun, 24 Dec 2023 14:59:35 -0800 (PST) X-Gm-Message-State: h3e9Rq2kjee3yXlnVkpMH2mpx1787277AA= X-Google-Smtp-Source: AGHT+IEccULp+f69R68kXkgJX45nWDDT+pHf8BCVJ1C9TGARNyhW5dDkRY7gAYJI6Q2ZxrcDfQnD5g== X-Received: by 2002:ac2:548b:0:b0:50e:36bc:747a with SMTP id t11-20020ac2548b000000b0050e36bc747amr1871240lfk.128.1703458773503; Sun, 24 Dec 2023 14:59:33 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:32 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 03/16] RedfishPkg: get rid of unused definitions from RedfishCrtLib.h Date: Mon, 25 Dec 2023 01:59:14 +0300 Message-Id: <20231224225927.9119-4-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458778408100014 Content-Type: text/plain; charset="utf-8" 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 Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- RedfishPkg/Include/Library/RedfishCrtLib.h | 45 ++++++---------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/RedfishPkg/Include/Library/RedfishCrtLib.h b/RedfishPkg/Includ= e/Library/RedfishCrtLib.h index ac6c5162ad6a..0c51a03d0e1a 100644 --- a/RedfishPkg/Include/Library/RedfishCrtLib.h +++ b/RedfishPkg/Include/Library/RedfishCrtLib.h @@ -69,20 +69,17 @@ // // Basic types mapping // -typedef UINTN size_t; -typedef INTN ssize_t; -typedef INT32 time_t; -typedef UINT8 __uint8_t; -typedef UINT8 sa_family_t; -typedef UINT32 uid_t; -typedef UINT32 gid_t; -typedef INT32 int32_t; -typedef UINT32 uint32_t; -typedef UINT16 uint16_t; -typedef UINT8 uint8_t; -typedef enum { - false, true -} bool; +typedef UINTN size_t; +typedef INTN ssize_t; +typedef INT32 time_t; +typedef INT32 int32_t; +typedef UINT32 uint32_t; +typedef UINT16 uint16_t; +typedef UINT8 uint8_t; +typedef BOOLEAN bool; + +#define true (1 =3D=3D 1) +#define false (1 =3D=3D 0) =20 // // File operations are not required for EFI building, @@ -343,26 +340,6 @@ fgetc ( FILE *_File ); =20 -uid_t -getuid ( - void - ); - -uid_t -geteuid ( - void - ); - -gid_t -getgid ( - void - ); - -gid_t -getegid ( - void - ); - void qsort ( void *, --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112862): https://edk2.groups.io/g/devel/message/112862 Mute This Topic: https://groups.io/mt/103354122/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112863+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112863+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458777; cv=none; d=zohomail.com; s=zohoarc; b=dZWYmABNDfgM/Z2j/3QyAt1HgTNn67iIV020jRdr44h8yqj9N9KmmU5Fa3QtKyJEO6pi7cE0hR8fEJueCxUnkksKGiU3FEaG4zOxg85kTbvTb9WGbN1zk68fCXIsbqCS7ckX1+/t70Rpjf8+OLVfQUkO6emhf7KoREs4ZJmAI4g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458777; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=umDJhNaIE9mZE8rWKnT4//xVZgvX0dIJYmTzaQUIJuc=; b=ZmSQWtWcS+G75y2B0zSEueZ9qyyUVuhpNYUimJpIHEi1tCsL28QWLk1OlPJEHdxAiTAZyrrxdTaTTPJa3cCp86st2vzDYbOaD3pNFDvzQkKpnndoSoELR6QfRKjNPIDAanuU1KUmXvJnai4wgfgwqlQyxAoA/7sSU34rO+tVUTI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112863+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458777422477.92484902705974; Sun, 24 Dec 2023 14:59:37 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=usnDJ/xhT+/EOOUDahW1d1RnP/cSXS8cGofbNfOytJQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458777; v=1; b=lJAzsfiy+pL9TLFymahJTAyA6jXPz7h7driU+/SHmr5pfQYAeHhNYlqotwSMgtA02jlbGMdf tBEylnlokAJf6XTrnydTTMristwHPOUgrN2Rrkwf7UhkTvg9KumpSLcRK15EeSibSYGXNWmSvZb mBtgTDe3E+Ei+b0IkhWjhlps= X-Received: by 127.0.0.2 with SMTP id V3I4YY1788612xbQ7YjqNASD; Sun, 24 Dec 2023 14:59:37 -0800 X-Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mx.groups.io with SMTP id smtpd.web10.35942.1703458776129724345 for ; Sun, 24 Dec 2023 14:59:36 -0800 X-Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-50e68e93be1so2103138e87.0 for ; Sun, 24 Dec 2023 14:59:35 -0800 (PST) X-Gm-Message-State: q7uyMvoDar7J0nuzIbd5ZiLBx1787277AA= X-Google-Smtp-Source: AGHT+IHqUozZz2IXgxZIh5aV0Ol1qj0E9EANUeLk1AqDTD6MWjq4v1M2sNhOfcpPqRVSbtBWm0FL5w== X-Received: by 2002:a05:6512:208e:b0:50e:7b47:97d with SMTP id t14-20020a056512208e00b0050e7b47097dmr144592lfr.112.1703458774265; Sun, 24 Dec 2023 14:59:34 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:33 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 04/16] RedfishPkg: RedfishPlatformConfigDxe: reduce memory allocations Date: Mon, 25 Dec 2023 01:59:15 +0300 Message-Id: <20231224225927.9119-5-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458778392100013 Content-Type: text/plain; charset="utf-8" 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 Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c= b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c index cbc65ba59408..f970e317b3f6 100644 --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c @@ -2057,9 +2057,7 @@ RedfishPlatformConfigProtocolGetConfigureLang ( TmpString =3D HiiGetRedfishString (StatementRef->Statement->Parent= Form->ParentFormset->HiiHandle, FullSchema, StatementRef->Statement->Descri= ption); ASSERT (TmpString !=3D NULL); if (TmpString !=3D NULL) { - TmpConfigureLangList[Index] =3D AllocateCopyPool (StrSize (TmpSt= ring), TmpString); - ASSERT (TmpConfigureLangList[Index] !=3D NULL); - FreePool (TmpString); + TmpConfigureLangList[Index] =3D TmpString; ++Index; } } --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112863): https://edk2.groups.io/g/devel/message/112863 Mute This Topic: https://groups.io/mt/103354123/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112864+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112864+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458779; cv=none; d=zohomail.com; s=zohoarc; b=PxwpG8CFPqC1JCcr1FLylkWg904DdkDeKwMrX5sgRI4dVrTL/Q5RLAePIpdS/iSyEK6pORsm6NNeABCN6iaaLFdbRR4A45PWsnmxTQFspmaJUNuazrLIwsSo7r09yAQlsWH3JRrNdnO7+5PFHf1CXGGATjt/38+NT6gvdFygtlY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458779; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=3Ps6EOPEEr85F9zoKwohqjNHhYLjwRxJ0xAc+YNy96I=; b=cIWYg0RMBUML+zKlizwuXVeyky2og07SDw+Jw5KrD4nP0VZzcoeT2z99BEHTSnAQY/93qLkt+IIg7nFZPOpAZOvjJ7YZ8J+PJp+NMmklNiIOVa6zB48lK2Utf8f8/TrPOw9xkVRD2c4IGNei2pTI1K1IdkNrdIIzQDNYtvzZbCA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112864+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458779486654.2904010307367; Sun, 24 Dec 2023 14:59:39 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=f03gn8I47QaozYo/LnOnLowQ4+CdM4Lzh7WKkzXWd+M=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458779; v=1; b=e4ParS6gvi0Tv4omzMINcepRhWgznC7w3mJBx+no2enZlL1Bxdsg97bqjvrQiBxkE/u9xONq BDJwuq1+gpKZoktPTFQ7nY7PhwtUygyf8Al3Zes3icCG+GC5DC/k9u92aR06+pKTIAuzcSZnpq2 9guw77UO8w06kbcMOluvJ++8= X-Received: by 127.0.0.2 with SMTP id UYcKYY1788612xC9NAo7bhQv; Sun, 24 Dec 2023 14:59:39 -0800 X-Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mx.groups.io with SMTP id smtpd.web11.35797.1703458777129393265 for ; Sun, 24 Dec 2023 14:59:37 -0800 X-Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-50e7d6565b5so27510e87.0 for ; Sun, 24 Dec 2023 14:59:36 -0800 (PST) X-Gm-Message-State: kPKNlKoQh3eDdrvONy1ru2i3x1787277AA= X-Google-Smtp-Source: AGHT+IEeRo0cyEodqJw7iuZPqOZy1I8FVoN9I2TgTCxLNgkO4/MublI7QKSsE9gYSrUg9YIhJnkAMA== X-Received: by 2002:a05:6512:614:b0:50e:76ac:18a7 with SMTP id b20-20020a056512061400b0050e76ac18a7mr504888lfe.130.1703458775145; Sun, 24 Dec 2023 14:59:35 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:34 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 05/16] RedfishPkg: RedfishDiscoverDxe: fix memory leak on error path. Date: Mon, 25 Dec 2023 01:59:16 +0300 Message-Id: <20231224225927.9119-6-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458780424100021 Content-Type: text/plain; charset="utf-8" Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index 06d8d00da7fb..e344e06d8dcc 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -829,6 +829,10 @@ AddAndSignalNewRedfishService ( } while (TRUE); } =20 + if (Char16Uuid !=3D NULL) { + FreePool (Char16Uuid); + } + if (NewFound || InfoRefresh) { if (!InfoRefresh) { DiscoveredList =3D (EFI_REDFISH_DISCOVERED_INTERNAL_LIST *)AllocateZ= eroPool (sizeof (EFI_REDFISH_DISCOVERED_INTERNAL_LIST)); @@ -907,10 +911,6 @@ AddAndSignalNewRedfishService ( } } =20 - if (Char16Uuid !=3D NULL) { - FreePool ((VOID *)Char16Uuid); - } - Status =3D EFI_SUCCESS; if (NewFound || InfoRefresh) { // --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112864): https://edk2.groups.io/g/devel/message/112864 Mute This Topic: https://groups.io/mt/103354124/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112865+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112865+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458780; cv=none; d=zohomail.com; s=zohoarc; b=Y189GvCH0yczU7P3HgOC3UF+q9Oh28/MbzzKjQZKLdCNUnxCF6mpcRrGTHppHfT0PD3L7v2Bc83a3gt+0P9kldvNnjxnT8jhDRmRcFCWqqJN8f8mq6g3oB6IU7qHrT248pX0jj5eh6B9zwQkPTpxmcekMzvYhMIPq+pp1u7CDaU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458780; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=dcEvhSpvC5XX7AhRFYYLmV2ZFxjpGlDOa0ku2d6vi6M=; b=eIM/GI8IT8Zalhl76VsIwCQ1V55LbO7riThNO8eajX+syhpUigwxJPKs1M4vYEJDo0zbiSTocV9K35HAfCdyFX/fFGlHotGrSfiOkD9SbKdp2SNiC5Wd9jQn8rKppxhZCkJTi+x1VxfajRWhIvUoWb7ZKmpTfhzX+Pu/GBk76rU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112865+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458780344814.3774100019776; Sun, 24 Dec 2023 14:59:40 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=+XshUNVsp3zwzNiqf62EziE/txvhYLvXbK4dCOUqewY=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458780; v=1; b=IEnMmfG3JSW38x3RFrazvxfWwpMvP3p4eWbFXqT2AlDhNmYn8moTmpo2RDJ2Ks3UlWWm67uJ vaJV3D6pNJOQnsleogoN3cVpJzsTm7609ndoSY0JyTWWwFjSCJQRlbDWPEBjjZDQviZKuOJv+W2 celwWhP1ggGo4olyMjSMlYkQ= X-Received: by 127.0.0.2 with SMTP id H7zlYY1788612xxnvhdkGOT1; Sun, 24 Dec 2023 14:59:40 -0800 X-Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mx.groups.io with SMTP id smtpd.web11.35798.1703458777958794266 for ; Sun, 24 Dec 2023 14:59:38 -0800 X-Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-50e6ee8e911so1365336e87.1 for ; Sun, 24 Dec 2023 14:59:37 -0800 (PST) X-Gm-Message-State: R2xJ4OfI3RVQThk5yYTepjsZx1787277AA= X-Google-Smtp-Source: AGHT+IF9tev4aZm5PinMdEn4ZPklFc4puLf+DRo9NGJiSUC2YUeJf63sf3nEfHqSuC9bmVXkWUnZaw== X-Received: by 2002:a05:6512:2827:b0:50e:7569:de13 with SMTP id cf39-20020a056512282700b0050e7569de13mr605848lfb.31.1703458775979; Sun, 24 Dec 2023 14:59:35 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:35 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 06/16] RedfishPkg: add Component Name protocols to RedfishConfigHandler driver Date: Mon, 25 Dec 2023 01:59:17 +0300 Message-Id: <20231224225927.9119-7-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458782521100029 Content-Type: text/plain; charset="utf-8" Currently there is no description for RedfishConfigHandler driver. This leads to in the "DRIVER NAME" column of a `drivers` command for example. Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../RedfishConfigHandler/ComponentName.c | 218 ++++++++++++++++++ .../RedfishConfigHandlerDriver.c | 10 +- .../RedfishConfigHandlerDriver.h | 4 +- .../RedfishConfigHandlerDriver.inf | 1 + 4 files changed, 230 insertions(+), 3 deletions(-) create mode 100644 RedfishPkg/RedfishConfigHandler/ComponentName.c diff --git a/RedfishPkg/RedfishConfigHandler/ComponentName.c b/RedfishPkg/R= edfishConfigHandler/ComponentName.c new file mode 100644 index 000000000000..8e19fdb2cde5 --- /dev/null +++ b/RedfishPkg/RedfishConfigHandler/ComponentName.c @@ -0,0 +1,218 @@ +/** @file + Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PR= OTOCOL protocol + for EFI Refish Config Handler Protocol + + Copyright (c) 2023, Mike Maslenkin
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "RedfishConfigHandlerCommon.h" + +// +// EFI Component Name Functions +// + +/** + Retrieves a Unicode string that is the user-readable name of the EFI Dri= ver. + + @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL inst= ance. + @param[in] Language A pointer to a three-character ISO 639-2 language= identifier. + This is the language of the driver name that the = caller + is requesting, and it must match one of the langu= ages specified + in SupportedLanguages. The number of languages s= upported by a + driver is up to the driver writer. + @param[out] DriverName A pointer to the Unicode string to return. This = Unicode string + is the name of the driver specified by This in th= e language + specified by Language. + + @retval EFI_SUCCESS The Unicode string for the Driver specifie= d by This + and the language specified by Language was= returned + in DriverName. + @retval EFI_INVALID_PARAMETER Language is NULL. + @retval EFI_INVALID_PARAMETER DriverName is NULL. + @retval EFI_UNSUPPORTED The driver specified by This does not supp= ort the + language specified by Language. + +**/ +EFI_STATUS +EFIAPI +RedfishConfigHandlerComponentNameGetDriverName ( + IN EFI_COMPONENT_NAME_PROTOCOL *This, + IN CHAR8 *Language, + OUT CHAR16 **DriverName + ); + +/** + Retrieves a Unicode string that is the user readable name of the control= ler + that is being managed by an EFI Driver. + + @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCO= L instance. + @param[in] ControllerHandle The handle of a controller that the driver = specified by + This is managing. This handle specifies th= e controller + whose name is to be returned. + @param[in] ChildHandle The handle of the child controller to retri= eve the name + of. This is an optional parameter that may= be NULL. It + will be NULL for device drivers. It will a= lso be NULL + for a bus drivers that wish to retrieve the= name of the + bus controller. It will not be NULL for a = bus driver + that wishes to retrieve the name of a child= controller. + @param[in] Language A pointer to a three character ISO 639-2 la= nguage + identifier. This is the language of the co= ntroller name + that the caller is requesting, and it must = match one + of the languages specified in SupportedLang= uages. The + number of languages supported by a driver i= s up to the + driver writer. + @param[out] ControllerName A pointer to the Unicode string to return. = This Unicode + string is the name of the controller specif= ied by + ControllerHandle and ChildHandle in the lan= guage specified + by Language, from the point of view of the = driver specified + by This. + + @retval EFI_SUCCESS The Unicode string for the user-readable n= ame in the + language specified by Language for the dri= ver + specified by This was returned in DriverNa= me. + @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. + @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a va= lid EFI_HANDLE. + @retval EFI_INVALID_PARAMETER Language is NULL. + @retval EFI_INVALID_PARAMETER ControllerName is NULL. + @retval EFI_UNSUPPORTED The driver specified by This is not curren= tly managing + the controller specified by ControllerHand= le and + ChildHandle. + @retval EFI_UNSUPPORTED The driver specified by This does not supp= ort the + language specified by Language. + +**/ +EFI_STATUS +EFIAPI +RedfishConfigHandlerComponentNameGetControllerName ( + IN EFI_COMPONENT_NAME_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_HANDLE ChildHandle OPTIONAL, + IN CHAR8 *Language, + OUT CHAR16 **ControllerName + ); + +/// +/// Component Name Protocol instance +/// +GLOBAL_REMOVE_IF_UNREFERENCED +EFI_COMPONENT_NAME_PROTOCOL gRedfishConfigHandlerComponentName =3D { + RedfishConfigHandlerComponentNameGetDriverName, + RedfishConfigHandlerComponentNameGetControllerName, + "eng" +}; + +/// +/// Component Name 2 Protocol instance +/// +GLOBAL_REMOVE_IF_UNREFERENCED +EFI_COMPONENT_NAME2_PROTOCOL gRedfishConfigHandlerComponentName2 =3D { + (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)RedfishConfigHandlerComponentNameGe= tDriverName, + (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)RedfishConfigHandlerComponentNa= meGetControllerName, + "en" +}; + +/// +/// Table of driver names +/// +GLOBAL_REMOVE_IF_UNREFERENCED +EFI_UNICODE_STRING_TABLE mRedfishConfigHandlerDriverNameTable[] =3D { + { "eng;en", (CHAR16 *)L"Redfish Configuration UEFI Driver" }, + { NULL, NULL } +}; + +GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *gRedfishConfigHan= dlerControllerNameTable =3D NULL; + +/** + Retrieves a Unicode string that is the user-readable name of the EFI Dri= ver. + + @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL ins= tance. + @param[in] Language A pointer to a three-character ISO 639-2 languag= e identifier. + This is the language of the driver name that the= caller + is requesting, and it must match one of the lang= uages specified + in SupportedLanguages. The number of languages = supported by a + driver is up to the driver writer. + @param[out] DriverName A pointer to the Unicode string to return. This= Unicode string + is the name of the driver specified by This in t= he language + specified by Language. + + @retval EFI_SUCCESS The Unicode string for the Driver specifie= d by This + and the language specified by Language was= returned + in DriverName. + @retval EFI_INVALID_PARAMETER Language is NULL. + @retval EFI_INVALID_PARAMETER DriverName is NULL. + @retval EFI_UNSUPPORTED The driver specified by This does not supp= ort the + language specified by Language. + +**/ +EFI_STATUS +EFIAPI +RedfishConfigHandlerComponentNameGetDriverName ( + IN EFI_COMPONENT_NAME_PROTOCOL *This, + IN CHAR8 *Language, + OUT CHAR16 **DriverName + ) +{ + return LookupUnicodeString2 ( + Language, + This->SupportedLanguages, + mRedfishConfigHandlerDriverNameTable, + DriverName, + (BOOLEAN)(This =3D=3D &gRedfishConfigHandlerComponentName) + ); +} + +/** + Retrieves a Unicode string that is the user readable name of the control= ler + that is being managed by an EFI Driver. + + @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCO= L instance. + @param[in] ControllerHandle The handle of a controller that the driver = specified by + This is managing. This handle specifies th= e controller + whose name is to be returned. + @param[in] ChildHandle The handle of the child controller to retri= eve the name + of. This is an optional parameter that may= be NULL. It + will be NULL for device drivers. It will a= lso be NULL + for a bus drivers that wish to retrieve the= name of the + bus controller. It will not be NULL for a = bus driver + that wishes to retrieve the name of a child= controller. + @param[in] Language A pointer to a three character ISO 639-2 la= nguage + identifier. This is the language of the co= ntroller name + that the caller is requesting, and it must = match one + of the languages specified in SupportedLang= uages. The + number of languages supported by a driver i= s up to the + driver writer. + @param[out] ControllerName A pointer to the Unicode string to return. = This Unicode + string is the name of the controller specif= ied by + ControllerHandle and ChildHandle in the lan= guage specified + by Language, from the point of view of the = driver specified + by This. + + @retval EFI_SUCCESS The Unicode string for the user-readable n= ame in the + language specified by Language for the dri= ver + specified by This was returned in DriverNa= me. + @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. + @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a va= lid EFI_HANDLE. + @retval EFI_INVALID_PARAMETER Language is NULL. + @retval EFI_INVALID_PARAMETER ControllerName is NULL. + @retval EFI_UNSUPPORTED The driver specified by This is not curren= tly managing + the controller specified by ControllerHand= le and + ChildHandle. + @retval EFI_UNSUPPORTED The driver specified by This does not supp= ort the + language specified by Language. + +**/ +EFI_STATUS +EFIAPI +RedfishConfigHandlerComponentNameGetControllerName ( + IN EFI_COMPONENT_NAME_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_HANDLE ChildHandle OPTIONAL, + IN CHAR8 *Language, + OUT CHAR16 **ControllerName + ) +{ + return EFI_UNSUPPORTED; +} diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c b= /RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c index 2d0170d88614..5e03132695d6 100644 --- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c +++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c @@ -601,11 +601,17 @@ RedfishConfigHandlerDriverEntryPoint ( // // Install UEFI Driver Model protocol(s). // - Status =3D EfiLibInstallDriverBinding ( + Status =3D EfiLibInstallAllDriverProtocols2 ( ImageHandle, SystemTable, &gRedfishConfigDriverBinding, - ImageHandle + ImageHandle, + &gRedfishConfigHandlerComponentName, + &gRedfishConfigHandlerComponentName2, + NULL, + NULL, + NULL, + NULL ); if (EFI_ERROR (Status)) { gBS->CloseEvent (gEndOfDxeEvent); diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.h b= /RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.h index 07214875bd5a..51701c05c697 100644 --- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.h +++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.h @@ -24,7 +24,9 @@ // // Protocol instances // -extern EFI_DRIVER_BINDING_PROTOCOL gRedfishConfigDriverBinding; +extern EFI_DRIVER_BINDING_PROTOCOL gRedfishConfigDriverBinding; +extern EFI_COMPONENT_NAME_PROTOCOL gRedfishConfigHandlerComponentName; +extern EFI_COMPONENT_NAME2_PROTOCOL gRedfishConfigHandlerComponentName2; =20 extern REDFISH_CONFIG_DRIVER_DATA gRedfishConfigData; extern EDKII_REDFISH_CREDENTIAL_PROTOCOL *gCredential; diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf= b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf index aed93f570cf9..40ce0561379f 100644 --- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf +++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf @@ -30,6 +30,7 @@ RedfishPkg/RedfishPkg.dec =20 [Sources] + ComponentName.c RedfishConfigHandlerDriver.h RedfishConfigHandlerDriver.c RedfishConfigHandlerCommon.h --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112865): https://edk2.groups.io/g/devel/message/112865 Mute This Topic: https://groups.io/mt/103354125/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112866+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112866+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458781; cv=none; d=zohomail.com; s=zohoarc; b=cNU6ZQYyWsNsn+6PoLqHSzm5VFf8HcuJZez4sqkHUCFYvyNhhOq88psXicglPeFdrftYNELURjb4KnDcHeT6doyNIU2nGilZk6klUwCGE6FY8hY8F6hOyV+HEscn4zmhDLJTrxJ1hzyUD01PUBi06Em/PD7ZzyqOl6Fkhe5d5NY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458781; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=WgM/cFPCVkGgu3L6PwHk3KVU6cGs3tMZQhBCBmlQAsI=; b=AZSOqKLMKFBx/Nsb+fWFji7f6dL+tYt0+DZcA8rq/CkDysVtNigjwe06C2yOJLlqOemClJCdwlendzzxkNiktUtbflOncw2KCOWuPMSORFQIMdCZZ84mfzphi15X0ji2WWvebBEuL+Jho3ES+IwhI35+kXQ6CseAfo239H9qEnE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112866+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458781281800.8230058830515; Sun, 24 Dec 2023 14:59:41 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=ed8T3Fz4col5DtRF1C3FU1FUMwdr41iuVzDRHZWMET4=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458780; v=1; b=FQLRILUMSJYEqVKn9dpRALg0NkGv6rcyy32DOFaArbLK48+Ypq1aZelCWJqkY8u5+a9QMf6V Dp/3YrQACgJUNoMl5nlqMOQvR4yEe4W9yc3www8lOBGnSAL/aIlhG/lOhdBdXG4pKbv8vhf/pPx oTVl5RbYO49TJdGhNv/lTTE4= X-Received: by 127.0.0.2 with SMTP id 3bDpYY1788612xSkKZ57IE3Z; Sun, 24 Dec 2023 14:59:40 -0800 X-Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by mx.groups.io with SMTP id smtpd.web11.35799.1703458778724456916 for ; Sun, 24 Dec 2023 14:59:39 -0800 X-Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-50e788407f6so568576e87.1 for ; Sun, 24 Dec 2023 14:59:38 -0800 (PST) X-Gm-Message-State: JUmtmnq6NzwO34ASo3MpivBjx1787277AA= X-Google-Smtp-Source: AGHT+IHt8ctVVFRDlINnceohHEUhW7O9OMQ7YDUYbfubVmAHDwcOA2jVqcp6fqiwUy7dm1ONEdra1g== X-Received: by 2002:a05:6512:10d3:b0:50e:7b9c:4d83 with SMTP id k19-20020a05651210d300b0050e7b9c4d83mr249764lfg.14.1703458776883; Sun, 24 Dec 2023 14:59:36 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:36 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 07/16] RedfishPkg: add proper initialization of IPMI request Date: Mon, 25 Dec 2023 01:59:18 +0300 Message-Id: <20231224225927.9119-8-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458782501100027 Content-Type: text/plain; charset="utf-8" All fields of IPMI_CHANNEL_INFO_CHANNEL_NUMBER union must be initialized to avoid error condition on BMC side. Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../PlatformHostInterfaceBmcUsbNicLib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformH= ostInterfaceBmcUsbNicLib.c b/RedfishPkg/Library/PlatformHostInterfaceBmcUsb= NicLib/PlatformHostInterfaceBmcUsbNicLib.c index 7f295fe7f1c0..c73e76df5791 100644 --- a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInte= rfaceBmcUsbNicLib.c +++ b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInte= rfaceBmcUsbNicLib.c @@ -616,9 +616,10 @@ HostInterfaceIpmiCheckMacAddress ( } =20 // Initial the get MAC address request. - GetLanConfigReq.SetSelector =3D 0; - GetLanConfigReq.BlockSelector =3D 0; - GetLanConfigReq.ParameterSelector =3D IpmiLanMacAddress; + GetLanConfigReq.ChannelNumber.Uint8 =3D 0; + GetLanConfigReq.SetSelector =3D 0; + GetLanConfigReq.BlockSelector =3D 0; + GetLanConfigReq.ParameterSelector =3D IpmiLanMacAddress; =20 ExitStatus =3D EFI_NOT_FOUND; for (ChannelNum =3D IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_1; @@ -640,6 +641,7 @@ HostInterfaceIpmiCheckMacAddress ( } else { DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " No cached IPMI LAN info\n")= ); DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Send NetFn =3D App, Command= =3D 0x42 to channel %d\n", ChannelNum)); + GetChanelInfoRequest.ChannelNumber.Uint8 =3D 0; GetChanelInfoRequest.ChannelNumber.Bits.ChannelNo =3D (UINT8)Channel= Num; Status =3D IpmiGetChannel= Info ( &GetChanelInfo= Request, --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112866): https://edk2.groups.io/g/devel/message/112866 Mute This Topic: https://groups.io/mt/103354126/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112867+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112867+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458782; cv=none; d=zohomail.com; s=zohoarc; b=bCX2RnFxnJzxoCh/bNjWj8iXQMF90HQUSLeWQjG072EFdgYTrDOHPKbXTCnBo7vWhky1FW+WFAqNUH+voa1Hl33vRTWX9sjma3JF711ePKKo6tx2pj+ZPw/R/3+KPbAdwJzLTUK07V57NneDZELyvCjX7nSHQrEkvlETpuMd7Yo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458782; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=dGoRjJcjggwXx96seqND24b39NS5xa08/RdC6AWdGE0=; b=V7hw2RgwNb5lucqYCavPcSkLayi34768Ou8YW5bqTKuWwsU86f4mFbCUQYoyNPv3Gzhrhuv9lbRcckcT5zplUXEoLuLUba8IZlRj8qOQhiyfSdlNeGnQojw+3b4PO8s1IxEfASm4vgor6D2ybaWfjjeEC1ru5MukYpq7dx/UWvg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112867+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458782052410.9037413291088; Sun, 24 Dec 2023 14:59:42 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=reNznQR1WSdtWel7+lKkL26UOgwc9ahq8CIP3r+hc/0=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458781; v=1; b=GmogO4bFZISVPUPAXXiq3Cpgnzi16CS935x74s01BLmUEeamzuLOugVQMrLw/4gpJzGbYeSa 4m7ng3H/VINr4zMRsCaf3Zy+Z0iuBg34mBOptzlIg3hu01n6K1bvP01QL5/VeEl8pes/3aSj00v T9OY5BUlMpZZlByvSPvCyNms= X-Received: by 127.0.0.2 with SMTP id ApaSYY1788612xmgM7C2sm8j; Sun, 24 Dec 2023 14:59:41 -0800 X-Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by mx.groups.io with SMTP id smtpd.web10.35943.1703458779777522038 for ; Sun, 24 Dec 2023 14:59:40 -0800 X-Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-50e7be1c65dso110330e87.3 for ; Sun, 24 Dec 2023 14:59:39 -0800 (PST) X-Gm-Message-State: Olool2v13HcTf9r2eXT1YfWMx1787277AA= X-Google-Smtp-Source: AGHT+IHLGaV02d6aKPV07rbZW+o7jo+awiyZxB67BslwE4UCEHQYcb455F65/amwq6A2PgQeFm3mpw== X-Received: by 2002:a05:6512:3e0f:b0:50e:7846:7adc with SMTP id i15-20020a0565123e0f00b0050e78467adcmr276091lfv.73.1703458777650; Sun, 24 Dec 2023 14:59:37 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:37 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 08/16] EmulatorPkg: fix typo. PcdRedfishServie -> PcdRedfishService Date: Mon, 25 Dec 2023 01:59:19 +0300 Message-Id: <20231224225927.9119-9-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458782520100028 Content-Type: text/plain; charset="utf-8" Cc: Nickle Wang Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- EmulatorPkg/EmulatorPkg.dec | 8 ++++---- .../RedfishPlatformCredentialLib.c | 12 ++++++------ .../RedfishPlatformCredentialLib.inf | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/EmulatorPkg/EmulatorPkg.dec b/EmulatorPkg/EmulatorPkg.dec index fe81652b0478..c2a92923e9b7 100644 --- a/EmulatorPkg/EmulatorPkg.dec +++ b/EmulatorPkg/EmulatorPkg.dec @@ -77,15 +77,15 @@ ## Platform level Redfish Service control PCD # These PCDs are used to stop the Redfish sevice when secure boot is dis= abled # or exit boot service. - gEmulatorPkgTokenSpaceGuid.PcdRedfishServieStopIfSecureBootDisabled|TRUE= |BOOLEAN|0x00001020 - gEmulatorPkgTokenSpaceGuid.PcdRedfishServieStopIfExitbootService|TRUE|BO= OLEAN|0x00001021 + gEmulatorPkgTokenSpaceGuid.PcdRedfishServiceStopIfSecureBootDisabled|TRU= E|BOOLEAN|0x00001020 + gEmulatorPkgTokenSpaceGuid.PcdRedfishServiceStopIfExitbootService|TRUE|B= OOLEAN|0x00001021 ## # edk2 Redfish implementation on Emulator package is designed to access # to Redfish simulator. # https://github.com/DMTF/Redfish-Profile-Simulator # The user ID and password are fixed as below. - gEmulatorPkgTokenSpaceGuid.PcdRedfishServieUserId|"admin"|VOID*|0x000010= 22 - gEmulatorPkgTokenSpaceGuid.PcdRedfishServiePassword|"pwd123456"|VOID*|0x= 00001023 + gEmulatorPkgTokenSpaceGuid.PcdRedfishServiceUserId|"admin"|VOID*|0x00001= 022 + gEmulatorPkgTokenSpaceGuid.PcdRedfishServicePassword|"pwd123456"|VOID*|0= x00001023 gEmulatorPkgTokenSpaceGuid.PcdPersistentMemorySize|0x4000000|UINT32|0x00= 001024 =20 [PcdsFixedAtBuild, PcdsPatchableInModule] diff --git a/EmulatorPkg/Library/RedfishPlatformCredentialLib/RedfishPlatfo= rmCredentialLib.c b/EmulatorPkg/Library/RedfishPlatformCredentialLib/Redfis= hPlatformCredentialLib.c index 614eaebb0d0e..5c167fcdea56 100644 --- a/EmulatorPkg/Library/RedfishPlatformCredentialLib/RedfishPlatformCrede= ntialLib.c +++ b/EmulatorPkg/Library/RedfishPlatformCredentialLib/RedfishPlatformCrede= ntialLib.c @@ -57,8 +57,8 @@ GetRedfishCredential ( // // User ID and Password. // - UserIdSize =3D AsciiStrSize ((CHAR8 *)PcdGetPtr (PcdRedfishServieUserI= d)); - PasswordSize =3D AsciiStrSize ((CHAR8 *)PcdGetPtr (PcdRedfishServiePassw= ord)); + UserIdSize =3D AsciiStrSize ((CHAR8 *)PcdGetPtr (PcdRedfishServiceUser= Id)); + PasswordSize =3D AsciiStrSize ((CHAR8 *)PcdGetPtr (PcdRedfishServicePass= word)); if ((UserIdSize =3D=3D 0) || (PasswordSize =3D=3D 0)) { DEBUG ((DEBUG_ERROR, "Incorrect string of UserID or Password for REdfi= sh service.\n")); return EFI_INVALID_PARAMETER; @@ -69,7 +69,7 @@ GetRedfishCredential ( return EFI_OUT_OF_RESOURCES; } =20 - CopyMem (*UserId, (CHAR8 *)PcdGetPtr (PcdRedfishServieUserId), UserIdSiz= e); + CopyMem (*UserId, (CHAR8 *)PcdGetPtr (PcdRedfishServiceUserId), UserIdSi= ze); =20 *Password =3D AllocateZeroPool (PasswordSize); if (*Password =3D=3D NULL) { @@ -77,7 +77,7 @@ GetRedfishCredential ( return EFI_OUT_OF_RESOURCES; } =20 - CopyMem (*Password, (CHAR8 *)PcdGetPtr (PcdRedfishServiePassword), Passw= ordSize); + CopyMem (*Password, (CHAR8 *)PcdGetPtr (PcdRedfishServicePassword), Pass= wordSize); return EFI_SUCCESS; } =20 @@ -177,7 +177,7 @@ LibStopRedfishService ( // Check platform PCD to determine the action for stopping // Redfish service due to secure boot is disabled. // - if (!PcdGetBool (PcdRedfishServieStopIfSecureBootDisabled)) { + if (!PcdGetBool (PcdRedfishServiceStopIfSecureBootDisabled)) { return EFI_UNSUPPORTED; } else { // @@ -198,7 +198,7 @@ LibStopRedfishService ( // Check platform PCD to determine the action for stopping // Redfish service due to exit boot service. // - if (PcdGetBool (PcdRedfishServieStopIfExitbootService)) { + if (PcdGetBool (PcdRedfishServiceStopIfExitbootService)) { return EFI_UNSUPPORTED; } else { mStopRedfishService =3D TRUE; diff --git a/EmulatorPkg/Library/RedfishPlatformCredentialLib/RedfishPlatfo= rmCredentialLib.inf b/EmulatorPkg/Library/RedfishPlatformCredentialLib/Redf= ishPlatformCredentialLib.inf index 41c389c4a292..9d151f14ee17 100644 --- a/EmulatorPkg/Library/RedfishPlatformCredentialLib/RedfishPlatformCrede= ntialLib.inf +++ b/EmulatorPkg/Library/RedfishPlatformCredentialLib/RedfishPlatformCrede= ntialLib.inf @@ -36,10 +36,10 @@ UefiLib =20 [Pcd] - gEmulatorPkgTokenSpaceGuid.PcdRedfishServieStopIfSecureBootDisabled ## C= ONSUMES - gEmulatorPkgTokenSpaceGuid.PcdRedfishServieStopIfExitbootService ## C= ONSUMES - gEmulatorPkgTokenSpaceGuid.PcdRedfishServieUserId ## C= ONSUMES - gEmulatorPkgTokenSpaceGuid.PcdRedfishServiePassword ## C= ONSUMES + gEmulatorPkgTokenSpaceGuid.PcdRedfishServiceStopIfSecureBootDisabled ## = CONSUMES + gEmulatorPkgTokenSpaceGuid.PcdRedfishServiceStopIfExitbootService ## = CONSUMES + gEmulatorPkgTokenSpaceGuid.PcdRedfishServiceUserId ## = CONSUMES + gEmulatorPkgTokenSpaceGuid.PcdRedfishServicePassword ## = CONSUMES =20 [Guids] gEfiGlobalVariableGuid --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112867): https://edk2.groups.io/g/devel/message/112867 Mute This Topic: https://groups.io/mt/103354127/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112868+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112868+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458782; cv=none; d=zohomail.com; s=zohoarc; b=CveYOMU0/qqbVAga3K4ibQMGgF3nnC0ZVqQyf4E72bqyDkAK7y0/nkL/mukzTfAPwQ5ilxDoAZdPa7Jks4w+Qvz7c4S+T7+7y3qihrczTMv8jYbtAZFvoqdQlS7Ey/0K2L0rO5ffuf/YpmP0Pu5Py8VAXUSgi6vL/HZ2r/LF3ho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458782; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=yuPkfy57ELZ2QA+exduAs1gvdzQ08/cXkxQ+CvjdxMs=; b=bCwubqeuNHG2z1YqerD5Os5Pd6bJP/wghmkDGa4SjJY3MqNe+Vxch79GtuxkxFt6mdbrzt9YbNgXamxVu3I6WzEOSR+ek52lECRroopEgnaO58b6J4Vw0RLeK+61FGPi2K0cXp4JUHE91Myaz4N+kP2v6+6SmPXqM3KcGhpBmzU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112868+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458782852408.995716681687; Sun, 24 Dec 2023 14:59:42 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=qmuGLPwcMrCMfGDlFOJ7gVuBy9kckCVDdcMvDgwjy5M=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458782; v=1; b=HYbdPzJrgkaqiDgqxsRPWqz4Cmm6dxJPEpEbqqqYLqDOhMKkMnDVBSslC7s8qK18CqF6s2V7 /3m2ne1PTaH7kybG5FHXAJlfNndiOx+BRfAqHHmBUO2OvxsgAtaiymM+pfYbL6AyN4W1u1OnNG1 ZKzilor4IneV5zPhdXy8hHhE= X-Received: by 127.0.0.2 with SMTP id 4QIrYY1788612xx6zdRVK3t9; Sun, 24 Dec 2023 14:59:42 -0800 X-Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mx.groups.io with SMTP id smtpd.web11.35800.1703458780419016197 for ; Sun, 24 Dec 2023 14:59:40 -0800 X-Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-50e766937ddso801364e87.3 for ; Sun, 24 Dec 2023 14:59:40 -0800 (PST) X-Gm-Message-State: nzDsEi0lrDjtWTTFKOs00bfKx1787277AA= X-Google-Smtp-Source: AGHT+IHbCLhpodkqK91owCjw8Q9tgqBdADKAM6jOsGaKgetRGcxUuTeie0fShVmo5W/XKVIvif6mnA== X-Received: by 2002:a05:6512:3747:b0:50c:bd0:870f with SMTP id a7-20020a056512374700b0050c0bd0870fmr1619733lfs.73.1703458778579; Sun, 24 Dec 2023 14:59:38 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:38 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 09/16] EmulatorPkg: RedfishPlatformHostInterfaceLib: get rid of unused variable Date: Mon, 25 Dec 2023 01:59:20 +0300 Message-Id: <20231224225927.9119-10-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458784596100037 Content-Type: text/plain; charset="utf-8" Cc: Nickle Wang Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../RedfishPlatformHostInterfaceLib.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPla= tformHostInterfaceLib.c b/EmulatorPkg/Library/RedfishPlatformHostInterfaceL= ib/RedfishPlatformHostInterfaceLib.c index 4332caa71016..71b3dfc64358 100644 --- a/EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPlatformHo= stInterfaceLib.c +++ b/EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPlatformHo= stInterfaceLib.c @@ -42,12 +42,10 @@ GetMacAddressInformation ( OUT EFI_MAC_ADDRESS *MacAddress ) { - MAC_ADDR_DEVICE_PATH *Mac; REST_EX_SERVICE_DEVICE_PATH_DATA *RestExServiceDevicePathData; EFI_DEVICE_PATH_PROTOCOL *RestExServiceDevicePath; MAC_ADDR_DEVICE_PATH *MacAddressDevicePath; =20 - Mac =3D NULL; RestExServiceDevicePathData =3D NULL; RestExServiceDevicePath =3D NULL; =20 --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112868): https://edk2.groups.io/g/devel/message/112868 Mute This Topic: https://groups.io/mt/103354128/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112869+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112869+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458783; cv=none; d=zohomail.com; s=zohoarc; b=JHQz3GpUKVFT+6ssllBU6aztn7UNlOlQsTPcB1Hq9Ro4pVM6MDsEzRLqe+2o86mN8y4SqR8/vyTcR3+5ehBZu8TSLmgBoZgbp3cKhCJI2ggFsMIUWMrc9Aasg1aE9h0X6xutneu5OlrcuvViurChKrYfhqE7Xchbsd2RvC9lk9E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458783; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=ciysS2L0F2x+IctLCVtwwDPFruAQI+pZaCOrrc/gXvw=; b=YjAU2UNB7+/1rsK6bhjgUkCIPQZYHaQajZT5C9a0N1FeRt+hynsh0bPF1s2AMKlTCpi+iPEamzP7WsW+nuWmz5AAlC+kKnLzOy1ORUGGAFRuwQXLGGks7x+ZPG5QtgStvrbUVqByf2rqvVASI+M5/3yGIUiscnrwNPFTSFg6/1w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112869+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458783270359.1047673033838; Sun, 24 Dec 2023 14:59:43 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=QW+xVaKlpZbO/zfQC3CvSuKmNULiINP8iB77VZwzouA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458782; v=1; b=HcrKl9jyNVpHVZRE31jwpBof5xJckkwYQtjVD/gzhCxCG0FJgB8GyA4lcvTPaqpvg2DovfF5 giaDr93QTzM054PuzU8rEfiwaCpwQ2qcSVMdSSepBelLaHnKnJ8Q8k3Lh2FQumv3fl1/JVzlffm t/5MI7wpGmqKYsAQojFffwcg= X-Received: by 127.0.0.2 with SMTP id Ua5qYY1788612xq27OMcUZed; Sun, 24 Dec 2023 14:59:42 -0800 X-Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mx.groups.io with SMTP id smtpd.web10.35945.1703458781315449108 for ; Sun, 24 Dec 2023 14:59:41 -0800 X-Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-50e7abe4be4so297859e87.2 for ; Sun, 24 Dec 2023 14:59:41 -0800 (PST) X-Gm-Message-State: m9ltR8CL3Pu7pH3de53Ns6fex1787277AA= X-Google-Smtp-Source: AGHT+IEhztO5M6jhwHo+kTT0+ySSLO8ydM9z/FfNsaD6a+OZHS5bP4TKyp57VTTcdbc0R4nVpK29JA== X-Received: by 2002:ac2:46ef:0:b0:50e:59a4:86b6 with SMTP id q15-20020ac246ef000000b0050e59a486b6mr1804701lfo.44.1703458779384; Sun, 24 Dec 2023 14:59:39 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:39 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 10/16] RedfishDiscoverDxe: introduce InitInformationData helper function Date: Mon, 25 Dec 2023 01:59:21 +0300 Message-Id: <20231224225927.9119-11-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458784630100039 Content-Type: text/plain; charset="utf-8" Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../RedfishDiscoverDxe/RedfishDiscoverDxe.c | 108 ++++++++++++------ 1 file changed, 74 insertions(+), 34 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index e344e06d8dcc..7aa68b54a61b 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -6,6 +6,7 @@ Copyright (c) 2022, AMD Incorporated. All rights reserved. Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
+ Copyright (c) 2023, Mike Maslenkin
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -711,6 +712,69 @@ DiscoverRedfishHostInterface ( return Status; } =20 +/** + The function initializes particular strings into the structure instance. + + @param[in] Information EFI_REDFISH_DISCOVERED_INFORMATION + @param[in] RedfishVersion Redfish version. + @param[in] RedfishLocation Redfish location. + @param[in] Uuid Service UUID string. + @param[in] Os OS string. + @param[in] OsVer OS version string. + @param[in] Product Product string. + @param[in] ProductVer Product version string. + +**/ +STATIC +VOID +InitInformationData ( + IN EFI_REDFISH_DISCOVERED_INFORMATION *Information, + IN UINTN *RedfishVersion OPTIONAL, + IN CHAR8 *RedfishLocation OPTIONAL, + IN CHAR8 *Uuid OPTIONAL, + IN CHAR8 *Os OPTIONAL, + IN CHAR8 *OsVer OPTIONAL, + IN CHAR8 *Product OPTIONAL, + IN CHAR8 *ProductVer OPTIONAL + ) +{ + if (RedfishVersion !=3D NULL) { + Information->RedfishVersion =3D *RedfishVersion; + DEBUG ((DEBUG_MANAGEABILITY, "Redfish service version: %d.\n", Informa= tion->RedfishVersion)); + } + + if (RedfishLocation !=3D NULL) { + Information->Location =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CONST= CHAR8 *)RedfishLocation) * sizeof (CHAR16)); + AsciiStrToUnicodeStrS ((CONST CHAR8 *)RedfishLocation, Information->Lo= cation, AsciiStrSize ((CONST CHAR8 *)RedfishLocation) * sizeof (CHAR16)); + DEBUG ((DEBUG_MANAGEABILITY, "Redfish service location: %s.\n", Inform= ation->Location)); + } + + if (Uuid !=3D NULL) { + Information->Uuid =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CONST CHA= R8 *)Uuid) * sizeof (CHAR16)); + AsciiStrToUnicodeStrS ((CONST CHAR8 *)Uuid, Information->Uuid, AsciiSt= rSize ((CONST CHAR8 *)Uuid) * sizeof (CHAR16)); + DEBUG ((DEBUG_MANAGEABILITY, "Service UUID: %s.\n", Information->Uuid)= ); + } + + if (Os !=3D NULL) { + Information->Os =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CONST CHAR8= *)Os) * sizeof (CHAR16)); + AsciiStrToUnicodeStrS ((CONST CHAR8 *)Os, Information->Os, AsciiStrSiz= e ((CONST CHAR8 *)Os) * sizeof (CHAR16)); + DEBUG ((DEBUG_MANAGEABILITY, "Redfish service OS: %s, Version:%s.\n", = Information->Os, Information->OsVersion)); + } + + if (OsVer !=3D NULL) { + Information->OsVersion =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CONS= T CHAR8 *)OsVer) * sizeof (CHAR16)); + AsciiStrToUnicodeStrS ((CONST CHAR8 *)OsVer, Information->OsVersion, A= sciiStrSize ((CONST CHAR8 *)OsVer) * sizeof (CHAR16)); + } + + if ((Product !=3D NULL) && (ProductVer !=3D NULL)) { + Information->Product =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CONST = CHAR8 *)Product) * sizeof (CHAR16)); + AsciiStrToUnicodeStrS ((CONST CHAR8 *)Product, Information->Product, A= sciiStrSize ((CONST CHAR8 *)Product) * sizeof (CHAR16)); + Information->ProductVer =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CON= ST CHAR8 *)ProductVer) * sizeof (CHAR16)); + AsciiStrToUnicodeStrS ((CONST CHAR8 *)ProductVer, Information->Product= Ver, AsciiStrSize ((CONST CHAR8 *)ProductVer) * sizeof (CHAR16)); + DEBUG ((DEBUG_MANAGEABILITY, "Redfish service product: %s, Version:%s.= \n", Information->Product, Information->ProductVer)); + } +} + /** The function adds a new found Redfish service to internal list and notify client. @@ -851,41 +915,17 @@ AddAndSignalNewRedfishService ( DEBUG ((DEBUG_MANAGEABILITY, "*** Redfish Service Information ***\n")); =20 DiscoveredInstance->Information.UseHttps =3D UseHttps; - if (RedfishVersion !=3D NULL) { - DiscoveredInstance->Information.RedfishVersion =3D *RedfishVersion; - DEBUG ((DEBUG_MANAGEABILITY, "Redfish service version: %d.\n", Disco= veredInstance->Information.RedfishVersion)); - } =20 - if (RedfishLocation !=3D NULL) { - DiscoveredInstance->Information.Location =3D (CHAR16 *)AllocatePool = (AsciiStrSize ((const CHAR8 *)RedfishLocation) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((const CHAR8 *)RedfishLocation, DiscoveredIns= tance->Information.Location, AsciiStrSize ((const CHAR8 *)RedfishLocation) = * sizeof (CHAR16)); - DEBUG ((DEBUG_MANAGEABILITY, "Redfish service location: %s.\n", Disc= overedInstance->Information.Location)); - } - - if (Uuid !=3D NULL) { - DiscoveredInstance->Information.Uuid =3D (CHAR16 *)AllocatePool (Asc= iiStrSize ((const CHAR8 *)Uuid) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((const CHAR8 *)Uuid, DiscoveredInstance->Info= rmation.Uuid, AsciiStrSize ((const CHAR8 *)Uuid) * sizeof (CHAR16)); - DEBUG ((DEBUG_MANAGEABILITY, "Service UUID: %s.\n", DiscoveredInstan= ce->Information.Uuid)); - } - - if (Os !=3D NULL) { - DiscoveredInstance->Information.Os =3D (CHAR16 *)AllocatePool (Ascii= StrSize ((const CHAR8 *)Os) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((const CHAR8 *)Os, DiscoveredInstance->Inform= ation.Os, AsciiStrSize ((const CHAR8 *)Os) * sizeof (CHAR16)); - DEBUG ((DEBUG_MANAGEABILITY, "Redfish service OS: %s, Version:%s.\n"= , DiscoveredInstance->Information.Os, DiscoveredInstance->Information.OsVer= sion)); - } - - if (OsVer !=3D NULL) { - DiscoveredInstance->Information.OsVersion =3D (CHAR16 *)AllocatePool= (AsciiStrSize ((const CHAR8 *)OsVer) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((const CHAR8 *)OsVer, DiscoveredInstance->Inf= ormation.OsVersion, AsciiStrSize ((const CHAR8 *)OsVer) * sizeof (CHAR16)); - } - - if ((Product !=3D NULL) && (ProductVer !=3D NULL)) { - DiscoveredInstance->Information.Product =3D (CHAR16 *)AllocatePool (= AsciiStrSize ((const CHAR8 *)Product) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((const CHAR8 *)Product, DiscoveredInstance->I= nformation.Product, AsciiStrSize ((const CHAR8 *)Product) * sizeof (CHAR16)= ); - DiscoveredInstance->Information.ProductVer =3D (CHAR16 *)AllocatePoo= l (AsciiStrSize ((const CHAR8 *)ProductVer) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((const CHAR8 *)ProductVer, DiscoveredInstance= ->Information.ProductVer, AsciiStrSize ((const CHAR8 *)ProductVer) * sizeof= (CHAR16)); - DEBUG ((DEBUG_MANAGEABILITY, "Redfish service product: %s, Version:%= s.\n", DiscoveredInstance->Information.Product, DiscoveredInstance->Informa= tion.ProductVer)); - } + InitInformationData ( + &DiscoveredInstance->Information, + RedfishVersion, + RedfishLocation, + Uuid, + Os, + OsVer, + Product, + ProductVer + ); =20 if (RedfishLocation =3D=3D NULL) { // This is the Redfish reported from SMBIOS 42h --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112869): https://edk2.groups.io/g/devel/message/112869 Mute This Topic: https://groups.io/mt/103354129/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112870+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112870+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458784; cv=none; d=zohomail.com; s=zohoarc; b=L5KJ/YD1KmGlO1TARYcZDHx8O81kMVkzImUvR7YXNWR2/zZtTARAPqSfrAqa+UcbSadzzsntDzU76mXkM+NiaUxGr2qcSREhcRl/qdk/ywfJ4jULNYz8KerL/gqZ6iVNd0jZmVoV+3TaLVB6ohYz43Bh/gXlQ9F8fVdYhMGPjis= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458784; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=6lKpDdc1QsrLxCjVNshvmb0iKYS4PIExonKjyKs7B5I=; b=MkAIeMWgR9jbGVba47UkHmhJY4jYYQ2vTTXPJHRVGU6aRC/gKqUfKrDJ/L5qb9caTmkZYradl7F4oP8yRXFtuCICXwoApB8+iOBC+EB1/ugc9Aqd5by7ChzQ1/lu4zRycC2oSISO+bQ2uF3T/rFvhbNwHJqFXkKtBIkIF9TgvRc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112870+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458784051710.160499263575; Sun, 24 Dec 2023 14:59:44 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=F0XzXOiSE+T9gPit5Wi3obB/2ilihjK6FyGPdMVFi9w=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458783; v=1; b=Ump5KVw9LaaYXSayZU7Yfvw91DBPx0dGAeMnIwL9wKNXMvapkDRiHke1yoJE5fc4XO91NE0P b+kObwGFa41eB1mATe5Y6VzCyeDCqHOlH3tdVkPDDmkFGc5b0K2bJBirvqBUh8NP8zTq2ihsVNl zdTz7bCbPORY9fz80qxEpJF0= X-Received: by 127.0.0.2 with SMTP id U7UYYY1788612xBdF2atTT7Q; Sun, 24 Dec 2023 14:59:43 -0800 X-Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mx.groups.io with SMTP id smtpd.web10.35948.1703458782013216182 for ; Sun, 24 Dec 2023 14:59:42 -0800 X-Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-50e4e3323a6so4311284e87.0 for ; Sun, 24 Dec 2023 14:59:41 -0800 (PST) X-Gm-Message-State: pVFo0eNuxREqV9YTaGTOnkdzx1787277AA= X-Google-Smtp-Source: AGHT+IFpZjIhHPV116gmAY5+tXlKTkV1jgIvLV5aKKA6iANqMhBfdXlzQGynV1q4oDeiQ9AdGHl+6g== X-Received: by 2002:a19:4348:0:b0:50e:3879:8222 with SMTP id m8-20020a194348000000b0050e38798222mr2398758lfj.21.1703458780166; Sun, 24 Dec 2023 14:59:40 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:39 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin , Pedro Falcato Subject: [edk2-devel] [PATCH v3 11/16] RedfishDiscoverDxe: refine InitInformationData(), remove unnecessary casts Date: Mon, 25 Dec 2023 01:59:22 +0300 Message-Id: <20231224225927.9119-12-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458784616100038 Content-Type: text/plain; charset="utf-8" Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Pedro Falcato Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../RedfishDiscoverDxe/RedfishDiscoverDxe.c | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index 7aa68b54a61b..0ac41f09559b 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -730,12 +730,12 @@ VOID InitInformationData ( IN EFI_REDFISH_DISCOVERED_INFORMATION *Information, IN UINTN *RedfishVersion OPTIONAL, - IN CHAR8 *RedfishLocation OPTIONAL, - IN CHAR8 *Uuid OPTIONAL, - IN CHAR8 *Os OPTIONAL, - IN CHAR8 *OsVer OPTIONAL, - IN CHAR8 *Product OPTIONAL, - IN CHAR8 *ProductVer OPTIONAL + IN CONST CHAR8 *RedfishLocation OPTIONAL, + IN CONST CHAR8 *Uuid OPTIONAL, + IN CONST CHAR8 *Os OPTIONAL, + IN CONST CHAR8 *OsVer OPTIONAL, + IN CONST CHAR8 *Product OPTIONAL, + IN CONST CHAR8 *ProductVer OPTIONAL ) { if (RedfishVersion !=3D NULL) { @@ -744,33 +744,33 @@ InitInformationData ( } =20 if (RedfishLocation !=3D NULL) { - Information->Location =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CONST= CHAR8 *)RedfishLocation) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((CONST CHAR8 *)RedfishLocation, Information->Lo= cation, AsciiStrSize ((CONST CHAR8 *)RedfishLocation) * sizeof (CHAR16)); + Information->Location =3D AllocatePool (AsciiStrSize (RedfishLocation)= * sizeof (CHAR16)); + AsciiStrToUnicodeStrS (RedfishLocation, Information->Location, AsciiSt= rSize (RedfishLocation) * sizeof (CHAR16)); DEBUG ((DEBUG_MANAGEABILITY, "Redfish service location: %s.\n", Inform= ation->Location)); } =20 if (Uuid !=3D NULL) { - Information->Uuid =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CONST CHA= R8 *)Uuid) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((CONST CHAR8 *)Uuid, Information->Uuid, AsciiSt= rSize ((CONST CHAR8 *)Uuid) * sizeof (CHAR16)); + Information->Uuid =3D AllocatePool (AsciiStrSize (Uuid) * sizeof (CHAR= 16)); + AsciiStrToUnicodeStrS (Uuid, Information->Uuid, AsciiStrSize (Uuid) * = sizeof (CHAR16)); DEBUG ((DEBUG_MANAGEABILITY, "Service UUID: %s.\n", Information->Uuid)= ); } =20 if (Os !=3D NULL) { - Information->Os =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CONST CHAR8= *)Os) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((CONST CHAR8 *)Os, Information->Os, AsciiStrSiz= e ((CONST CHAR8 *)Os) * sizeof (CHAR16)); + Information->Os =3D AllocatePool (AsciiStrSize (Os) * sizeof (CHAR16)); + AsciiStrToUnicodeStrS (Os, Information->Os, AsciiStrSize (Os) * sizeof= (CHAR16)); DEBUG ((DEBUG_MANAGEABILITY, "Redfish service OS: %s, Version:%s.\n", = Information->Os, Information->OsVersion)); } =20 if (OsVer !=3D NULL) { - Information->OsVersion =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CONS= T CHAR8 *)OsVer) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((CONST CHAR8 *)OsVer, Information->OsVersion, A= sciiStrSize ((CONST CHAR8 *)OsVer) * sizeof (CHAR16)); + Information->OsVersion =3D AllocatePool (AsciiStrSize (OsVer) * sizeof= (CHAR16)); + AsciiStrToUnicodeStrS (OsVer, Information->OsVersion, AsciiStrSize (Os= Ver) * sizeof (CHAR16)); } =20 if ((Product !=3D NULL) && (ProductVer !=3D NULL)) { - Information->Product =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CONST = CHAR8 *)Product) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((CONST CHAR8 *)Product, Information->Product, A= sciiStrSize ((CONST CHAR8 *)Product) * sizeof (CHAR16)); - Information->ProductVer =3D (CHAR16 *)AllocatePool (AsciiStrSize ((CON= ST CHAR8 *)ProductVer) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS ((CONST CHAR8 *)ProductVer, Information->Product= Ver, AsciiStrSize ((CONST CHAR8 *)ProductVer) * sizeof (CHAR16)); + Information->Product =3D AllocatePool (AsciiStrSize (Product) * sizeof= (CHAR16)); + AsciiStrToUnicodeStrS (Product, Information->Product, AsciiStrSize (Pr= oduct) * sizeof (CHAR16)); + Information->ProductVer =3D AllocatePool (AsciiStrSize (ProductVer) * = sizeof (CHAR16)); + AsciiStrToUnicodeStrS (ProductVer, Information->ProductVer, AsciiStrSi= ze (ProductVer) * sizeof (CHAR16)); DEBUG ((DEBUG_MANAGEABILITY, "Redfish service product: %s, Version:%s.= \n", Information->Product, Information->ProductVer)); } } --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112870): https://edk2.groups.io/g/devel/message/112870 Mute This Topic: https://groups.io/mt/103354130/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112871+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112871+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458784; cv=none; d=zohomail.com; s=zohoarc; b=fPO+v92cY04zc+xpGX1XIthasX6ejb1T+Oyehf1xxlPtKc0DpXWXM8rad2lkZiWWf2uSNQFO3mFVOrrgbvdZr9h+/c/3jidW5ghpVInJGbXsFD2yIc2Z0pjbzhxeCdeYz8q2lvv7Cadq/6PLimdIgvyXLDLNcW1jsLkwnVZT9/8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458784; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=JPYLTDBlKTWXN7+L5JGBORVG3+xOhrAr7b7edPMR4jE=; b=Eb4qfit7LeC1kmVjbOBbMhwjS/XDDam797tn1NGAx4QcjiHnmJ4xE8i9ZIezV/cQaTlsXyQoSIoEI/bsZnwMwhjCl9KrBCR5deuKzX0G3/bywvPKqlle8ec52zmXHj+TiAz4DncO5+WJijLE4U976hqqkK5BEXp/R6yH/Kcd5+U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112871+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458784915133.68717146551046; Sun, 24 Dec 2023 14:59:44 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=kmhXpP3YFih8cqmmS7WDK+sm08ltDdxitRdum9zmKJs=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458784; v=1; b=ub6PUxJkp4XVNvBz6JqVb4+pVuyuN0bDTRfGdHqUAJpCaffCkKlLq8st0eFQEYfB9hLft1d0 6/y7cpO34L9EFH+uHcH09J2uKMatM/ZJc8zK+AoGGtyB9AK5m76TJ9J8M96mGZVLv6/+50WkN1j lsMDTtz2NEs04zhu1bUY0SYw= X-Received: by 127.0.0.2 with SMTP id QuHzYY1788612xQgrEA4jx4I; Sun, 24 Dec 2023 14:59:44 -0800 X-Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mx.groups.io with SMTP id smtpd.web11.35802.1703458782931361092 for ; Sun, 24 Dec 2023 14:59:43 -0800 X-Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-50e7c6e3c63so67165e87.3 for ; Sun, 24 Dec 2023 14:59:42 -0800 (PST) X-Gm-Message-State: ZFzNpp8BAKbqdj5Ort0DgaK1x1787277AA= X-Google-Smtp-Source: AGHT+IHbYDHSRyb80mVrAOCjZd3/O/ecNluGdfPl1OO60ArD1TuafFlIeks7SU6TPZj7mL++rTkzJw== X-Received: by 2002:a19:750c:0:b0:50e:7c70:fbe9 with SMTP id y12-20020a19750c000000b0050e7c70fbe9mr19707lfe.150.1703458781076; Sun, 24 Dec 2023 14:59:41 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:40 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 12/16] RedfishDiscoverDxe: refine InitInformationData() function Date: Mon, 25 Dec 2023 01:59:23 +0300 Message-Id: <20231224225927.9119-13-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458786602100050 Content-Type: text/plain; charset="utf-8" Cache size of ASCII string in local variable. Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../RedfishDiscoverDxe/RedfishDiscoverDxe.c | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index 0ac41f09559b..76f87e4fe5e7 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -738,39 +738,47 @@ InitInformationData ( IN CONST CHAR8 *ProductVer OPTIONAL ) { + UINTN AllocationSize; + if (RedfishVersion !=3D NULL) { Information->RedfishVersion =3D *RedfishVersion; DEBUG ((DEBUG_MANAGEABILITY, "Redfish service version: %d.\n", Informa= tion->RedfishVersion)); } =20 if (RedfishLocation !=3D NULL) { - Information->Location =3D AllocatePool (AsciiStrSize (RedfishLocation)= * sizeof (CHAR16)); - AsciiStrToUnicodeStrS (RedfishLocation, Information->Location, AsciiSt= rSize (RedfishLocation) * sizeof (CHAR16)); + AllocationSize =3D AsciiStrSize (RedfishLocation) * sizeof (CHA= R16); + Information->Location =3D AllocatePool (AllocationSize); + AsciiStrToUnicodeStrS (RedfishLocation, Information->Location, Allocat= ionSize); DEBUG ((DEBUG_MANAGEABILITY, "Redfish service location: %s.\n", Inform= ation->Location)); } =20 if (Uuid !=3D NULL) { - Information->Uuid =3D AllocatePool (AsciiStrSize (Uuid) * sizeof (CHAR= 16)); - AsciiStrToUnicodeStrS (Uuid, Information->Uuid, AsciiStrSize (Uuid) * = sizeof (CHAR16)); + AllocationSize =3D AsciiStrSize (Uuid) * sizeof (CHAR16); + Information->Uuid =3D AllocatePool (AllocationSize); + AsciiStrToUnicodeStrS (Uuid, Information->Uuid, AllocationSize); DEBUG ((DEBUG_MANAGEABILITY, "Service UUID: %s.\n", Information->Uuid)= ); } =20 if (Os !=3D NULL) { - Information->Os =3D AllocatePool (AsciiStrSize (Os) * sizeof (CHAR16)); - AsciiStrToUnicodeStrS (Os, Information->Os, AsciiStrSize (Os) * sizeof= (CHAR16)); - DEBUG ((DEBUG_MANAGEABILITY, "Redfish service OS: %s, Version:%s.\n", = Information->Os, Information->OsVersion)); + AllocationSize =3D AsciiStrSize (Os) * sizeof (CHAR16); + Information->Os =3D AllocatePool (AllocationSize); + AsciiStrToUnicodeStrS (Os, Information->Os, AllocationSize); } =20 if (OsVer !=3D NULL) { - Information->OsVersion =3D AllocatePool (AsciiStrSize (OsVer) * sizeof= (CHAR16)); - AsciiStrToUnicodeStrS (OsVer, Information->OsVersion, AsciiStrSize (Os= Ver) * sizeof (CHAR16)); + AllocationSize =3D AsciiStrSize (OsVer) * sizeof (CHAR16); + Information->OsVersion =3D AllocatePool (AllocationSize); + AsciiStrToUnicodeStrS (OsVer, Information->OsVersion, AllocationSize); + DEBUG ((DEBUG_MANAGEABILITY, "Redfish service OS: %s, Version:%s.\n", = Information->Os, Information->OsVersion)); } =20 if ((Product !=3D NULL) && (ProductVer !=3D NULL)) { - Information->Product =3D AllocatePool (AsciiStrSize (Product) * sizeof= (CHAR16)); - AsciiStrToUnicodeStrS (Product, Information->Product, AsciiStrSize (Pr= oduct) * sizeof (CHAR16)); - Information->ProductVer =3D AllocatePool (AsciiStrSize (ProductVer) * = sizeof (CHAR16)); - AsciiStrToUnicodeStrS (ProductVer, Information->ProductVer, AsciiStrSi= ze (ProductVer) * sizeof (CHAR16)); + AllocationSize =3D AsciiStrSize (Product) * sizeof (CHAR16); + Information->Product =3D AllocatePool (AllocationSize); + AsciiStrToUnicodeStrS (Product, Information->Product, AllocationSize); + AllocationSize =3D AsciiStrSize (ProductVer) * sizeof (CHAR16= ); + Information->ProductVer =3D AllocatePool (AllocationSize); + AsciiStrToUnicodeStrS (ProductVer, Information->ProductVer, Allocation= Size); DEBUG ((DEBUG_MANAGEABILITY, "Redfish service product: %s, Version:%s.= \n", Information->Product, Information->ProductVer)); } } --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112871): https://edk2.groups.io/g/devel/message/112871 Mute This Topic: https://groups.io/mt/103354131/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112872+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112872+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458785; cv=none; d=zohomail.com; s=zohoarc; b=PEvgX+xU1cUZ/PwGtfNdL71TsYDo6ESWppWlO0Why/CE4UBBVJyx5zglUQ6WCIU9/rAAKg/D7LOOvxYBmyiyLjJ1jF20o45VEQOxgtj1TgbvGWCI/mRCz9CibFwtR1bzYVkk3VZnvBtIRh+Ki+YLQHFa6pfbKtYQUGxUZZO1NSk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458785; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=i6pq2En6wRyItv5PxN2AiOfdyEfnh0EOo4E4wP22e5E=; b=aD0e62/0hJToPAahvoJxzpPiWCRF2Ey+HH6QUt7G8yjCz4iHm6vfaPIXaD1J2P4lVtAMvBLERVFoH85bMZ7X6Wb+fxIE98IRBvurMRnx/yuCW8hNmEIkI/A+H507Svo95CRml+KTrJzbISGeCbNu6OubqzZoi0a2ADSSsEcAHdY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112872+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458785736215.6706201453551; Sun, 24 Dec 2023 14:59:45 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=bjNGN+Wu3pbVQh2FWJ7fq9XEqzIAVC9MC8YYopnsocQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458785; v=1; b=pFhCiIE3OLHoAJzPW9OLUWXKqCKnxk0UN/V+yTJdomqnQUJtwyK4nFCw+djaMTADTJQnkAiZ 1f06sEAZI9Iw2gUZiKBzXOis5XLKVL1Y/Zec3PocS5i1UgHV/x0ysu5lmEpO76UMUY+Un+YeRMX MoVrQQgxFWGzFQ/6yK7uBwZg= X-Received: by 127.0.0.2 with SMTP id EVBAYY1788612xtkHpqtu5PG; Sun, 24 Dec 2023 14:59:45 -0800 X-Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mx.groups.io with SMTP id smtpd.web10.35949.1703458783678865758 for ; Sun, 24 Dec 2023 14:59:44 -0800 X-Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-50e6ee8e911so1365361e87.1 for ; Sun, 24 Dec 2023 14:59:43 -0800 (PST) X-Gm-Message-State: mjO1leAZ3LVRmjuT8n68CgzHx1787277AA= X-Google-Smtp-Source: AGHT+IFexs8VN/tyiwHbflLTffwtgdWctMsqzbv4gxlpKOE8k0fn0uBq4ptwS6f43WbGR2xOV5UgmQ== X-Received: by 2002:a19:c20f:0:b0:50e:6332:7025 with SMTP id l15-20020a19c20f000000b0050e63327025mr1635067lfc.89.1703458781856; Sun, 24 Dec 2023 14:59:41 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:41 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 13/16] RedfishDiscoverDxe: add a helper function deallocating string resources. Date: Mon, 25 Dec 2023 01:59:24 +0300 Message-Id: <20231224225927.9119-14-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458786598100049 Content-Type: text/plain; charset="utf-8" This patch adds a handy helper function deallocating resources from the EFI_REDFISH_DISCOVERED_INFORMATION structure instance. Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../RedfishDiscoverDxe/RedfishDiscoverDxe.c | 68 ++++++++++++------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index 76f87e4fe5e7..ff0c3ff1d1f5 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -712,6 +712,49 @@ DiscoverRedfishHostInterface ( return Status; } =20 +/** + The function releases particular strings into the structure instance. + + @param[in] Information EFI_REDFISH_DISCOVERED_INFORMATION + +**/ +STATIC +VOID +FreeInformationData ( + IN EFI_REDFISH_DISCOVERED_INFORMATION *Information + ) +{ + if (Information->Location !=3D NULL) { + FreePool (Information->Location); + Information->Location =3D NULL; + } + + if (Information->Uuid !=3D NULL) { + FreePool (Information->Uuid); + Information->Uuid =3D NULL; + } + + if (Information->Os !=3D NULL) { + FreePool (Information->Os); + Information->Os =3D NULL; + } + + if (Information->OsVersion !=3D NULL) { + FreePool (Information->OsVersion); + Information->OsVersion =3D NULL; + } + + if (Information->Product !=3D NULL) { + FreePool (Information->Product); + Information->Product =3D NULL; + } + + if (Information->ProductVer !=3D NULL) { + FreePool (Information->ProductVer); + Information->ProductVer =3D NULL; + } +} + /** The function initializes particular strings into the structure instance. =20 @@ -1514,30 +1557,7 @@ RedfishServiceReleaseService ( do { if (DiscoveredRedfishInstance->Instance =3D=3D ThisRedfishInstance) { RemoveEntryList (&DiscoveredRedfishInstance->NextInstance); - if (ThisRedfishInstance->Information.Location !=3D NULL) { - FreePool (ThisRedfishInstance->Information.Location); - } - - if (ThisRedfishInstance->Information.Uuid !=3D NULL) { - FreePool (ThisRedfishInstance->Information.Uuid); - } - - if (ThisRedfishInstance->Information.Os !=3D NULL) { - FreePool (ThisRedfishInstance->Information.Os); - } - - if (ThisRedfishInstance->Information.OsVersion !=3D NULL) { - FreePool (ThisRedfishInstance->Information.OsVersion); - } - - if (ThisRedfishInstance->Information.Product !=3D NULL) { - FreePool (ThisRedfishInstance->Information.Product); - } - - if (ThisRedfishInstance->Information.ProductVer !=3D NULL) { - FreePool (ThisRedfishInstance->Information.ProductVer); - } - + FreeInformationData (&ThisRedfishInstance->Information); FreePool ((VOID *)ThisRedfishInstance); goto ReleaseNext; } --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112872): https://edk2.groups.io/g/devel/message/112872 Mute This Topic: https://groups.io/mt/103354132/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112873+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112873+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458786; cv=none; d=zohomail.com; s=zohoarc; b=Z6MRhUuMEBnIS27oTTbrdiwGB8K0PlToMJgeH+cfYSSn35O8GEoV8hS+QiWPm1+0ItePtCYtEaycmV2rFgpydtEA96S36c5FhdSlykjPre9Mq1NsLuiOsnEocmSZAUZNwr3ZAw2t89WkloAovmuJcZLGU8K5th0GLwXPVJawFlo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458786; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=yuVNpy8Whfu7apVFODd+mcrS6YSVcfVVL2KfONJY/D4=; b=C+tSfChrwNnlmTADc0p0QLFkooBB8zua6pPpJp0r0S4LzgLkjqpCKAj4uXLuWXmNDMvLIf1VSVwmmJQFYHUFs7KrUTFaDCoy3Q7P+wqqcdfUnD9l/FBAY2qOWvOD/jBJ3FOfJ4UMrL5wuNOCX/ELYFLZY5wCFK+AMvYTlLvPSmc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112873+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458786902626.808633040792; Sun, 24 Dec 2023 14:59:46 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=MN09tddTNj/LNMvSK7XhoAAWFJlaM3J0fQWxTJHar3M=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458786; v=1; b=FIYU7U0rASsNfiuqu31WH4G0uOQZashrcAqxBvvs6yOUdoU8GTH83DQ5p3PUYgY99xWgsPO3 yspBlJgjBCvRhGjdKCQ+qfHj561i6Qhwe//5gRsqp7rNiLTStSAMF59mVWz6tPywZY+Z9COpTsp 5Ws7JEUVkUVEBk5A5eNkkUi0= X-Received: by 127.0.0.2 with SMTP id VcqlYY1788612x3p2IZgzx43; Sun, 24 Dec 2023 14:59:46 -0800 X-Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mx.groups.io with SMTP id smtpd.web11.35804.1703458784473903329 for ; Sun, 24 Dec 2023 14:59:44 -0800 X-Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-50e7c6f0487so90814e87.3 for ; Sun, 24 Dec 2023 14:59:44 -0800 (PST) X-Gm-Message-State: bz1NIOLjKL4crhOJ0H9Rgo3ox1787277AA= X-Google-Smtp-Source: AGHT+IHVxYGERdMoCwcZH1t/84HFH/TeaAixVvJtCdIvOU7RTI9XsWG+MhnOFQ8rKnRdnzgJJhVOYg== X-Received: by 2002:a19:5203:0:b0:50e:7401:da63 with SMTP id m3-20020a195203000000b0050e7401da63mr350925lfb.64.1703458782634; Sun, 24 Dec 2023 14:59:42 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:42 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 14/16] RedfishDiscoverDxe: release resources when refreshing information data Date: Mon, 25 Dec 2023 01:59:25 +0300 Message-Id: <20231224225927.9119-15-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458788864100057 Content-Type: text/plain; charset="utf-8" It is required to free previously allocated strings stored in DiscoveredInstance->Information structure. Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index ff0c3ff1d1f5..bbd1f4b86400 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -961,6 +961,8 @@ AddAndSignalNewRedfishService ( FreePool ((VOID *)DiscoveredList); return EFI_OUT_OF_RESOURCES; } + } else { + FreeInformationData (&DiscoveredInstance->Information); } =20 DEBUG ((DEBUG_MANAGEABILITY, "*** Redfish Service Information ***\n")); --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112873): https://edk2.groups.io/g/devel/message/112873 Mute This Topic: https://groups.io/mt/103354133/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112874+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112874+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458787; cv=none; d=zohomail.com; s=zohoarc; b=hpOrFCfUynBP1Q923Um+cv89MUDHIq8/m0MVA6YQC3SPFGpXXhUDtWCCgYKcLWZqTbVHIfe5I7NGL2zWeAnPrC84SgsodcGkPNE7A0c6CmJp0gIH+IMJMzM+7PsqezWWWQBNp7tDXCdyhDlC+QmPcjocBxB5vVXzNl+XPpB4W90= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458787; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=y5BkAWqp+wxo59tjEKTRnGH3QYX2I25+d9Qx/tkCewM=; b=WVoz/8QZe8TdJ365Gn8kfv/L7zjnYDNdPoDqcY5xfI/WKR1BN6Qo/8+ovO4ekksq9cT914vNW64dtnG9pINZI9VwjXT8jYZ8TA3wgMpaaf3zP/VG9Uw1k8/rQgYSDC/AYcfvBH01U89/EfrjJQt8t2R48KPa4LDfqvyTfED7rxA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112874+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458787264184.80764633227864; Sun, 24 Dec 2023 14:59:47 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=uyLDn/tEGGc4V/WSH+yXdz/2S6vu0gy1RlYhmt1XUSM=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458786; v=1; b=AahkpzX+Quh1mijhYm/Av6LVFVt55eur5EKkALJ6nGyzR60glEo5/7kRvqW/tHI2NUxNrCqt R9bbPs4Vfc1463VXMBJ+GNTc/l9PWdB1g6kkG4RCGP6YgvYRAmwpSqKKSeeWSe98yvP6E7qV5eB TF5Lpiu1GkKi9TUS+YFnX3cI= X-Received: by 127.0.0.2 with SMTP id EpwEYY1788612xpAkCfJiOqL; Sun, 24 Dec 2023 14:59:46 -0800 X-Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by mx.groups.io with SMTP id smtpd.web10.35950.1703458785240365454 for ; Sun, 24 Dec 2023 14:59:45 -0800 X-Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-50e6ee5b7ffso1593865e87.3 for ; Sun, 24 Dec 2023 14:59:44 -0800 (PST) X-Gm-Message-State: O8EvDL0zAJNXFXircqePtcmlx1787277AA= X-Google-Smtp-Source: AGHT+IErWE6XMM23XUoGRJTBsJw1x3UNktwCT0vrFv35T1biSqBdRUU8Ey0eE4YddaDPbEzBHhrXOA== X-Received: by 2002:ac2:57c5:0:b0:50e:7d19:1474 with SMTP id k5-20020ac257c5000000b0050e7d191474mr51369lfo.36.1703458783402; Sun, 24 Dec 2023 14:59:43 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:43 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 15/16] RedfishDiscoverDxe: handle memory allocation error conditions. Date: Mon, 25 Dec 2023 01:59:26 +0300 Message-Id: <20231224225927.9119-16-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458788882100059 Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4625 Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../RedfishDiscoverDxe/RedfishDiscoverDxe.c | 89 ++++++++++++++++--- 1 file changed, 78 insertions(+), 11 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index bbd1f4b86400..1022ab090df8 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -791,38 +791,105 @@ InitInformationData ( if (RedfishLocation !=3D NULL) { AllocationSize =3D AsciiStrSize (RedfishLocation) * sizeof (CHA= R16); Information->Location =3D AllocatePool (AllocationSize); - AsciiStrToUnicodeStrS (RedfishLocation, Information->Location, Allocat= ionSize); - DEBUG ((DEBUG_MANAGEABILITY, "Redfish service location: %s.\n", Inform= ation->Location)); + if (Information->Location !=3D NULL) { + AsciiStrToUnicodeStrS (RedfishLocation, Information->Location, Alloc= ationSize); + DEBUG ((DEBUG_MANAGEABILITY, "Redfish service location: %s.\n", Info= rmation->Location)); + } else { + DEBUG (( + DEBUG_ERROR, + "%a: Can not allocate memory for Redfish service location: %a.\n", + __func__, + RedfishLocation + )); + } } =20 if (Uuid !=3D NULL) { AllocationSize =3D AsciiStrSize (Uuid) * sizeof (CHAR16); Information->Uuid =3D AllocatePool (AllocationSize); - AsciiStrToUnicodeStrS (Uuid, Information->Uuid, AllocationSize); - DEBUG ((DEBUG_MANAGEABILITY, "Service UUID: %s.\n", Information->Uuid)= ); + if (Information->Uuid !=3D NULL) { + AsciiStrToUnicodeStrS (Uuid, Information->Uuid, AllocationSize); + DEBUG ((DEBUG_MANAGEABILITY, "Service UUID: %s.\n", Information->Uui= d)); + } else { + DEBUG (( + DEBUG_ERROR, + "%a: Can not allocate memory for Service UUID: %a.\n", + __func__, + Uuid + )); + } } =20 if (Os !=3D NULL) { AllocationSize =3D AsciiStrSize (Os) * sizeof (CHAR16); Information->Os =3D AllocatePool (AllocationSize); - AsciiStrToUnicodeStrS (Os, Information->Os, AllocationSize); + if (Information->Os !=3D NULL) { + AsciiStrToUnicodeStrS (Os, Information->Os, AllocationSize); + } else { + DEBUG (( + DEBUG_ERROR, + "%a: Can not allocate memory for Redfish service OS: %a.\n", + __func__, + Os + )); + } } =20 if (OsVer !=3D NULL) { AllocationSize =3D AsciiStrSize (OsVer) * sizeof (CHAR16); Information->OsVersion =3D AllocatePool (AllocationSize); - AsciiStrToUnicodeStrS (OsVer, Information->OsVersion, AllocationSize); - DEBUG ((DEBUG_MANAGEABILITY, "Redfish service OS: %s, Version:%s.\n", = Information->Os, Information->OsVersion)); + if (Information->OsVersion !=3D NULL) { + AsciiStrToUnicodeStrS (OsVer, Information->OsVersion, AllocationSize= ); + DEBUG (( + DEBUG_MANAGEABILITY, + "Redfish service OS: %s, Version:%s.\n", + Information->Os, + Information->OsVersion + )); + } else { + DEBUG (( + DEBUG_ERROR, + "%a: Can not allocate memory for Redfish OS Version:%a.\n", + __func__, + OsVer + )); + } } =20 - if ((Product !=3D NULL) && (ProductVer !=3D NULL)) { + if (Product !=3D NULL) { AllocationSize =3D AsciiStrSize (Product) * sizeof (CHAR16); Information->Product =3D AllocatePool (AllocationSize); - AsciiStrToUnicodeStrS (Product, Information->Product, AllocationSize); + if (Information->Product !=3D NULL) { + AsciiStrToUnicodeStrS (Product, Information->Product, AllocationSize= ); + } else { + DEBUG (( + DEBUG_ERROR, + "%a: Can not allocate memory for Redfish service product: %a.\n", + __func__, + Product + )); + } + } + + if (ProductVer !=3D NULL) { AllocationSize =3D AsciiStrSize (ProductVer) * sizeof (CHAR16= ); Information->ProductVer =3D AllocatePool (AllocationSize); - AsciiStrToUnicodeStrS (ProductVer, Information->ProductVer, Allocation= Size); - DEBUG ((DEBUG_MANAGEABILITY, "Redfish service product: %s, Version:%s.= \n", Information->Product, Information->ProductVer)); + if (Information->ProductVer !=3D NULL) { + AsciiStrToUnicodeStrS (ProductVer, Information->ProductVer, Allocati= onSize); + DEBUG (( + DEBUG_MANAGEABILITY, + "Redfish service product: %s, Version:%s.\n", + Information->Product, + Information->ProductVer + )); + } else { + DEBUG (( + DEBUG_ERROR, + "%a: Can not allocate memory for Redfish service product Version: = %a.\n", + __func__, + ProductVer + )); + } } } =20 --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112874): https://edk2.groups.io/g/devel/message/112874 Mute This Topic: https://groups.io/mt/103354134/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 12:29:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112875+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112875+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458788; cv=none; d=zohomail.com; s=zohoarc; b=P4VL6U3vNmG6CoLDAJvlIkEjNsWl0kjVE+2L2zmS7axin3NQmwzaGXsuVGiRt2il7ugzi8p/4tJx8BImbjV1H9Cvs7iCiR13rhi7K3sN9bcOkJE6hZBy93X0R7LnKE4nvl/pLSrMF+Xdd451wnKDD7Iza7SSTL7CZikLszPM4bU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458788; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=qgdEclnn83pRHiOxZahBy6TnRA5DtsZtrzenQwX525w=; b=i13ENYeNjbytZ6SCwTpn+IRUJyCe3DJTgUtv8dN9EPrV3H9eoy3AL4s0CihdggDPVbLps6p05w9nX1azDAP3EGWl3DypDQKqh/lp8dvIfB5z0AcBPUAqYeEFxWGcbUZz+hNuzMlfpjoQHQQS3UN7rBfkb1pzUfROlq7aivk1qIc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112875+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458788455871.807689935875; Sun, 24 Dec 2023 14:59:48 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=CDWQHZnj8BY+Czdx3l/euKZpedTzbK9fQr3xkPt0cnU=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458788; v=1; b=YSUszc96JQtd3C6mhV0stEfL1SRbIJ33KwthaTOSsWO597cm1/dfyvNkCP8QN6MS/4sIXyVa kFckP9laFCxXCmOp3v77VHEr3HzRjUi2Uqg4y4O6U5dvL8Gst35A8lcA2FiA8alls1nk2KVOJDt nJYd740uKyi4pkc7IBzyl/6U= X-Received: by 127.0.0.2 with SMTP id nTzsYY1788612xXMwBTk8P9w; Sun, 24 Dec 2023 14:59:48 -0800 X-Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mx.groups.io with SMTP id smtpd.web11.35807.1703458785924420026 for ; Sun, 24 Dec 2023 14:59:46 -0800 X-Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-50e7b273352so199448e87.1 for ; Sun, 24 Dec 2023 14:59:45 -0800 (PST) X-Gm-Message-State: iPA0CGLy5i0e20xTUA9IWHhRx1787277AA= X-Google-Smtp-Source: AGHT+IGslxNhG4Sg7QKjsjlbqCeTt4w8d6Mh96e9UQmbdDiLcuwMtEOu4d/7RcY2akFXo7Hwpb7lYQ== X-Received: by 2002:ac2:5508:0:b0:50e:6ee7:2727 with SMTP id j8-20020ac25508000000b0050e6ee72727mr1023134lfk.42.1703458784075; Sun, 24 Dec 2023 14:59:44 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:43 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 16/16] RedfishPkg: RedfishDiscoverDxe: add [] brackets to URI for IPv6 addresses Date: Mon, 25 Dec 2023 01:59:27 +0300 Message-Id: <20231224225927.9119-17-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458788873100058 Content-Type: text/plain; charset="utf-8" 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: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- .../RedfishDiscoverDxe/RedfishDiscoverDxe.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index 1022ab090df8..238039b57717 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -759,6 +759,7 @@ FreeInformationData ( The function initializes particular strings into the structure instance. =20 @param[in] Information EFI_REDFISH_DISCOVERED_INFORMATION + @param[in] IsIpv6 Flag indicating IP version 6 protocol = is used @param[in] RedfishVersion Redfish version. @param[in] RedfishLocation Redfish location. @param[in] Uuid Service UUID string. @@ -772,6 +773,7 @@ STATIC VOID InitInformationData ( IN EFI_REDFISH_DISCOVERED_INFORMATION *Information, + IN BOOLEAN IsIpv6, IN UINTN *RedfishVersion OPTIONAL, IN CONST CHAR8 *RedfishLocation OPTIONAL, IN CONST CHAR8 *Uuid OPTIONAL, @@ -789,10 +791,20 @@ InitInformationData ( } =20 if (RedfishLocation !=3D NULL) { - AllocationSize =3D AsciiStrSize (RedfishLocation) * sizeof (CHA= R16); + AllocationSize =3D AsciiStrSize (RedfishLocation) * sizeof (CHAR16); + + if (IsIpv6) { + AllocationSize +=3D 2 * sizeof (CHAR16); // take into account '[' an= d ']' + } + Information->Location =3D AllocatePool (AllocationSize); if (Information->Location !=3D NULL) { - AsciiStrToUnicodeStrS (RedfishLocation, Information->Location, Alloc= ationSize); + if (IsIpv6) { + UnicodeSPrintAsciiFormat (Information->Location, AllocationSize, "= [%a]", RedfishLocation); + } else { + AsciiStrToUnicodeStrS (RedfishLocation, Information->Location, All= ocationSize); + } + DEBUG ((DEBUG_MANAGEABILITY, "Redfish service location: %s.\n", Info= rmation->Location)); } else { DEBUG (( @@ -1038,6 +1050,7 @@ AddAndSignalNewRedfishService ( =20 InitInformationData ( &DiscoveredInstance->Information, + CheckIsIpVersion6 (NetworkInterface), RedfishVersion, RedfishLocation, Uuid, --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112875): https://edk2.groups.io/g/devel/message/112875 Mute This Topic: https://groups.io/mt/103354135/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-