From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from outbound.soverin.net (outbound.soverin.net [185.233.34.18]) by mx.groups.io with SMTP id smtpd.web10.8850.1667550644525707717 for ; Fri, 04 Nov 2022 01:30:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@fvhovell.nl header.s=soverin header.b=sYPP2+31; spf=permerror, err=too many SPF records (domain: fvhovell.nl, ip: 185.233.34.18, mailfrom: frederik@fvhovell.nl) Received: from smtp.freedom.nl (c04smtp-lb01.int.sover.in [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 4N3Yjb0YWVz6t; Fri, 4 Nov 2022 08:30:43 +0000 (UTC) Received: from smtp.freedom.nl (smtp.freedom.nl [10.10.4.107]) by freedom.nl (Postfix) with ESMTPSA id 4N3YjY5FMJzLJ; Fri, 4 Nov 2022 08:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fvhovell.nl; s=soverin; t=1667550642; bh=6irD3aYd309IwPQiFhQfjiBD9xp+ntIwLzcPNqhlCz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sYPP2+31zCryzpPRKiHzacDZF8Zyxrg4UePaNgvOnjGswr9HDRqu37PCotN0/Yxwo 1spCer62VDyrWT+BcIvcN/AQnSbp+F3Hxe6Mw6+2vQN+i0bIP60UrWivTGqspVOBSe wKlCX/p/yy04uPYnjXFNTVWmUCoygW1JCJYK3OL9piB2c+N+BwaMNIRCktz8nPhRFz ppFHUNgQrWrzL3K8WmFHhWe1ngczIHiBXTG2ptuAduf0yBen3yEvtgITOmAomKrJcS xLiX/djTZU3Feek4PDmp2EAmFcQi3z+R308VrU/xS1EucrgWf39VlonwQeno31D8Go OuHD/23/ZxpuA== X-Soverin-Authenticated: true From: =?UTF-8?q?Frederik=20van=20H=C3=B6vell?= To: devel@edk2.groups.io Cc: Maciej Rabeda , Jiaxin Wu , Siyuan Fu , =?UTF-8?q?Frederik=20van=20H=C3=B6vell?= Subject: [Patch v1 1/2] [NetworkPkg/SnpDxe] More logging to see why SnpDxe fails to start Date: Fri, 4 Nov 2022 09:30:26 +0100 Message-Id: <20221104083027.115025-2-frederik@fvhovell.nl> In-Reply-To: <20221104083027.115025-1-frederik@fvhovell.nl> References: <20221104083027.115025-1-frederik@fvhovell.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Add debug logging to see where SnpDxe is failing using a UsbIo UNDI driver. Signed-off-by: Frederik van H=C3=B6vell --- NetworkPkg/SnpDxe/Snp.h | 1 + NetworkPkg/SnpDxe/Snp.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/SnpDxe/Snp.h b/NetworkPkg/SnpDxe/Snp.h index d57804ca2873..dec238c9eb2c 100644 --- a/NetworkPkg/SnpDxe/Snp.h +++ b/NetworkPkg/SnpDxe/Snp.h @@ -27,6 +27,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =0D #include =0D #include =0D +#include =0D =0D #include =0D #include =0D diff --git a/NetworkPkg/SnpDxe/Snp.c b/NetworkPkg/SnpDxe/Snp.c index 95361c3cd343..86bf527f31dd 100644 --- a/NetworkPkg/SnpDxe/Snp.c +++ b/NetworkPkg/SnpDxe/Snp.c @@ -160,6 +160,7 @@ SimpleNetworkDriverSupported ( // check the version, we don't want to connect to the undi16=0D //=0D if (NiiProtocol->Type !=3D EfiNetworkInterfaceUndi) {=0D + DEBUG ((DEBUG_NET, "%a: Unsupported type %a for handle %p\n", __FUNCTI= ON__, NiiProtocol->Type, Controller));=0D Status =3D EFI_UNSUPPORTED;=0D goto Done;=0D }=0D @@ -218,7 +219,7 @@ SimpleNetworkDriverSupported ( }=0D =0D Status =3D EFI_SUCCESS;=0D - DEBUG ((DEBUG_INFO, "Support(): supported on %p\n", Controller));=0D + DEBUG ((DEBUG_INFO, "%a: supported on %p\n", __FUNCTION__, Controller));= =0D =0D Done:=0D gBS->CloseProtocol (=0D @@ -283,6 +284,7 @@ SimpleNetworkDriverStart ( );=0D =0D if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a: Failed to get DevicePath for driver %p and h= andle %p - status %r\n", __FUNCTION__, This->DriverBindingHandle, Controlle= r, Status));=0D return Status;=0D }=0D =0D @@ -293,6 +295,7 @@ SimpleNetworkDriverStart ( );=0D =0D if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a: Failed to locate DevicePath using PCI path %= s - status %r\n", __FUNCTION__, ConvertDevicePathToText(NiiDevicePath, TRUE= , TRUE), Status));=0D return Status;=0D }=0D =0D @@ -305,6 +308,7 @@ SimpleNetworkDriverStart ( EFI_OPEN_PROTOCOL_GET_PROTOCOL=0D );=0D if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a: Failed to open PciIo protocol for driver %p = and handle %p - status %r\n", __FUNCTION__, This->DriverBindingHandle, Hand= le, Status));=0D return Status;=0D }=0D =0D @@ -320,6 +324,7 @@ SimpleNetworkDriverStart ( EFI_OPEN_PROTOCOL_BY_DRIVER=0D );=0D if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a: Failed to open NII protocol for driver %p an= d controller %p - status %r\n", __FUNCTION__, This->DriverBindingHandle, Co= ntroller, Status));=0D gBS->CloseProtocol (=0D Controller,=0D &gEfiDevicePathProtocolGuid,=0D --=20 2.35.1