Re: Establish network and run 'ping'


Buhrow, Simon <simon.buhrow@...>
 

Hi Tom,

Thanks fort that advice!

Loading MnpDxe runs successfully. And I get a nice entry in drivers table.
Looking to the details I get (more details see below)
Managing :
Ctrl[161] : Intel(R) I210 Gigabit Network Connection
Child[16F] : MNP (Not started)


How do I start MNP?


I tried to load ArpDxe as this is the next driver in the EFINetworkStackGettingStarted.pdf. But there I get only
Image 'FS0:\EFI\Netzwerk\ArpDxe.efi' loaded at D51A2000 - Success
MnpStart: MnpStartSnp failed, Already started.
MnpStart: MnpStartSnp failed, Already started.
MnpStart: MnpStartSnp failed, Already started.
MnpConfigReceiveFilters: Snp->ReceiveFilters failed, Not started.


So that sounds as it is already startet? Hm...


Regards,

Simon



FS0:\EFI\Netzwerk\> dh -d -v 16E
16E: D3264F98
ComponentName(D51B3F00)
DriverBinding(D51B3ED0)
ImageDevicePath(D3267018)
PciRoot(0x0)/Pci(0x1D,0x0)/USB(0x0,0x0)/USB(0x1,0x0)/HD(1,MBR,0x257E68F1,0x3E,0xE8C8A8)/\EFI\Netzwerk\MnpDxe.efi
LoadedImage(D40C3640)
Revision......: 0x00001000
ParentHandle..: D40C2818
SystemTable...: D5B48F18
DeviceHandle..: D4091318
FilePath......: \EFI\Netzwerk\MnpDxe.efi
PdbFileName...: c:\edk2\Build\NetworkPkg\DEBUG_VS2015x86\X64\NetworkPkg\MnpDxe\MnpDxe\DEBUG\MnpDxe.pdb
OptionsSize...: 0
LoadOptions...: 0
ImageBase.....: D51A9000
ImageSize.....: BAA0
CodeType......: EfiBootServicesCode
DataType......: EfiBootServicesData
Unload........: D51A92A0
Driver Name [16E] : MNP Network Service Driver
Driver Image Name : \EFI\Netzwerk\MnpDxe.efi
Driver Version : 0000000A
Driver Type : Bus
Configuration : NO
Diagnostics : NO
Managing :
Ctrl[161] : Intel(R) I210 Gigabit Network Connection
Child[16F] : MNP (Not started)

-----Ursprüngliche Nachricht-----
Von: Tomas Pilar <tpilar@solarflare.com>
Gesendet: Dienstag, 15. Oktober 2019 11:36
An: Buhrow, Simon <simon.buhrow@sieb-meyer.de>; discuss@edk2.groups.io
Betreff: Re: AW: [edk2-discuss] Establish network and run 'ping'

I also don't see the MnpDxe in your list, you'll need that one too.

Tom
________________________________________
From: Buhrow, Simon <simon.buhrow@sieb-meyer.de>
Sent: 15 October 2019 09:25
To: Tomas Pilar; discuss@edk2.groups.io
Subject: AW: AW: [edk2-discuss] Establish network and run 'ping'

Hi,

You are right, there is no SnpDxe loaded/installed. I double checked it but I really wrote all network relevant drivers in my first post.

I´m running the shell on a real System with Intel-Atom 64-Bit Processor and the mentioned Intel Network Device, it´s not a specific server type.

Point 6 let me assume, that the SnpDxe must be installed at a certain stage of driver initialization?!?
Nevertheless I compiled the NetworkPkg which gives me a SnpDxe.efi file (I did not make any changes in inf files).
When I load that file inside the uefi shell I do get a successful entry for my network device [161]:
Managed by :
Drv[16D] : Simple Network Protocol Driver

That looks fine to be. But does not change any behavior of ping or ifconfig command.

Furthermore as I understand the EFINetworkStackGettingStarted.pdf (https://sourceforge.net/projects/network-io/files/Documents/) there are more drivers needed to get SnpDxe run fine?!
But with the dh -d -v <num> cmd I can´t see any relations. Only that the SnpDxe is managing the Network Devices but no reference to any other Protocol/Driver.

Regards,

Simon



-----Ursprüngliche Nachricht-----
Von: Tomas Pilar <tpilar@solarflare.com>
Gesendet: Montag, 14. Oktober 2019 14:02
An: Buhrow, Simon <simon.buhrow@sieb-meyer.de>; discuss@edk2.groups.io
Betreff: Re: AW: [edk2-discuss] Establish network and run 'ping'

My current reading of what is going on is as follows:

1. The Intel driver looks like a normal driver-model-compliant edk2 driver.
2. The Intel driver correctly binds to the PCI device [153] and creates a network device with MAC address device path [161] 3. The network device has HIIConfigAccess installed so I reckon the HII forms were correctly installed and published as one would expect 4. The AIP has MediaState with EFI_SUCCESS which leads me to believe that the underlying driver works okay and can talk to device alright, also that you have link up 5. The driver seems to have installed NII_31, so you probably have an UNDI device with a legacy? PXE blob. This is very common.
6. The SimpleNetworkProtocol is not installed on the network device. This should have been done by a callback in SnpDxe as soon as the NII_31 was installed.
7. Given you don't have SNP installed on the device, the platform network did not bind to the device.

The problem seems to be in step 6.

What is the nature of the platform you are running in? Is it OVMF?
Is it a specific generation of a specific server type (say DELL 14th generation or HP 10th generation platform)?
When you list drivers in the UEFI shell, can you find SnpDxe or Simple Network Protocol Driver?

Cheers,
Tom
________________________________________
From: Buhrow, Simon <simon.buhrow@sieb-meyer.de>
Sent: 14 October 2019 12:31
To: Tomas Pilar; discuss@edk2.groups.io
Subject: AW: AW: [edk2-discuss] Establish network and run 'ping'

Hi Tom,

thanks a lot for your effort!

Yes, I think C0 has to manage 161. And it seems, that this is already done. Looking one step further, I get that C0 is managing the PciRoot[153] and it´s child the Network Device (see below attached outputs).

Hm,... so that should be fine, right?
So the ping command does fail because of another error?

It might be, that I have to bind/connect the other network stack drivers to C0? (e.g. B8 0000000A ? - - - - IP4 CONFIG Network Service Driver Ip4ConfigDxe, for detailed information see below). I´m not able to do so with the 'connect' command.
The network stack drivers should show any information at 'managing' entry to run fine, or?

Regards,

Simon




PS: I hope this does not lead to confusion, if so forget the following part:
Ifconfig and ping does not give me any console output when calling with corresponding parameters: e.g.
FS0:\> ifconfig -s eth0 static 192.168.51.1 255.255.255.0 192.168.51.0
FS0:\> ifconfig -l eth0
FS0:\> ping 192.168.51.2
With the same Hardware but another EFI-Shell version (one I downloaded from Internet and did not build via EDK2) I get the same device-driver relationship but still ifconfig and ping not working. But this time it throws an error: IfConfig: Locate protocol error - 'Ip4Config Protocol'


FS0:\> dh -d -v B8
B8: D40B5718
ComponentName2(D5320528)
ComponentName(D5320510)
DriverBinding(D53203C0)
ImageDevicePath(D40B5518)
Fv(5C60F367-A505-419A-859E-2A4FF6CA6FE5)/FvFile(26841BDE-920A-4E7A-9FBE-637F477143A6)
LoadedImage(D40B7640)
Name..........: Ip4ConfigDxe
Revision......: 0x00001000
ParentHandle..: D4EB1F18
SystemTable...: D5B48F18
DeviceHandle..: D4EA6B18
FilePath......: FvFile(26841BDE-920A-4E7A-9FBE-637F477143A6)
PdbFileName...: <null string>
OptionsSize...: 0
LoadOptions...: 0
ImageBase.....: D5320000
ImageSize.....: 4BE0
CodeType......: EfiBootServicesCode
DataType......: EfiBootServicesData
Unload........: D5320BC0
Driver Name [B8] : IP4 CONFIG Network Service Driver
Driver Image Name : FvFile(26841BDE-920A-4E7A-9FBE-637F477143A6)
Driver Version : 0000000A
Driver Type : <Unknown>
Configuration : NO
Diagnostics : NO
Managing : None

FS0:\> dh -d -v 153
153: D3E1CB98
E3161450-AD0F-11D9-9669-0800200C9A66(D33C6048)
DevicePath(D3E47A18)
PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
PCIIO(D3E49818)
Segment #.....: 00
Bus #.........: 02
Device #......: 00
Function #....: 00
ROM Size......: FC00
ROM Location..: D3E0C018
Vendor ID.....: 8086
Device ID.....: 1533
Class Code....: 00 00 02
Configuration Header :
86803315070010000300000210000000
000080F80000000001D00000000082F8
00000000000000000000000086800000
0000000040000000000000000A010000
Controller Name : PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
Device Path : PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
Controller Type : BUS
Configuration : NO
Diagnostics : NO
Managed by :
Drv[C0] : Intel(R) PRO/1000 6.6.04 PCI-E
Parent Controllers :
Parent[8B] : PciRoot(0x0)
Child Controllers :
Child[161] : Intel(R) I210 Gigabit Network Connection


FS0:\> dh -d -v C0
C0: D40A8018
SupportedEfiSpecVersion(D52AE548)
0x00020028
DriverHealth(D52AE550)
DriverConfiguration(D52AD920)
DriverDiagnostics2(D52AE5E8)
ComponentName2(D52AE530)
DriverDiagnostics(D52AE5D8)
ComponentName(D52AE518)
DriverBinding(D52AE848)
ImageDevicePath(D40A2E18)
Fv(5C60F367-A505-419A-859E-2A4FF6CA6FE5)/FvFile(95B3BF67-0455-4947-B92C-4BF437684E31)
LoadedImage(D40A6840)
Name..........: IntelGigabitLan
Revision......: 0x00001000
ParentHandle..: D4EB1F18
SystemTable...: D5B48F18
DeviceHandle..: D4EA6B18
FilePath......: FvFile(95B3BF67-0455-4947-B92C-4BF437684E31)
PdbFileName...: <null string>
OptionsSize...: 0
LoadOptions...: 0
ImageBase.....: D52AC000
ImageSize.....: 4F560
CodeType......: EfiBootServicesCode
DataType......: EfiBootServicesData
Unload........: D52C9A14
Driver Name [C0] : Intel(R) PRO/1000 6.6.04 PCI-E
Driver Image Name : FvFile(95B3BF67-0455-4947-B92C-4BF437684E31)
Driver Version : 06060400
Driver Type : Bus
Configuration : YES
Diagnostics : YES
Managing :
Ctrl[153] : PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
Child[161] : Intel(R) I210 Gigabit Network Connection




-----Ursprüngliche Nachricht-----
Von: Tomas Pilar <tpilar@solarflare.com>
Gesendet: Dienstag, 24. September 2019 17:16
An: Buhrow, Simon <simon.buhrow@sieb-meyer.de>; discuss@edk2.groups.io
Betreff: Re: AW: [edk2-discuss] Establish network and run 'ping'

Is the Parent device managed by something? Because I am surprised that a PCI device that it not managed/created by a driver has a MAC device path.

I assume that you want the driver C0 to drive your device? What does checking that driver handle return? Is that driver managing anything?

Tom



On 24/09/2019 14:11, Buhrow, Simon wrote:
Hi Tom,

thanks for that advice!
That´s really nice. But overall it says me the same: There is no driver for the Networkadapter...
And "connect" does not run successfully.

Regards,

Simon


FS0:\EFI\Netzwerk\> dh -d -v 161
161: D3D9D298
HIIConfigAccess(D33C9AF8)
AdapterInfo(D33C9B80)
Supported Information Types:
Guid[1] : D7C74207-A831-4A26-B1F5-D193065CE8B6 - gEfiAdapterInfoMediaStateGuid
MediaState: 0x00000000 - Success
Guid[2] : 25B6A2C7-410B-AD42-9145-11BFC750D202 - UnknownInfoType

34D59603-1428-4429-A414-E6B3B5FD7DC1(D33C9B10)
0E1AD94A-DCF4-11DB-9705-00E08161165F(D52AE570)
NetworkInterfaceIdentifier31(D33C6020)
E3161450-AD0F-11D9-9669-0800200C9A66(D33C6048)
DevicePath(D3D9D218)
PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)/MAC(0030D6156DDE,0x1)
51DD8B21-AD8D-48E9-BC3F-24F46722C748(D33C9B50)
Controller Name : Intel(R) I210 Gigabit Network Connection
Device Path : PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)/MAC(0030D6156DDE,0x1)
Controller Type : DEVICE
Configuration : NO
Diagnostics : NO
Managed by : <None>
Parent Controllers :
Parent[153] : PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
Child Controllers : <None>


-----Ursprüngliche Nachricht-----
Von: Tomas Pilar <tpilar@solarflare.com>
Gesendet: Dienstag, 24. September 2019 11:44
An: discuss@edk2.groups.io; Buhrow, Simon <simon.buhrow@sieb-meyer.de>
Betreff: Re: [edk2-discuss] Establish network and run 'ping'

Hi Simon,

A handy trick that might help you is interrogating handles using 'dh
-d -v <handle>' which gives you a lot of information about what's
connected and installed and driving what. Works on all handles
(drivers, devices,
etc.)

Cheers,
Tom

On 24/09/2019 10:29, Buhrow, Simon wrote:
Hi,

in order to pass files via network (using TFTP) from/to the UEFI-Shell, I´m trying to establish a network connection.
For that I want to check it using the ping command (Ifconfig and ping does not give me any console output when calling with corresponding parameters).

Looking for drivers and devices everything looks fine to me (see below parts of it).
Running 'connect' I don't get any entry about network adapter.
So I think I have to connect the Network Adapter with the corresponding drivers. But 'connect 161' fails.

What´s wrong? Do I misunderstand anything or is there just any step missing?

The Shell I use is the shell I get with the edk2-stable201908 when just compiling the ShellPkg.

Regards,

Simon


FS0:\> devices
...
161 D - - 1 0 0 Intel(R) I210 Gigabit Network Connection
...
FS0:\> drivers
...
93 0000000A ? - - - - TCP Network Service Driver TcpDxe
94 0000000A ? - - - - TCP Network Service Driver TcpDxe
95 0000000A ? - - - - UEFI PXE Base Code Driver UefiPxeBcDxe
96 0000000A ? - - - - UEFI PXE Base Code Driver UefiPxeBcDxe
97 0000000A ? - - - - IP6 Network Service Driver Ip6Dxe
99 0000000A ? - - - - UDP6 Network Service Driver Udp6Dxe
9A 0000000A ? - - - - DHCP6 Protocol Driver Dhcp6Dxe
9B 0000000A ? - - - - MTFTP6 Network Service Driver Mtftp6Dxe
B7 0000000A ? - - - - DHCP Protocol Driver Dhcp4Dxe
B8 0000000A ? - - - - IP4 CONFIG Network Service Driver Ip4ConfigDxe
B9 0000000A ? - - - - IP4 Network Service Driver Ip4Dxe
BA 0000000A ? - - - - MTFTP4 Network Service Mtftp4Dxe
BB 0000000A ? - - - - UDP Network Service Driver Udp4Dxe
C0 06060400 B X X 1 1 Intel(R) PRO/1000 6.6.04 PCI-E IntelGigabitLan
...
FS0:\> connect
Connect - Handle [149] Result Success.
Connect - Handle [14A] Result Success.
FS0:\> connect 161
Connect No drivers could be connected.



The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.
The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.
The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.
The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.

Join discuss@edk2.groups.io to automatically receive all group messages.