From nobody Sat May 18 23:55:33 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+97919+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+97919+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1672816946; cv=none; d=zohomail.com; s=zohoarc; b=MPzztGdyNPPyt37++ouA+CClRlBi6RkLoBMjPh9PCNcGWmBfosxo3Ikw8T0wb+CDlDWSWDNxq623Op8ZHrAOOHPRYnA1w731Y9CNea2GOFKJHWb7p4TLAuxr9v31E3ie5t+PalJZjpQrKa6C/ij4/fJHJWveDT3CvS9yLN79fqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672816946; h=Content-Type:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=gLoJii4M5JCaLVxY9ueSW+LSlk4jJCuhbrKfCOp+3sc=; b=S6h9PcpLg/Npub0cNVIdFGOwMaqnLByGin4q+hosVHNFQU8kfXmXjLJSIeo7Tx1sbyaIkkHQ301MG8Z58mG5UfPMpY7Kbhj3TqkzFe8TWqqk2Y86inKjaml1hIgp2JP7Iy+K8TQNU4tLnzFW09Cduc5XTryJApOq+Fd4quf2AIs= 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+97919+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1672816946747329.48332387431435; Tue, 3 Jan 2023 23:22:26 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id RWhiYY1788612xNe6z9VsClm; Tue, 03 Jan 2023 23:22:26 -0800 Subject: [edk2-devel] [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Fix various Coverity issues To: devel@edk2.groups.io From: "Ranbir Singh via groups.io" X-Originating-Location: Bengaluru, Karnataka, IN (122.172.85.38) X-Originating-Platform: Windows Chrome 108 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 03 Jan 2023 23:22:25 -0800 Message-ID: Precedence: Bulk List-Unsubscribe: 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,Ranbir.Singh3@Dell.com X-Gm-Message-State: WThvpBbGSsWRK17XSVybFmfex1787277AA= Content-Type: multipart/alternative; boundary="njzBX0SbN0mx1nfJQ4Tt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1672816946; bh=XH/J0B6uHALNfbCPfbpr2EGaIMa6MwNwY8o1NvWPy0s=; h=Content-Type:Date:From:Reply-To:Subject:To; b=bQMBKCcjnmDkR5HQt0FiE5gDTgNkjCrh0aH7i1IZetGtuRom1/UgOvddMfxBDLBVUkj 82VodtefMaDqODQk0xjl1UFB6QexIuU/wLb63uAZHu4+SkWmIXFP00+619a7fowRH7Iby yGcdRwD5LxNvu12gPNhrff0dW+WmclBW2GA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1672816948464100002 --njzBX0SbN0mx1nfJQ4Tt Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 The function PciHotPlugRequestNotify in MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c has two if blocks towards the end of function both containing return. Due to the parameter checks ensured at the beginning of the function, one of the two if blocks is bound to come in execution flow. Hence, the return EFI_SUCCESS; at line 2112 is redundant/deadcode. To fix it, either of line 2109 or 2112 can be deleted. The function UpdatePciInfo in MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c has switch-case code in which there are fall through from case 32: to case 64:. While this is seeemingly intentional, it is not evident to any static analyzer tool. Just adding // No break; here as this is an intentional fallthrough. as explicit comment in between makes Coverity happy. The function PciHostBridgeResourceAllocator in MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c has is not making use of the generic approach as is used in one of the other function - DumpResourceMap. As a result, we see the warning as reported by Coverity e.g. (30) Event address_of:=C2=A0 Taking address with "&IoBridge" yields a singleton pointer. (31) Event callee_ptr_arith:=C2=A0 =C2=A0 Passing "&IoBridge" to function "FindResourceNode" which uses it as an array. This might corrupt or misinterpret adjacent memory locations. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4239 Signed-off-by: Ranbir Singh --- .../Bus/Pci/PciBusDxe/PciEnumerator.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 1 - .../Bus/Pci/PciBusDxe/PciEnumeratorSupport.c=C2=A0 |=C2=A0 6 +++ MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c=C2=A0 =C2=A0 =C2=A0 =C2=A0| 37 ++++= ++++++++++++--- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/MdeModulePkg/= Bus/Pci/PciBusDxe/PciEnumerator.c index 3f8c6e6da7..5b71e152f3 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c @@ -2106,7 +2106,6 @@ PciHotPlugRequestNotify ( // // End for // -=C2=A0 =C2=A0 return EFI_SUCCESS; } return EFI_SUCCESS; diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeMod= ulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c index 8eca859695..e01ef4d4d9 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c @@ -1425,6 +1425,9 @@ UpdatePciInfo ( switch (Ptr->AddrSpaceGranularity) { case 32: PciIoDevice->PciBar[BarIndex].BarType =3D PciBarTypeMem32; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // No break= ; here as this is an intentional fall through. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // case 64: PciIoDevice->PciBar[BarIndex].BarTypeFixed =3D TRUE; break; @@ -1437,6 +1440,9 @@ UpdatePciInfo ( switch (Ptr->AddrSpaceGranularity) { case 32: PciIoDevice->PciBar[BarIndex].BarType =3D PciBarTypePMem32; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // No break= ; here as this is an intentional fall through. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // case 64: PciIoDevice->PciBar[BarIndex].BarTypeFixed =3D TRUE; break; diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci= /PciBusDxe/PciLib.c index 84fc0161a1..71767d3793 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c @@ -485,6 +485,8 @@ PciHostBridgeResourceAllocator ( UINT64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0Mem64ResStatus; UINT64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0PMem64ResStatus; UINT32=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0MaxOptionRomSize; +=C2=A0 PCI_RESOURCE_NODE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 **ChildResources; +=C2=A0 UINTN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ChildResourceCount; PCI_RESOURCE_NODE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *IoBridge; PCI_RESOURCE_NODE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *Mem32Bridge; PCI_RESOURCE_NODE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *PMem32Bridge; @@ -895,16 +897,39 @@ PciHostBridgeResourceAllocator ( // Create the entire system resource map from the information collected by // enumerator. Several resource tree was created // -=C2=A0 =C2=A0 FindResourceNode (RootBridgeDev, &IoPool, &IoBridge); -=C2=A0 =C2=A0 FindResourceNode (RootBridgeDev, &Mem32Pool, &Mem32Bridge); -=C2=A0 =C2=A0 FindResourceNode (RootBridgeDev, &PMem32Pool, &PMem32Bridge); -=C2=A0 =C2=A0 FindResourceNode (RootBridgeDev, &Mem64Pool, &Mem64Bridge); -=C2=A0 =C2=A0 FindResourceNode (RootBridgeDev, &PMem64Pool, &PMem64Bridge); - +=C2=A0 =C2=A0 ChildResourceCount =3D FindResourceNode (RootBridgeDev, &IoP= ool, NULL); +=C2=A0 =C2=A0 ChildResources =3D AllocatePool (sizeof (PCI_RESOURCE_NODE *= ) * ChildResourceCount); +=C2=A0 =C2=A0 ASSERT (ChildResources !=3D NULL); +=C2=A0 =C2=A0 FindResourceNode (RootBridgeDev, &IoPool, &ChildResources[0]= ); +=C2=A0 =C2=A0 IoBridge =3D ChildResources[0]; ASSERT (IoBridge=C2=A0 =C2=A0 =C2=A0!=3D NULL); + +=C2=A0 =C2=A0 ChildResourceCount =3D FindResourceNode (RootBridgeDev, &Mem= 32Pool, NULL); +=C2=A0 =C2=A0 ChildResources =3D AllocatePool (sizeof (PCI_RESOURCE_NODE *= ) * ChildResourceCount); +=C2=A0 =C2=A0 ASSERT (ChildResources !=3D NULL); +=C2=A0 =C2=A0 FindResourceNode (RootBridgeDev, &Mem32Pool, &ChildResources= [0]); +=C2=A0 =C2=A0 Mem32Bridge =3D ChildResources[0]; ASSERT (Mem32Bridge=C2=A0 !=3D NULL); + +=C2=A0 =C2=A0 ChildResourceCount =3D FindResourceNode (RootBridgeDev, &PMe= m32Pool, NULL); +=C2=A0 =C2=A0 ChildResources =3D AllocatePool (sizeof (PCI_RESOURCE_NODE *= ) * ChildResourceCount); +=C2=A0 =C2=A0 ASSERT (ChildResources !=3D NULL); +=C2=A0 =C2=A0 FindResourceNode (RootBridgeDev, &PMem32Pool, &ChildResource= s[0]); +=C2=A0 =C2=A0 PMem32Bridge =3D ChildResources[0]; ASSERT (PMem32Bridge !=3D NULL); + +=C2=A0 =C2=A0 ChildResourceCount =3D FindResourceNode (RootBridgeDev, &Mem= 64Pool, NULL); +=C2=A0 =C2=A0 ChildResources =3D AllocatePool (sizeof (PCI_RESOURCE_NODE *= ) * ChildResourceCount); +=C2=A0 =C2=A0 ASSERT (ChildResources !=3D NULL); +=C2=A0 =C2=A0 FindResourceNode (RootBridgeDev, &Mem64Pool, &ChildResources= [0]); +=C2=A0 =C2=A0 Mem64Bridge =3D ChildResources[0]; ASSERT (Mem64Bridge=C2=A0 !=3D NULL); + +=C2=A0 =C2=A0 ChildResourceCount =3D FindResourceNode (RootBridgeDev, &PMe= m64Pool, NULL); +=C2=A0 =C2=A0 ChildResources =3D AllocatePool (sizeof (PCI_RESOURCE_NODE *= ) * ChildResourceCount); +=C2=A0 =C2=A0 ASSERT (ChildResources !=3D NULL); +=C2=A0 =C2=A0 FindResourceNode (RootBridgeDev, &PMem64Pool, &ChildResource= s[0]); +=C2=A0 =C2=A0 PMem64Bridge =3D ChildResources[0]; ASSERT (PMem64Bridge !=3D NULL); // -- 2.36.1.windows.1 -=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 (#97919): https://edk2.groups.io/g/devel/message/97919 Mute This Topic: https://groups.io/mt/96046265/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- --njzBX0SbN0mx1nfJQ4Tt Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
The function PciHotPlugRequestNotify in
 
    MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
 
has two if blocks towards the end of function both containing return.<= /div>
Due to the parameter checks ensured at the beginning of the function,<= /div>
one of the two if blocks is bound to come in execution flow. Hence,
the return EFI_SUCCESS; at line 2112 is redundant/deadcode. To fix it,=
either of line 2109 or 2112 can be deleted.
 
The function UpdatePciInfo in
 
    MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
 
has switch-case code in which there are fall through from
case 32: to case 64:. While this is seeemingly intentional, it is not<= /div>
evident to any static analyzer tool. Just adding
 
    // No break; here as this is an intentional fallthrough.=
 
as explicit comment in between makes Coverity happy.
 
The function PciHostBridgeResourceAllocator in
 
    MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c has
 
is not making use of the generic approach as is used in one of the
other function - DumpResourceMap. As a result, we see the warning as
reported by Coverity e.g.
(30) Event address_of:  Taking address with "&IoBridge" yield= s a
     singleton pointer.
(31) Event callee_ptr_arith:    Passing "&IoBridge" to f= unction
     "FindResourceNode" which uses it as an array. This= might corrupt
     or misinterpret adjacent memory locations.
 
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4239
Signed-off-by: Ranbir Singh <Ranbir.Singh3@Dell.com>
---
 .../Bus/Pci/PciBusDxe/PciEnumerator.c       =  |  1 -
 .../Bus/Pci/PciBusDxe/PciEnumeratorSupport.c  |  6 +++=
 MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c      &nbs= p;| 37 ++++++++++++++++---
 3 files changed, 37 insertions(+), 7 deletions(-)
 
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/MdeModul= ePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
index 3f8c6e6da7..5b71e152f3 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
@@ -2106,7 +2106,6 @@ PciHotPlugRequestNotify (
     //
     // End for
     //
-    return EFI_SUCCESS;
   }
 
   return EFI_SUCCESS;
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/M= deModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
index 8eca859695..e01ef4d4d9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
@@ -1425,6 +1425,9 @@ UpdatePciInfo (
               switch (Ptr->= ;AddrSpaceGranularity) {
                 case 32:=
                   P= ciIoDevice->PciBar[BarIndex].BarType =3D PciBarTypeMem32;
+                  //
+                  // No = break; here as this is an intentional fall through.
+                  //
                 case 64:=
                   P= ciIoDevice->PciBar[BarIndex].BarTypeFixed =3D TRUE;
                   b= reak;
@@ -1437,6 +1440,9 @@ UpdatePciInfo (
               switch (Ptr->= ;AddrSpaceGranularity) {
                 case 32:=
                   P= ciIoDevice->PciBar[BarIndex].BarType =3D PciBarTypePMem32;
+                  //
+                  // No = break; here as this is an intentional fall through.
+                  //
                 case 64:=
                   P= ciIoDevice->PciBar[BarIndex].BarTypeFixed =3D TRUE;
                   b= reak;
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bu= s/Pci/PciBusDxe/PciLib.c
index 84fc0161a1..71767d3793 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
@@ -485,6 +485,8 @@ PciHostBridgeResourceAllocator (
   UINT64              &n= bsp;                     =      Mem64ResStatus;
   UINT64              &n= bsp;                     =      PMem64ResStatus;
   UINT32              &n= bsp;                     =      MaxOptionRomSize;
+  PCI_RESOURCE_NODE            &nb= sp;                 **ChildResource= s;
+  UINTN                &= nbsp;                    =     ChildResourceCount;
   PCI_RESOURCE_NODE           = ;                   *IoBridge;=
   PCI_RESOURCE_NODE           = ;                   *Mem32Brid= ge;
   PCI_RESOURCE_NODE           = ;                   *PMem32Bri= dge;
@@ -895,16 +897,39 @@ PciHostBridgeResourceAllocator (
     // Create the entire system resource map from the = information collected by
     // enumerator. Several resource tree was created
     //
-    FindResourceNode (RootBridgeDev, &IoPool, &IoBr= idge);
-    FindResourceNode (RootBridgeDev, &Mem32Pool, &M= em32Bridge);
-    FindResourceNode (RootBridgeDev, &PMem32Pool, &= PMem32Bridge);
-    FindResourceNode (RootBridgeDev, &Mem64Pool, &M= em64Bridge);
-    FindResourceNode (RootBridgeDev, &PMem64Pool, &= PMem64Bridge);
-
+    ChildResourceCount =3D FindResourceNode (RootBridgeDev,= &IoPool, NULL);
+    ChildResources =3D AllocatePool (sizeof (PCI_RESOURCE_N= ODE *) * ChildResourceCount);
+    ASSERT (ChildResources !=3D NULL);
+    FindResourceNode (RootBridgeDev, &IoPool, &Chil= dResources[0]);
+    IoBridge =3D ChildResources[0];
     ASSERT (IoBridge     !=3D NULL);
+
+    ChildResourceCount =3D FindResourceNode (RootBridgeDev,= &Mem32Pool, NULL);
+    ChildResources =3D AllocatePool (sizeof (PCI_RESOURCE_N= ODE *) * ChildResourceCount);
+    ASSERT (ChildResources !=3D NULL);
+    FindResourceNode (RootBridgeDev, &Mem32Pool, &C= hildResources[0]);
+    Mem32Bridge =3D ChildResources[0];
     ASSERT (Mem32Bridge  !=3D NULL);
+
+    ChildResourceCount =3D FindResourceNode (RootBridgeDev,= &PMem32Pool, NULL);
+    ChildResources =3D AllocatePool (sizeof (PCI_RESOURCE_N= ODE *) * ChildResourceCount);
+    ASSERT (ChildResources !=3D NULL);
+    FindResourceNode (RootBridgeDev, &PMem32Pool, &= ChildResources[0]);
+    PMem32Bridge =3D ChildResources[0];
     ASSERT (PMem32Bridge !=3D NULL);
+
+    ChildResourceCount =3D FindResourceNode (RootBridgeDev,= &Mem64Pool, NULL);
+    ChildResources =3D AllocatePool (sizeof (PCI_RESOURCE_N= ODE *) * ChildResourceCount);
+    ASSERT (ChildResources !=3D NULL);
+    FindResourceNode (RootBridgeDev, &Mem64Pool, &C= hildResources[0]);
+    Mem64Bridge =3D ChildResources[0];
     ASSERT (Mem64Bridge  !=3D NULL);
+
+    ChildResourceCount =3D FindResourceNode (RootBridgeDev,= &PMem64Pool, NULL);
+    ChildResources =3D AllocatePool (sizeof (PCI_RESOURCE_N= ODE *) * ChildResourceCount);
+    ASSERT (ChildResources !=3D NULL);
+    FindResourceNode (RootBridgeDev, &PMem64Pool, &= ChildResources[0]);
+    PMem64Bridge =3D ChildResources[0];
     ASSERT (PMem64Bridge !=3D NULL);
 
     //
--
2.36.1.windows.1
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

= View/Reply Online (#97919) | =20 | Mute = This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [importer@patchew.org]

_._,_._,_
--njzBX0SbN0mx1nfJQ4Tt--