Page 1 of 1

PCI and ne2k on bochs

Posted: Sun Sep 13, 2009 3:52 pm
by AlfaOmega08
Hello everyone.
Time has come for me to work on network :D
So I sow that on bochs there is a ne2k compatible card.
Looking into the Linux source I discovered that I needed PCI enumeration first.
I just figured out how to enumerate PCI devices and functions :lol: .
On Bochs I got this:
Bus 0, device 0, function 0: 0x8086:0x1237
Bus 0, device 1, function 0: 0x8086:0x7000
Bus 0, device 1, function 1: 0x8086:0x7010
Bus 0, device 1, function 3: 0x8086:0x7113

Where the first hex is the Vendor ID and the second is the Device ID.
AFAIK 0x8086 stands for Intel Corp. and on linux the list of ne2k compatible card is:
{ 0x10ec, 0x8029, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_RealTek_RTL_8029 },
{ 0x1050, 0x0940, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Winbond_89C940 },
{ 0x11f6, 0x1401, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Compex_RL2000 },
{ 0x8e2e, 0x3000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_KTI_ET32P2 },
{ 0x4a14, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_NetVin_NV5000SC },
{ 0x1106, 0x0926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Via_86C926 },
{ 0x10bd, 0x0e34, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_SureCom_NE34 },
{ 0x1050, 0x5a5a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Winbond_W89C940F },
{ 0x12c3, 0x0058, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Holtek_HT80232 },
{ 0x12c3, 0x5598, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Holtek_HT80229 },
{ 0x8c4a, 0x1980, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Winbond_89C940_8c4a },

Shouldn't the device be shown during the enumeration? Or am I missing something?

Thanks in advance

Re: PCI and ne2k on bochs

Posted: Sun Sep 13, 2009 4:20 pm
by pcmattman
You need something like:

Code: Select all

i440fxsupport: enabled=1, slot1=ne2k
In your bochsrc to be able to get the NE2K on the PCI bus, otherwise it's emulated as an ISA card.

Re: PCI and ne2k on bochs

Posted: Sun Sep 13, 2009 4:24 pm
by AlfaOmega08
Uhm I got a bochs panic with this error:
[PCI ] Unknown plugin 'ne2k' at PCI slot #1
Before anyone asks if I have --enabled-ne2k:
00000000000i[ ] NE2000 support: yes

Bochs version is 2.4.1

Thanks for your suggestion

Re: PCI and ne2k on bochs

Posted: Sun Sep 13, 2009 4:27 pm
by pcmattman
It seems that a quick Google points to needing something like:

Code: Select all

ne2k: enabled=1 [rest of your ne2k line]

Re: PCI and ne2k on bochs

Posted: Sun Sep 13, 2009 4:30 pm
by AlfaOmega08
Yes... Thank you.
I found it in the bochsrc.txt file and in the Bochs options just a second before your reply.