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=net0,net=192.168.10.0/24,dhcpstart=192.168.10.1 -device 
usb-net,netdev=net0


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 [何明忠] via groups.io wrote:
UsbNetworkPkg provides network functions for USB ACM, USB NCM,
and USB RNDIS network device.

Signed-off-by: Richard Ho <richar...@ami.com>
Cc: Andrew Fish <af...@apple.com>
Cc: Leif Lindholm <quic_llind...@quicinc.com>
Cc: Michael D Kinney <michael.d.kin...@intel.com>
Cc: Michael Kubacki <michael.kuba...@microsoft.com>
Cc: Zhiguang Liu <zhiguang....@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Reviewed-by: Tony Lo <ton...@ami.com>
---
  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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#93230): https://edk2.groups.io/g/devel/message/93230
Mute This Topic: https://groups.io/mt/93121092/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to