<div>Guys, </div><div><br></div><div>Recently, I do research to port UNDI driver to our OS kernel, so that we will have an universal driver for any NIC device and have no need to develop specified driver for them. By the way, we can accept the big performance hit. For test, I load undi.zrom via Bochs. I got the error 0x006a (PXENV_STATUS_UNDI_INVALID_STATE), when I load undi.zrom to start with PXE mode using Bochs. Instead, I can success load pnic.zrom and start my image via PXE. </div>
<div><br></div><div>I have two questions: </div><div>1. As I know about UNDI (Universal Network Driver Interface) that UNDI should be only an _interface_, the ROM still need a true device driver to support UNDI (as following chart show). Am I right? If correct, I notice there is no true driver in undi.zrom, so what is undi.zrom used for? I googled a lot but without finding answers ..... anybody can give any comments?</div>
<div><br></div><div>               ____________NBP___________________________</div><div>               ___________________________________________</div><div>|--------------|PreBoot API| TFTP API | UDP API |    UNDI API   |</div>
<div>|              |___________|_________|_________| Device Driver |   for example, bochs emulate Pseudo NIC, so the ROM must contain Pseudo NIC driver. Right?</div><div>|           PXE                                                                        |</div>
<div>|------------------------------------------------------------------------------------------|</div><div>| BIOS                |                                                                |</div><div>|-------------------------|                     HW                                     |</div>
<div>|                                                                                          |</div><div>|------------------------------------------------------------------------------------------|<br clear="all"><br></div>
<div>2. when I load my OS kernel (with UNDI test module) on my computer, firstly, I searched for !PXE but obviously not found, so I try to search for UNDI ROM, and fortunately, I found it; then I try to load UNDI driver with the loader_offset in ROM, but strangely, I got the same error as above 0x006a!! I&#39;m puzzled .... Because it is a real machine, I don&#39;t have any message from ROM... Anyone have experience same as me or have any suggestion?</div>
<div><br></div><div><br></div><div>Looking forward any comments from you ...</div><div><br></div><div>Sincerely,</div><div>Sean</div><div><br></div><div><br></div><div>Here is the debug log for question#1</div><div>======================The debug log from serial port====================</div>
<div><div>ROM segment 0xd000 length 0x8000 reloc 0x00000000</div><div>Etherboot 5.4.4 (GPL) <a href="http://etherboot.org">http://etherboot.org</a></div><div>Drivers: &lt;UNDI&gt; UNDI   Images: NBI ELF PXE   Exports: PXE   </div>
<div>Protocols: DHCP TFTP </div><div>Relocating _text from: [00092080,0009f890) to [07ef27f0,07f00000)</div><div>Boot from (N)etwork or (Q)uit? N</div><div><br></div><div>Probing PCI nic...</div><div>00:00.00 [8086/1237] Class 0600</div>
<div>00:01.00 [8086/7000] Class 0601</div><div>00:01.01 [8086/7010] Class 0101</div><div>00:01.03 [8086/7113] Class 0680</div><div>00:02.00 [1234/1111] Class 0300</div><div>00:03.00 [FEFE/EFEF] Class 0200</div><div>Found UNDI ROM address 0x0000, irq: 11</div>
<div>UNDI Driver: probe </div><div>Hunting for PnP BIOS...none found</div><div>WARNING: No PnP BIOS found</div><div>allocate base mem - e820: 0xf81acef0</div><div>UNDI Driver: hunt pixies and undi_roms</div><div>Hunting for pixies...none found</div>
<div>Hunting for ROMs...found 55AA at 000d0000...ok</div><div>ROM contains undi.zrom 5.4.4 (GPL) <a href="http://etherboot.org">etherboot.org</a> by Etherboot</div><div>Located UNDI ROM supporting revision 2.1.0</div><div>
UNDI Driver: load ...</div><div>Installing UNDI driver code to 9e40:0000, data at 9d40:0000</div><div>E820Mangler: 0xf81acef0</div><div>in_call</div><div>I386 PXE EXPORT: pxe_in_call</div><div>PXE EXPORT: API call [opcode 4173]</div>
<div>[PXENV_UNDI_LOADER</div><div>Etherboot 5.4.4 (GPL) <a href="http://etherboot.org">http://etherboot.org</a></div><div>Drivers: &lt;UNDI&gt; UNDI   Images: NBI ELF PXE   Exports: PXE   </div><div>Protocols: DHCP TFTP </div>
<div>Relocating _text from: [0008e880,0009c090) to [07ee4fd0,07ef27e0)</div><div>&gt;&gt;&gt;&gt;&gt;Install PXE Stack ...</div><div>start undi start ...</div><div>PXENV_START_UNDI set PCI 00:03.00 ####]xxxx]Mangler: 0x4f7e907e</div>
<div>Unhook PXE stack failed </div><div> d285 err]xxUNDI loader call failed with status 0x006a</div><div>Hunting for ROMs...found 55AA at 000c0000...not a PCI ROM</div><div>...none found</div><div><br></div><div>00:03.00 [FEFE/EFEF] Class 0200</div>
<div>Probing isa nic...</div><div>[UNDI]UNDI Driver: probe </div><div>Hunting for PnP BIOS...none found</div><div>WARNING: No PnP BIOS found</div><div>allocate base mem - e820: 0xf81acef0</div><div>UNDI Driver: hunt pixies and undi_roms</div>
<div>Hunting for pixies...none found</div></div><div><br></div><div><br>-- <br>Face to sun<br>
</div>