From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web11.230.1662476741054842796 for ; Tue, 06 Sep 2022 08:05:41 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@quicinc.com header.s=qcppdkim1 header.b=FLqT9L64; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: quicinc.com, ip: 205.220.180.131, mailfrom: quic_rcran@quicinc.com) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2869Oq9q004922; Tue, 6 Sep 2022 15:05:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=e70PxyUbW4Bv83E8XiJiI//tQfc7u+G9QLTeaJkxeQ0=; b=FLqT9L646MdPhWGW9B14vdVSYAs6uFjJqSQ7tPNr3x0Q5h5EBKifgye4iOllPjgHoeTy 91LE2NsAiJEqXsFH9LTRKCZErK8IdvEJYkevggXQgCgf5vctlydkAeTlgxOh2BszZVnm tdTyZ/k0nF1ONCAM6mF8xghfAT0U6on4aTbi1LMOivVWwPFwA6OZbsHnxnFp8bWfmjLA 7xXiUgz7scstcOSkonTuxyWY85K1kCxP5fZwtLipY0i7W85DMz7iS3qi84H31urTjX6V Oyp0z0PboW+AHlIZAO2GRMaOUzP/4m2brk22ZQxxSOgBBNu5GQh5BkC2QE74arGGEIdT vA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jby107yw3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Sep 2022 15:05:28 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 286F5Rjj001294 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 6 Sep 2022 15:05:27 GMT Received: from [10.110.125.70] (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 6 Sep 2022 08:05:27 -0700 Message-ID: <71155a5e-2756-828c-ec56-79b5a73b488e@quicinc.com> Date: Tue, 6 Sep 2022 09:05:26 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [edk2-devel] [PATCH] UsbNetworkPkg: add USB network devices support To: , CC: Andrew Fish , Leif Lindholm , Michael D Kinney , Michael Kubacki , Zhiguang Liu , Liming Gao , =?UTF-8?B?VG9ueUxvIFvnvoXph5Hmnb5d?= References: <20220902052418.2253-1-richardho@ami.com> From: "Rebecca Cran" In-Reply-To: <20220902052418.2253-1-richardho@ami.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: mzN973FoLF0rB6THsTIRvIWjkyURWuWM X-Proofpoint-GUID: mzN973FoLF0rB6THsTIRvIWjkyURWuWM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-06_07,2022-09-06_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 adultscore=0 suspectscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 mlxlogscore=825 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209060072 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-0031df01.pphosted.com id 2869Oq9q004922 Content-Language: en-US Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable Is it expected that this will work with QEMU (with the usb-net fixes from= https://github.com/mcb30/qemu/tree/usbnet3), for example using the SBSA-REF machine for Arm or OVMF for X64? I'm adding the following parameters to QEMU: -netdev user,id=3Dnet0,net=3D192.168.10.0/24,dhcpstart=3D192.168.10.1 -de= vice usb-net,netdev=3Dnet0 On OVMF I get the following crash when loading UsbRndis.efi after Network= Common.efi: Support(): UNDI3.1 found on handle 6550D18 Support(): supported on 6550D18 Start(): UNDI3.1 found !!!! X64 Exception Type - 06(#UD - Invalid Opcode) CPU Apic ID - 0000000= 0 !!!! RIP - 00000000000B0001, CS - 0000000000000038, RFLAGS - 000000000000028= 3 RAX - 000000000653AF80, RCX - 00000000065DC382, RDX - 0000000000005441 RBX - 00000000065D8000, RSP - 0000000007E8EA48, RBP - 00000000065DB001 RSI - 0000000000000048, RDI - 0000000006CE82C0 R8 - 0000000007E8EA60, R9 - 0000000007E8EAD0, R10 - 0000000007E8E804 R11 - 0000000000000000, R12 - 8000000000000003, R13 - 0000000000000001 R14 - 0000000006CEE640, R15 - 0000000000000006 DS - 0000000000000030, ES - 0000000000000030, FS - 0000000000000030 GS - 0000000000000030, SS - 0000000000000030 CR0 - 0000000080010033, CR2 - 0000000000000000, CR3 - 0000000007C01000 CR4 - 0000000000000668, CR8 - 0000000000000000 DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000 DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400 GDTR - 00000000079DE000 0000000000000047, LDTR - 0000000000000000 IDTR - 000000000753C018 0000000000000FFF, TR - 0000000000000000 FXSAVE_STATE - 0000000007E8E6A0 !!!! Can't find image information. !!!! On Arm, I don't get a crash but no network interface gets created. I've checked the QEMU RNDIS interface is working: if I boot to Linux I ca= n get an IP address and communicate with the outside world. --=20 Rebecca Cran On 9/1/22 23:24, RichardHo [=E4=BD=95=E6=98=8E=E5=BF=A0] via groups.io wr= ote: > UsbNetworkPkg provides network functions for USB ACM, USB NCM, > and USB RNDIS network device. > > Signed-off-by: Richard Ho > Cc: Andrew Fish > Cc: Leif Lindholm > Cc: Michael D Kinney > Cc: Michael Kubacki > Cc: Zhiguang Liu > Cc: Liming Gao > Reviewed-by: Tony Lo > --- > UsbNetworkPkg/Config/UsbNetworkPkg.inc.dsc | 9 + > .../Config/UsbNetworkPkgComponentsDxe.inc.dsc | 20 + > .../Config/UsbNetworkPkgComponentsDxe.inc.fdf | 20 + > .../Config/UsbNetworkPkgDefines.inc.dsc | 23 + > .../Include/Protocol/UsbEthernetProtocol.h | 872 +++++++++ > UsbNetworkPkg/NetworkCommon/ComponentName.c | 264 +++ > UsbNetworkPkg/NetworkCommon/DriverBinding.c | 583 ++++++ > UsbNetworkPkg/NetworkCommon/DriverBinding.h | 263 +++ > UsbNetworkPkg/NetworkCommon/NetworkCommon.inf | 43 + > UsbNetworkPkg/NetworkCommon/PxeFunction.c | 1734 ++++++++++++++++= + > UsbNetworkPkg/ReadMe.md | 65 + > UsbNetworkPkg/ReleaseNotes.md | 11 + > UsbNetworkPkg/UsbCdcEcm/ComponentName.c | 170 ++ > UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.c | 504 +++++ > UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.h | 211 ++ > UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.inf | 41 + > UsbNetworkPkg/UsbCdcEcm/UsbEcmFunction.c | 861 ++++++++ > UsbNetworkPkg/UsbCdcNcm/ComponentName.c | 170 ++ > UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.c | 508 +++++ > UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.h | 245 +++ > UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.inf | 41 + > UsbNetworkPkg/UsbCdcNcm/UsbNcmFunction.c | 946 +++++++++ > UsbNetworkPkg/UsbNetworkPkg.dec | 32 + > UsbNetworkPkg/UsbRndis/ComponentName.c | 172 ++ > UsbNetworkPkg/UsbRndis/UsbRndis.c | 848 ++++++++ > UsbNetworkPkg/UsbRndis/UsbRndis.h | 569 ++++++ > UsbNetworkPkg/UsbRndis/UsbRndis.inf | 41 + > UsbNetworkPkg/UsbRndis/UsbRndisFunction.c | 1587 +++++++++++++++ > 28 files changed, 10853 insertions(+) > create mode 100644 UsbNetworkPkg/Config/UsbNetworkPkg.inc.dsc > create mode 100644 UsbNetworkPkg/Config/UsbNetworkPkgComponentsDxe.in= c.dsc > create mode 100644 UsbNetworkPkg/Config/UsbNetworkPkgComponentsDxe.in= c.fdf > create mode 100644 UsbNetworkPkg/Config/UsbNetworkPkgDefines.inc.dsc > create mode 100644 UsbNetworkPkg/Include/Protocol/UsbEthernetProtocol= .h > create mode 100644 UsbNetworkPkg/NetworkCommon/ComponentName.c > create mode 100644 UsbNetworkPkg/NetworkCommon/DriverBinding.c > create mode 100644 UsbNetworkPkg/NetworkCommon/DriverBinding.h > create mode 100644 UsbNetworkPkg/NetworkCommon/NetworkCommon.inf > create mode 100644 UsbNetworkPkg/NetworkCommon/PxeFunction.c > create mode 100644 UsbNetworkPkg/ReadMe.md > create mode 100644 UsbNetworkPkg/ReleaseNotes.md > create mode 100644 UsbNetworkPkg/UsbCdcEcm/ComponentName.c > create mode 100644 UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.c > create mode 100644 UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.h > create mode 100644 UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.inf > create mode 100644 UsbNetworkPkg/UsbCdcEcm/UsbEcmFunction.c > create mode 100644 UsbNetworkPkg/UsbCdcNcm/ComponentName.c > create mode 100644 UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.c > create mode 100644 UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.h > create mode 100644 UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.inf > create mode 100644 UsbNetworkPkg/UsbCdcNcm/UsbNcmFunction.c > create mode 100644 UsbNetworkPkg/UsbNetworkPkg.dec > create mode 100644 UsbNetworkPkg/UsbRndis/ComponentName.c > create mode 100644 UsbNetworkPkg/UsbRndis/UsbRndis.c > create mode 100644 UsbNetworkPkg/UsbRndis/UsbRndis.h > create mode 100644 UsbNetworkPkg/UsbRndis/UsbRndis.inf > create mode 100644 UsbNetworkPkg/UsbRndis/UsbRndisFunction.c