- added new bochsrc option 'pci' that should replace 'i440fxsupport'

This commit is contained in:
Volker Ruppert 2011-07-10 15:40:19 +00:00
parent 22a4d0c097
commit a08af64850
2 changed files with 42 additions and 10 deletions

View File

@ -853,16 +853,16 @@ keyboard_mapping: enabled=0, map=
#user_shortcut: keys=ctrl-alt-del
#=======================================================================
# I440FXSUPPORT:
# This option controls the presence of the i440FX PCI chipset. You can
# also specify the devices connected to PCI slots. Up to 5 slots are
# available now. These devices are currently supported: cirrus, es1370, ne2k,
# pcivga, pcidev, pcipnic and usb_ohci.
# 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, es1370, ne2k, pcivga, pcidev, pcipnic, usb_ohci and usb_xhci.
#
# Example:
# i440fxsupport: enabled=1, slot1=pcivga, slot2=ne2k
# pci: enabled=1, chipset=i440fx, slot1=pcivga, slot2=ne2k
#=======================================================================
i440fxsupport: enabled=1
pci: enabled=1, chipset=i440fx
#=======================================================================
# USB_UHCI:
@ -915,6 +915,15 @@ i440fxsupport: enabled=1
#usb_ohci: enabled=1
#usb_ohci: enabled=1, port1=printer:usbprinter.bin
#=======================================================================
# 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.
#=======================================================================
#usb_xhci: enabled=1
#=======================================================================
# CMOSIMAGE:
# This defines image file that can be loaded into the CMOS RAM at startup.

View File

@ -3062,11 +3062,25 @@ static int parse_line_formatted(const char *context, int num_params, char *param
PARSE_WARN(("%s: unknown parameter '%s' for usb_xhci ignored.", context, params[i]));
}
}
} else if (!strcmp(params[0], "i440fxsupport")) {
} else if ((!strcmp(params[0], "pci")) ||
(!strcmp(params[0], "i440fxsupport"))) {
// new option for future extensions
char tmpdev[80];
int enabled = -1;
int chipset = -1;
if (!strcmp(params[0], "i440fxsupport")) {
chipset = 1;
PARSE_WARN(("%s: 'i440fxsupport' will be replaced by new 'pci' option.", context));
}
for (i=1; i<num_params; i++) {
if (!strncmp(params[i], "enabled=", 8)) {
SIM->get_param_bool(BXPN_I440FX_SUPPORT)->set(atol(&params[i][8]));
enabled = atol(&params[i][8]);
} else if (!strncmp(params[i], "chipset=", 8)) {
if (!strcmp(&params[i][8], "i440fx")) {
chipset = 1;
} else {
PARSE_ERR(("%s: pci: unknown chipset '%s'", context, &params[i][8]));
}
} else if ((!strncmp(params[i], "slot", 4)) && (params[i][5] == '=')) {
slot = atol(&params[i][4]);
if ((slot > 0) && (slot < 6)) {
@ -3076,7 +3090,16 @@ static int parse_line_formatted(const char *context, int num_params, char *param
BX_ERROR(("%s: unknown pci slot number ignored.", context));
}
} else {
PARSE_ERR(("%s: i440fxsupport: unknown parameter '%s'.", context, params[i]));
PARSE_ERR(("%s: pci: unknown parameter '%s'.", context, params[i]));
}
}
if (enabled == 0) {
SIM->get_param_bool(BXPN_I440FX_SUPPORT)->set(0);
} else if (enabled == 1) {
if (chipset == 1) {
SIM->get_param_bool(BXPN_I440FX_SUPPORT)->set(1);
} else {
PARSE_ERR(("%s: pci: chipset not specified", context));
}
}
} else if (!strcmp(params[0], "pcidev")) {