- renamed PCI Pseudo NIC bochsrc option to "pcipnic" (temporary hack should

be removed after next Bochs release)
- documentation updates
This commit is contained in:
Volker Ruppert 2012-07-11 21:03:59 +00:00
parent 24edf649eb
commit 82c65076cc
7 changed files with 76 additions and 69 deletions

View File

@ -8,11 +8,12 @@
# only available when the plugin device is loaded. The value "1" means to load
# the plugin and "0" will unload it (if loaded before).
#
# These plugins will be loaded by default: 'biosdev', 'extfpuirq', 'parallel',
# 'serial', 'speaker' and 'unmapped'.
# These plugins will be loaded by default (if present): 'biosdev', 'extfpuirq',
# 'gameport', 'iodebug','parallel', 'serial', 'speaker' and 'unmapped'.
#
# These plugins can be loaded on demand: 'e1000', 'es1370', 'gameport', 'iodebug',
# 'ne2k', 'pcidev', 'pcipnic', 'sb16', 'usb_ohci', 'usb_uhci' and 'usb_xhci'.
# These plugins are also supported, but they are usually loaded directly with
# their bochsrc option: 'e1000', 'es1370', 'ne2k', 'pcidev', 'pcipnic', 'sb16',
# 'usb_ohci', 'usb_uhci' and 'usb_xhci'.
#=======================================================================
#plugin_ctrl: unmapped=0, e1000=1 # unload 'unmapped' and load 'e1000'
@ -739,8 +740,7 @@ parport1: enabled=1, file="parport.out"
#=======================================================================
# ES1370:
# This defines the ES1370 sound emulation. The parameter 'enabled' controls the
# presence of the device. In addition to this, it must be loaded with 'plugin_ctrl'
# and assigned to a PCI slot. The 'wavedev' parameter is similar to the 'wave'
# presence of the device. The 'wavedev' parameter is similar to the 'wave'
# parameter of the SB16 soundcard. The emulation supports recording and playback
# (except DAC1+DAC2 output at the same time).
#
@ -892,18 +892,16 @@ private_colormap: enabled=0
# ne2k: mac=b0:c4:20:00:00:01, ethmod=slirp, script=/usr/local/bin/slirp, bootrom=ne2k_pci.rom
#=======================================================================
# pnic: Bochs/Etherboot pseudo-NIC
# pcipnic: Bochs/Etherboot pseudo-NIC
#
# Format:
# pnic: enabled=1, mac=MACADDR, ethmod=MODULE, ethdev=DEVICE, script=SCRIPT,
# pcipnic: enabled=1, mac=MACADDR, ethmod=MODULE, ethdev=DEVICE, script=SCRIPT,
# bootrom=BOOTROM
#
# The pseudo-NIC accepts the same syntax (for mac, ethmod, ethdev, script,
# bootrom) and supports the same networking modules as the NE2000 adapter.
# In addition to this, it must be loaded with 'plugin_ctrl' and assigned
# to a PCI slot.
#=======================================================================
#pnic: enabled=1, mac=b0:c4:20:00:00:00, ethmod=vnet
#pcipnic: enabled=1, mac=b0:c4:20:00:00:00, ethmod=vnet
#=======================================================================
# e1000: Intel(R) 82540EM Gigabit Ethernet adapter
@ -913,8 +911,7 @@ private_colormap: enabled=0
# bootrom=BOOTROM
#
# The E1000 accepts the same syntax (for mac, ethmod, ethdev, script, bootrom)
# and supports the same networking modules as the NE2000 adapter. In addition
# to this, it must be loaded with 'plugin_ctrl' and assigned to a PCI slot.
# and supports the same networking modules as the NE2000 adapter.
#=======================================================================
#e1000: enabled=1, mac=52:54:00:12:34:56, ethmod=slirp, script=/usr/local/bin/slirp
@ -960,8 +957,11 @@ keyboard_mapping: enabled=0, map=
# PCI:
# This option controls the presence of a PCI chipset in Bochs. Currently it only
# supports the i440FX chipset. You can also specify the devices connected to
# PCI slots. Up to 5 slots are available. These devices are currently supported:
# cirrus, e1000, es1370, ne2k, pcivga, pcidev, pcipnic, usb_ohci and usb_xhci.
# PCI slots. Up to 5 slots are available. For these combined PCI/ISA devices
# assigning to slot is mandatory if you want to emulate the PCI model: cirrus,
# ne2k and pcivga. These PCI-only devices are also supported, but they are
# auto-assigned if you don't use the slot configuration: e1000, es1370, pcidev,
# pcipnic, usb_ohci and usb_xhci.
#
# Example:
# pci: enabled=1, chipset=i440fx, slot1=pcivga, slot2=ne2k
@ -973,7 +973,7 @@ pci: enabled=1, chipset=i440fx
# This option controls the presence of the USB root hub which is a part
# of the i440FX PCI chipset. With the portX parameter you can connect devices
# to the hub (currently supported: 'mouse', 'tablet', 'keypad', 'disk', 'cdrom'
# 'hub' and 'printer'). NOTE: UHCI must be loaded with 'plugin_ctrl'.
# 'hub' and 'printer').
#
# The optionsX parameter can be used to assign specific options to the device
# connected to the corresponding USB port. Currently this feature is only used
@ -1013,8 +1013,7 @@ pci: enabled=1, chipset=i440fx
# USB_OHCI:
# This option controls the presence of the USB OHCI host controller with a
# 2-port hub. The portX option accepts the same device types with the same
# syntax as the UHCI controller (see above). The OHCI HC must be assigned to
# a PCI slot and loaded with 'plugin_ctrl'.
# syntax as the UHCI controller (see above).
#=======================================================================
#usb_ohci: enabled=1
#usb_ohci: enabled=1, port1=printer:usbprinter.bin
@ -1023,8 +1022,7 @@ pci: enabled=1, chipset=i440fx
# USB_XHCI:
# This option controls the presence of the experimental USB xHCI host controller
# with a 4-port hub. The portX option accepts the same device types with the
# same syntax as the UHCI controller (see above). The xHCI HC must be assigned
# to a PCI slot and loaded with 'plugin_ctrl'.
# same syntax as the UHCI controller (see above).
#=======================================================================
#usb_xhci: enabled=1

View File

@ -43,6 +43,8 @@ Changes after 2.5.1 release:
- Ported Intel(R) 82540EM Gigabit Ethernet adapter emulation from Qemu,
to enable configure with option --enable-e1000
- Added PCI network boot ROM support to all network adapters
- PCI
- added "auto-assign to PCI slot" feature for PCI-only devices
- VGA
- Major rewrite of the vga / cirrus code:
- vgacore (shared standard VGA emulation code)
@ -67,8 +69,10 @@ Changes after 2.5.1 release:
- Gui debugger now supported when using sdl gui on Windows
- Config interface
- The bochsrc option 'plugin_ctrl' is now used to load optional plugins
directly when parsing the config file or command line. See the bochsrc
- Added support for direct device plugin loading with bochsrc directive for
devices which have the same name for the plugin and config option.
- The bochsrc option 'plugin_ctrl' can now be used to load/unload optional
plugins directly when parsing the config file or command line. See the bochsrc
sample for supported devices.
- Moved bochsrc parsing / writing and config parameter handling for networking,
sound and USB devices to the plugin device code. The options are only
@ -76,6 +80,7 @@ Changes after 2.5.1 release:
- Added ability to set log action per device from .bochsrc.
- Added new command line option '-noconsole' to disable the console
window on Windows host.
- renamed PCI Pseudo NIC option to "pcipnic" (for direct plugin loading)
- Tools
- bxcommit: added support for converting growing to flat mode images
@ -117,7 +122,7 @@ Changes after 2.5.1 release:
[3493315] Changing VGA 9/8 dot mode causes screen corruption
- these S.F. feature requests were closed/implemented
[1251456] command line method to query boch for features
[1251456] command line method to query bochs for features
[3409396] sdl sound
[3519794] debugger's ability to save physical/linear memory dumps
[1429612] Idea how to speedup simulation - stack direct access

View File

@ -2080,6 +2080,13 @@ static int parse_line_formatted(const char *context, int num_params, char *param
PARSE_ERR(("%s: a bochsrc option needs at least one parameter", context));
}
#if BX_SUPPORT_PCIPNIC
// Temporary HACK for the PCI Pseudo NIC's bochsrc option name change
if (!strcmp(params[0], "pnic")) {
strcpy(params[0], "pcipnic");
}
#endif
if (!strcmp(params[0], "#include")) {
if (num_params != 2) {
PARSE_ERR(("%s: ignoring malformed #include directive.", context));

View File

@ -2904,12 +2904,13 @@ only available when the plugin device is loaded. The value "1" means to load
the plugin and "0" will unload it (if loaded before).
</para>
<para>
These plugins will be loaded by default: 'biosdev', 'extfpuirq', 'parallel',
'serial', 'speaker' and 'unmapped'.
These plugins will be loaded by default (if present): 'biosdev', 'extfpuirq',
'gameport', 'iodebug','parallel', 'serial', 'speaker' and 'unmapped'.
</para>
<para>
These plugins can be loaded on demand: 'e1000', 'es1370', 'gameport', 'iodebug',
'ne2k', 'pcidev', 'pcipnic', 'sb16', 'usb_ohci', 'usb_uhci' and 'usb_xhci'.
These plugins are also supported, but they are usually loaded directly with
their bochsrc option: 'e1000', 'es1370', 'ne2k', 'pcidev', 'pcipnic', 'sb16',
'usb_ohci', 'usb_uhci' and 'usb_xhci'.
</para>
</section>
@ -3895,10 +3896,9 @@ Examples:
es1370: enabled=1, wavedev=sdl # use SDL audio (if present) for output
</screen>
This defines the ES1370 sound emulation. The parameter 'enabled' controls the
presence of the device. In addition to this, it must be assigned to a PCI
slot. The 'wavedev' parameter is similar to the 'wave' parameter of the SB16
soundcard. The emulation supports recording and playback (except DAC1+DAC2
output at the same time).
presence of the device. The 'wavedev' parameter is similar to the 'wave'
parameter of the SB16 soundcard. The emulation supports recording and playback
(except DAC1+DAC2 output at the same time).
</para>
</section>
@ -4033,8 +4033,11 @@ Examples:
</screen>
This option controls the presence of a PCI chipset in Bochs. Currently it only
supports the i440FX chipset. You can also specify the devices connected to
PCI slots. Up to 5 slots are available. These devices are currently supported:
cirrus, e1000, es1370, ne2k, pcivga, pcidev, pcipnic, usb_ohci and usb_xhci.
PCI slots. Up to 5 slots are available. For these combined PCI/ISA devices
assigning to slot is mandatory if you want to emulate the PCI model: cirrus,
ne2k and pcivga. These PCI-only devices are also supported, but they are
auto-assigned if you don't use the slot configuration: e1000, es1370, pcidev,
pcipnic, usb_ohci and usb_xhci.
</para>
</section>
@ -4115,8 +4118,7 @@ code to the file if the file already existed. It would probably be nice to
overwrite the file instead, asking user first.
</para>
<note><para>
PCI support must be enabled and UHCI loaded with
<link linkend="bochsopt-plugin-ctrl">plugin_ctrl</link>.
PCI support must be enabled to use USB UHCI.
</para></note>
</section>
@ -4129,8 +4131,6 @@ Example:
This option controls the presence of the USB OHCI host controller with a
2-port hub. The portX option accepts the same device types with the same
syntax as the UHCI controller (see the <link linkend="bochsopt-usb-uhci">usb_uhci option</link>).
The OHCI HC must be assigned to a PCI slot and loaded with
<link linkend="bochsopt-plugin-ctrl">plugin_ctrl</link>.
</para>
</section>
@ -4143,8 +4143,6 @@ Example:
This option controls the presence of the experimental USB xHCI host controller
with a 4-port hub. The portX option accepts the same device types with the same
syntax as the UHCI controller (see the <link linkend="bochsopt-usb-uhci">usb_uhci option</link>).
The xHCI HC must be assigned to a PCI slot and loaded with
<link linkend="bochsopt-plugin-ctrl">plugin_ctrl</link>.
</para>
</section>
@ -4318,16 +4316,15 @@ version where this module was added.
</table>
</section>
<section><title>pnic</title>
<section><title>pcipnic</title>
<para>
Example:
<screen>
pnic: enabled=1, mac=b0:c4:20:00:00:00, ethmod=vnet
pcipnic: enabled=1, mac=b0:c4:20:00:00:00, ethmod=vnet
</screen>
To support the Bochs/Etherboot pseudo-NIC, Bochs must be compiled with the
--enable-pnic configure option. It accepts the same syntax (for mac, ethmod,
ethdev, script, bootrom) and supports the same networking modules as the NE2000 adapter.
In addition to this, it must be assigned to a PCI slot.
</para>
</section>
@ -4340,7 +4337,6 @@ Example:
To support the Intel(R) 82540EM Gigabit Ethernet adapter, Bochs must be compiled
with the --enable-e1000 configure option. It accepts the same syntax (for mac, ethmod,
ethdev, script, bootrom) and supports the same networking modules as the NE2000 adapter.
In addition to this, it must be assigned to a PCI slot.
</para>
</section>

View File

@ -1,5 +1,5 @@
.\"Document Author: Timothy R. Butler - tbutler@uninetsolutions.com"
.TH bochsrc 5 "10 Jun 2012" "bochsrc" "The Bochs Project"
.TH bochsrc 5 "11 Jul 2012" "bochsrc" "The Bochs Project"
.\"SKIP_SECTION"
.SH NAME
bochsrc \- Configuration file for Bochs.
@ -48,11 +48,12 @@ directly with this option and some of them install a config option that is
only available when the plugin device is loaded. The value "1" means to load
the plugin and "0" will unload it (if loaded before).
These plugins will be loaded by default: biosdev, extfpuirq, parallel,
serial, speaker and unmapped.
These plugins will be loaded by default (if present): 'biosdev', 'extfpuirq',
'gameport', 'iodebug','parallel', 'serial', 'speaker' and 'unmapped'.
These plugins can be loaded on demand: e1000, es1370, gameport, iodebug,
ne2k, pcidev, pcipnic, sb16, usb_ohci, usb_uhci and usb_xhci.
These plugins are also supported, but they are usually loaded directly with
their bochsrc option: 'e1000', 'es1370', 'ne2k', 'pcidev', 'pcipnic', 'sb16',
'usb_ohci', 'usb_uhci' and 'usb_xhci'.
Example:
plugin_ctrl: unmapped=0, e1000=1 # unload 'unmapped' and load 'e1000'
@ -782,10 +783,9 @@ one line in the actual bochsrc file.
.TP
.I "es1370:"
This defines the ES1370 sound emulation. The parameter 'enabled' controls the
presence of the device. In addition to this, it must be assigned to a PCI
slot. The 'wavedev' parameter is similar to the 'wave' parameter of the SB16
soundcard. The emulation supports recording and playback (except DAC1+DAC2
output at the same time).
presence of the device. The 'wavedev' parameter is similar to the 'wave'
parameter of the SB16 soundcard. The emulation supports recording and playback
(except DAC1+DAC2 output at the same time).
Examples:
es1370: enabled=1, wavedev="" # win32
@ -897,8 +897,11 @@ Example:
.I "pci:"
This option controls the presence of a PCI chipset in Bochs. Currently it only
supports the i440FX chipset. You can also specify the devices connected to
PCI slots. Up to 5 slots are available. These devices are currently supported:
cirrus, e1000, es1370, ne2k, pcivga, pcidev, pcipnic, usb_ohci and usb_xhci.
PCI slots. Up to 5 slots are available. For these combined PCI/ISA devices
assigning to slot is mandatory if you want to emulate the PCI model: cirrus,
ne2k and pcivga. These PCI-only devices are also supported, but they are
auto-assigned if you don't use the slot configuration: e1000, es1370, pcidev,
pcipnic, usb_ohci and usb_xhci.
Example:
pci: enabled=1, chipset=i440fx, slot1=pcivga, slot2=ne2k
@ -990,11 +993,11 @@ Examples:
ne2k: mac=b0:c4:20:00:00:01, ethmod=slirp, script=/usr/local/bin/slirp, bootrom=ne2k_pci.rom
.TP
.I "pnic:"
.I "pcipnic:"
To support the Bochs/Etherboot pseudo-NIC, Bochs must be compiled with the
--enable-pnic configure option. It accepts the same syntax (for mac, ethmod,
ethdev, script, bootrom) and supports the same networking modules as the NE2000
adapter. In addition to this, it must be assigned to a PCI slot.
adapter.
Example:
pnic: enabled=1, mac=b0:c4:20:00:00:00, ethmod=vnet
@ -1004,7 +1007,7 @@ Example:
To support the Intel(R) 82540EM Gigabit Ethernet adapter, Bochs must be compiled
with the --eanble-e1000 configure option. The E1000 accepts the same syntax
(for mac, ethmod, ethdev, script, bootrom) and supports the same networking
modules as the NE2000 adapter. In addition to this, it must be assigned to a PCI slot.
modules as the NE2000 adapter.
Example:
e1000: enabled=1, mac=52:54:00:12:34:56, ethmod=slirp, script=/usr/local/bin/slirp
@ -1091,8 +1094,7 @@ Example:
.I "usb_ohci:"
This option controls the presence of the USB OHCI host controller with a
2-port hub. The portX option accepts the same device types with the same
syntax as the UHCI controller (see above). The OHCI HC must be assigned to
a PCI slot and loaded with 'plugin_ctrl'.
syntax as the UHCI controller (see above).
Example:
usb_ohci: enabled=1
@ -1101,8 +1103,7 @@ Example:
.I "usb_xhci:"
This option controls the presence of the experimental USB xHCI host controller
with a 4-port hub. The portX option accepts the same device types with the same
syntax as the UHCI controller (see above). The xHCI HC must be assigned to
a PCI slot and loaded with 'plugin_ctrl'.
syntax as the UHCI controller (see above).
Example:
usb_xhci: enabled=1

View File

@ -44,7 +44,7 @@ const Bit8u pnic_iomask[16] = {2, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
void pnic_init_options(void)
{
bx_param_c *network = SIM->get_param("network");
bx_list_c *menu = new bx_list_c(network, "pnic", "PCI Pseudo NIC");
bx_list_c *menu = new bx_list_c(network, "pcipnic", "PCI Pseudo NIC");
menu->set_options(menu->SHOW_PARENT);
bx_param_bool_c *enabled = new bx_param_bool_c(menu,
"enabled",
@ -59,7 +59,7 @@ Bit32s pnic_options_parser(const char *context, int num_params, char *params[])
{
int ret, valid = 0;
if (!strcmp(params[0], "pnic")) {
if (!strcmp(params[0], "pcipnic")) {
bx_list_c *base = (bx_list_c*) SIM->get_param(BXPN_PNIC);
if (!SIM->get_param_bool("enabled", base)->get()) {
SIM->get_param_enum("ethmod", base)->set_by_name("null");
@ -74,7 +74,7 @@ Bit32s pnic_options_parser(const char *context, int num_params, char *params[])
if (valid == 0x04) {
SIM->get_param_bool("enabled", base)->set(1);
} else if (valid < 0x80) {
BX_PANIC(("%s: 'pnic' directive incomplete (mac is required)", context));
BX_PANIC(("%s: 'pcipnic' directive incomplete (mac is required)", context));
}
} else {
if (valid & 0x80) {
@ -102,13 +102,13 @@ int libpcipnic_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, ch
// add new configuration parameter for the config interface
pnic_init_options();
// register add-on option for bochsrc and command line
SIM->register_addon_option("pnic", pnic_options_parser, pnic_options_save);
SIM->register_addon_option("pcipnic", pnic_options_parser, pnic_options_save);
return 0; // Success
}
void libpcipnic_LTX_plugin_fini(void)
{
SIM->unregister_addon_option("pnic");
SIM->unregister_addon_option("pcipnic");
bx_list_c *menu = (bx_list_c*)SIM->get_param("network");
menu->remove("pnic");
delete thePNICDevice;

View File

@ -161,8 +161,8 @@
#define BXPN_XHCI_ENABLED "ports.usb.xhci.enabled"
#define BXPN_NE2K "network.ne2k"
#define BXPN_NE2K_ENABLED "network.ne2k.enabled"
#define BXPN_PNIC "network.pnic"
#define BXPN_PNIC_ENABLED "network.pnic.enabled"
#define BXPN_PNIC "network.pcipnic"
#define BXPN_PNIC_ENABLED "network.pcipnic.enabled"
#define BXPN_E1000 "network.e1000"
#define BXPN_E1000_ENABLED "network.e1000.enabled"
#define BXPN_SOUND_SB16 "sound.sb16"