From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web11.5024.1663917477951148484 for ; Fri, 23 Sep 2022 00:17:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=mggxmJnA; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id C4E64CD1F6F4 for ; Fri, 23 Sep 2022 15:17:53 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1663917473; bh=fuBhhOfAKfgi5l4D0fazO5v5LqSMnly+F0vB/4MEGfA=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=mggxmJnAwlsze7OI2Ntxyavxxg2xza6q9BtdQP9/gqAIk1UW+7y6GifVzddEIEG0X iBYc5rrjq2vNF3+QCTFBfXz8adr/w8wCiHfs5eRAQjPV6vw7qoWqer1QdWVM78hP8h 2yBIhhA5dkeTnHEMbzUPuIsOIIPqqQ1rt1vu2XQM= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id C07F0CD1F6D8 for ; Fri, 23 Sep 2022 15:17:53 +0800 (CST) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 8BBE5CD1F6B2 for ; Fri, 23 Sep 2022 15:17:53 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id 118B4CD1F694 for ; Fri, 23 Sep 2022 15:17:50 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 23 Sep 2022 15:17:41 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Rebecca Cran'" Cc: "'Andrew Fish'" , "'Leif Lindholm'" , "'Michael D Kinney'" , "'Michael Kubacki'" , "'Zhiguang Liu'" , =?UTF-8?B?J1RvbnlMbyBb576F6YeR5p2+XSc=?= References: <20220902052418.2253-1-richardho@ami.com> <71155a5e-2756-828c-ec56-79b5a73b488e@quicinc.com> <024201d8cf09$c5268180$4f738480$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiDlm57lpI06IFtlZGsyLWRldmVsXSBbUEFUQ0hdIFVzYk5ldHdvcmtQa2c6IGFkZCBVU0IgbmV0d29yayBkZXZpY2VzIHN1cHBvcnQ=?= Date: Fri, 23 Sep 2022 15:17:43 +0800 Message-ID: <02b101d8cf1c$92cf9060$b86eb120$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQH/bKNiOvsBCHLsmIW/EjNOrxy53QEbdsSAAaxKMTQBrkaf5AH8VD+orWu/dNA= Sender: "gaoliming" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Richard:=20 We are investigating how to get MAC address in USB RNDIS device from open= BMC. For this patch, I find some definitions in Edk2\UsbNetworkPkg\Include\Pro= tocol\UsbEthernetProtocol.h are from the industry spec.=20 I suggest to move those definitions to new file in Edk2\MdePkg\Include\In= dustryStandard directory. And, for RNDIS driver, I suggest you update the description to specify ho= w it gets network information.=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 RichardHo > [=E4=BD=95=E6=98=8E=E5=BF=A0] via groups.io > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B49=E6=9C=8823=E6=97=A5 = 13:54 > =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming ; devel@= edk2.groups.io; > 'Rebecca Cran' > =E6=8A=84=E9=80=81: 'Andrew Fish' ; 'Leif Lindholm' > ; 'Michael D Kinney' > ; 'Michael Kubacki' > ; 'Zhiguang Liu' ; > TonyLo [=E7=BE=85=E9=87=91=E6=9D=BE] > =E4=B8=BB=E9=A2=98: Re: =E5=9B=9E=E5=A4=8D: [edk2-devel] [PATCH] UsbNetwo= rkPkg: add USB network > devices support >=20 > Hi Liming, >=20 > RNDIS specification is not defines this. > We're follow the ECM (5.4 Ethernet Networking Functional Descriptor) and > NCM (5.2.1 NCM Functional Descriptor)specification to implement RNDIS > driver. >=20 > If RNDIS device has other way to know the networking functional informati= on. > We could implement the code to GetUsbHeaderFunDescriptor, > GetUsbUnionFunDescriptor, and GetUsbRndisFunDescriptor routine. >=20 > Thanks, > Richard >=20 > -----Original Message----- > From: gaoliming > Sent: 2022=E5=B9=B49=E6=9C=8823=E6=97=A5 1:03 PM > To: devel@edk2.groups.io; RichardHo [=E4=BD=95=E6=98=8E=E5=BF=A0] ; > 'Rebecca Cran' > Cc: 'Andrew Fish' ; 'Leif Lindholm' > ; 'Michael D Kinney' > ; 'Michael Kubacki' > ; 'Zhiguang Liu' ; > TonyLo [=E7=BE=85=E9=87=91=E6=9D=BE] > Subject: [EXTERNAL] =E5=9B=9E=E5=A4=8D: [edk2-devel] [PATCH] UsbNetworkPk= g: add USB > network devices support >=20 >=20 > **CAUTION: The e-mail below is from an external source. Please exercise > caution before opening attachments, clicking links, or following guidance= .** >=20 > Richard: > We also verify USB RNDIS module with open BMC. It reports USB RNDIS > device descriptor type is USB_DESC_TYPE_INTERFACE (0x04). It is not > supported by Rndis module. >=20 > But in UsbNetworkPkg\Include\Protocol\UsbEthernetProtocol.h, it defines > CS_INTERFACE as 0x24. Rndis module only supports this descriptor type. >=20 > So, I want to confirm which specification defines device descriptor typ= e > 0x24 and its related structure HEADER_FUN_DESCRIPTOR/ > UNION_FUN_DESCRIPTOR/ ETHERNET_FUN_DESCRIPTOR. >=20 > Thanks > Liming > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =E4=BB=A3=E8=A1=A8 RichardHo > > [=E4=BD=95=E6=98=8E=E5=BF=A0] via groups.io > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B49=E6=9C=887=E6=97=A5= 13:31 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: Rebecca Cran ; devel@= edk2.groups.io > > =E6=8A=84=E9=80=81: Andrew Fish ; Leif Lindholm > > ; Michael D Kinney > > ; Michael Kubacki > > ; Zhiguang Liu > > ; Liming Gao ; > > TonyLo [=E7=BE=85=E9=87=91=E6=9D=BE] > > > > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH] UsbNetworkPkg: add USB net= work devices > > support > > > > Hi Rebecca, > > > > We didn't check it in QEMU. > > Is QEMU report standard USB RNDIS protocol? > > > > We only test it in physical device. Below is device lists. > > > > USB RNDIS: > > AST2500 : BMC report the RNDIS device > > > > USB NCM: > > DisplayLink HIS USB3.0 Portable Dock(DisplayLink (UK) Ltd.) Vendor ID: > > 0x17E9 Product ID: 0x4301 > > > > USB ECM: > > DM9621(Davicom Semiconductor, Inc.) > > Vendor ID: 0x0A46 > > Product ID: 0x1269 > > > > Thanks, > > Richard > > > > -----Original Message----- > > From: Rebecca Cran > > Sent: 2022=E5=B9=B49=E6=9C=886=E6=97=A5 11:05 PM > > To: devel@edk2.groups.io; RichardHo [=E4=BD=95=E6=98=8E=E5=BF=A0] > > Cc: Andrew Fish ; Leif Lindholm > > ; Michael D Kinney > > ; Michael Kubacki > > ; Zhiguang Liu > > ; Liming Gao ; > > TonyLo [=E7=BE=85=E9=87=91=E6=9D=BE] > > > > Subject: [EXTERNAL] Re: [edk2-devel] [PATCH] UsbNetworkPkg: add USB > > network devices support > > > > > > **CAUTION: The e-mail below is from an external source. Please > > exercise caution before opening attachments, clicking links, or followi= ng > guidance. > ** > > > > Is it expected that this will work with QEMU (with the usb-net fixes > > from > > https://nam12.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgit= h > > u > b.com%2Fmcb30%2Fqemu%2Ftree%2Fusbnet3&data=3D05%7C01%7Crich > > > ardho%40ami.com%7C1dd20e124cd64659b4e908da90193dd3%7C27e97857 > > > e15f486cb58e86c2b3040f93%7C1%7C0%7C637980735342252066%7CUnkno > > > wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h > > > aWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3DxHRQc%2Fnv7fP > > k%2BPEVavIlfFpaXj6Gq8NiHUsRdd5HD%2Fc%3D&reserved=3D0), > > 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 > > -device > > usb-net,netdev=3Dnet0 > > > > > > On OVMF I get the following crash when loading UsbRndis.efi after > > NetworkCommon.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 - > > 00000000 !!!! > > RIP - 00000000000B0001, CS - 0000000000000038, RFLAGS - > > 0000000000000283 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 > > can > get > > an IP address and communicate with the outside world. > > > > -- > > Rebecca Cran > > > > > > On 9/1/22 23:24, RichardHo [=E4=BD=95=E6=98=8E=E5=BF=A0] via groups.io = wrote: > > > 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.inc.dsc > > > create mode 100644 > > UsbNetworkPkg/Config/UsbNetworkPkgComponentsDxe.inc.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 > > > > -The information contained in this message may be confidential and > > proprietary to American Megatrends (AMI). This communication is > > intended > to > > be read only by the individual or entity to whom it is addressed or by > their > > designee. If the reader of this message is not the intended recipient, > > you > are > > on notice that any distribution of this message, in any form, is > > strictly prohibited. Please promptly notify the sender by reply e-mail > > or by > telephone > > at 770-246-8600, and then delete or destroy all copies of the > transmission. > > > > > > > > >=20 >=20 >=20 > -The information contained in this message may be confidential and > proprietary to American Megatrends (AMI). This communication is intended = to > be read only by the individual or entity to whom it is addressed or by th= eir > designee. If the reader of this message is not the intended recipient, yo= u are > on notice that any distribution of this message, in any form, is strictly > prohibited. Please promptly notify the sender by reply e-mail or by telep= hone > at 770-246-8600, and then delete or destroy all copies of the transmissio= n. >=20 >=20 >=20 >=20