Commit Graph

98 Commits

Author SHA1 Message Date
Volker Ruppert
19aa190d48 - it's not necessary to set up the physical address in the init code, since the
PARs are cleared by initial hardware reset. The physical address for incoming
  packets must be initialized by the guest's driver.
- added BX_INFO at completion of the physical address setup
2008-05-24 06:53:05 +00:00
Stanislav Shwartsman
a459a64f3e whispace, tab2space, indent, dos2unix and other cleanups 2008-02-15 22:05:43 +00:00
Stanislav Shwartsman
ae35b0276e white space cleanups and coding style changes 2008-01-26 22:24:03 +00:00
Stanislav Shwartsman
aecf53ac94 Fixed compilation errors 2007-11-01 18:14:28 +00:00
Stanislav Shwartsman
071c5c1a26 A lot of changes but everything is really trivial.
Make save/restore default feature, the configure option for save/restore removed from configure script and save/restore made available forever. All code now assume it is exists. Bochs save/restore tree previosly called "save_restore" renamed to "bochs" tree and it will be havily used everywhere, starting from save/restore and ending by various bochs debugger functions. I am going to rework debugger code to get rid of debug CPU access functions and use this "bochs" param tree instead
2007-09-28 19:52:08 +00:00
Stanislav Shwartsman
9d907b5f65 Try to specify everywhere the list size in bx_list_c constructor 2007-04-03 22:38:49 +00:00
Volker Ruppert
7ee4eb27af - fixed possible segfault in loopback mode #1 when using a transmit byte count
> memory size (changing variable types makes sanity checks work)
2007-03-10 15:17:31 +00:00
Stanislav Shwartsman
2f9e1bee68 fixed code duplication and comments 2007-02-03 17:56:35 +00:00
Volker Ruppert
1f5d311ca1 - fixed memory leaks found with valgrind when trying to start a second
simulation with wxBochs:
  * cpu: delete pageWriteStampTable array
  * devices: simplified setup of initial default i/o handlers
  * ne2k: delete ethernet module in destructor
2006-09-20 20:52:23 +00:00
Volker Ruppert
190b9391cf - delete the device object in the plugin_fini() function of each plugin device
(TODO: find a way to call plugin_fini() for non-core devices if plugins are
   disabled)
- set the device pointers back to stubs after unloading plugins
- added debug message "Exit" in all device plugin destructors
2006-09-10 17:18:44 +00:00
Stanislav Shwartsman
fee48d74e0 Avoid doing strdup for param name field - most of the strdups elliminated ! 2006-05-29 22:33:38 +00:00
Stanislav Shwartsman
8b0df8e99b Merge SAVE_RESTORE branch to CVS 2006-05-27 15:54:49 +00:00
Volker Ruppert
6a299e61a7 - get rid of the unused description field of shadow bool and data parameters
(new/modified constructor)
- new constructor for bx_list_c objects without title
- shadow parameter bitmasks fixed
- functions bx_sr_before_save_state() and bx_sr_after_restore_state() prepared
- ne2k.cc: reset behaviour fixes
- sb16: some variable types changed
2006-05-14 15:47:37 +00:00
Volker Ruppert
9340f3b3f8 - partial sync with BRANCH_SAVE_RESTORE_3 (hardware save/restore not present yet)
* changed data format of text files for save/restore (looks like C/C++ structures,
    similar to the format used in old save/restore branches)
  * don't set the initial value of shadow bool parameters
  * don't set the initial value of bool parameters twice
  * cpu/init.cc: missing #undef added
  * ne2k.cc: variable tx_timer_active was never set to 1 (type now bx_bool)
  * floppy.cc: missing initialization of the 'eot' array in reset() added
  * pic.h: type of member 'byte_expected' changed to Bit8u
  * pit_wrap.h: unused members removed
2006-05-01 18:24:47 +00:00
Stanislav Shwartsman
4c3f229ff1 This should fix problem with non-PCI ne2k device 2006-03-08 19:28:37 +00:00
Stanislav Shwartsman
77653bcf3d More indent and C++ style changes (explicitly write virtual before virtual desctructors).
The PCI read/write handlers written in new C++ - more flexible and easy-to-understand
2006-03-07 21:11:20 +00:00
Volker Ruppert
dafe33fc84 - network options rewritten to a parameter tree
- disable usb options if not compiled with usb support
- usb and network dependency list created with menu->clone()
- load usb plugin only if at least one hub is present
- remaining options prepared for rewrite
- proposed parameter tree updated
2006-03-02 20:13:14 +00:00
Volker Ruppert
d4d4cbf6dd - display and interface options rewritten to a parameter tree
- new enum parameter method get_selected() returns a pointer to the selected string
- proposed parameter tree updated
2006-02-21 21:35:09 +00:00
Volker Ruppert
6311fface8 - pci options rewritten to a parameter tree
- proposed parameter tree updated
- pci presence flag stored in the memory code
2006-02-19 21:35:50 +00:00
Volker Ruppert
28e36a2671 - the CR start bit has no meaning in the PCI version
- set CR TXP bit during transmit operation
- improved various debug and error messages
2006-01-28 20:18:18 +00:00
Volker Ruppert
7f714b568a - read support for 8029 ID and config registers added 2005-12-24 22:35:04 +00:00
Volker Ruppert
fa996ca9de - don't register i/o and memory address ranges during PCI probe
- PCI devices now report real base address changes only
- writes to the high word of i/o base addresses now permitted (for PCI probe)
2005-11-15 17:19:28 +00:00
Volker Ruppert
a434503a02 - PCI command register behaviour fixes in some devices 2005-09-23 19:31:12 +00:00
Volker Ruppert
ae3621fb5f - removed temporary PCI base address initialization in the reset() functions
- removed obsolete parameters for usb1 and pnic (now assigned by the PCI BIOS)
- PCI base address register mechanism now leaves the flags untouched
- missing reset of pnic options added
2005-09-22 21:12:26 +00:00
Volker Ruppert
9bc26a67d5 - PCI IDE: base address area must be read-only except BM-DMA base
- PCI devices: debug messages fixed
2005-09-18 09:01:05 +00:00
Volker Ruppert
8bd2d27e29 - update irq level after IMR write
- attempt to set IMR bit 7 no longer causes a panic
- fixed multicast/broadcast packet detection
- small code cleanup
2005-05-26 09:24:28 +00:00
Volker Ruppert
dced2eeaf5 - fixed Solaris 9 ne2k probe (SF patch #1093796 by Nigel Horne)
- fixed indent mode in function write_cr()
- removed unused logging stuff in function write_cr()
2005-01-01 09:31:38 +00:00
Volker Ruppert
31e4cb1fee - dependencies between NE2k and PCI Pseudo-NIC removed from the config interface
- menu and option names for the network configuration fixed
- NIC init code passes script name to ethernet module init code
- VDE module added to the list of ethernet modules
- constant BX_PACKET_BUFSIZE moved to eth.h
2004-10-07 17:38:03 +00:00
Volker Ruppert
b5e4d0666b - temporary pci irq initialisation removed from pci devices (now done in the
PCI BIOS)
2004-09-25 22:15:02 +00:00
Volker Ruppert
8d72800b09 - don't modify the destination MAC address if it's the broadcast address (tap and tuntap)
- definition of the broadcast MAC address moved to eth.h
- removed eth_tap.cc description from eth_tuntap.cc
- disabled eth_tap.cc packet logging
2004-09-18 12:35:13 +00:00
Volker Ruppert
11c81a46eb - temporary PCI IRQ initialisation fixed (should be done by the PCI BIOS) 2004-09-10 11:54:46 +00:00
Volker Ruppert
8d585dc813 - removed lowlevel includes from iodev.h and device headers to reduce dependencies
- fixed some warnings
2004-09-05 10:30:19 +00:00
Volker Ruppert
d06c80cee3 - changed all iodev config macros to BX_SUPPORT_xxx
- removed incorrect SDL/ prefix from include paths (patch from Robin KAY)
2004-08-06 15:49:55 +00:00
Volker Ruppert
1c3d8436c6 - compilation fixes for ne2k with pci disabled (patch from suzu) 2004-07-26 16:04:31 +00:00
Volker Ruppert
c9a113d623 - new functions for pci base address handling for memory and i/o space 2004-07-11 20:38:48 +00:00
Volker Ruppert
c6834907ad - pci irq routing fixed and initialization added (BUG: ne2k-pci only works with
irq 11 in Win95)
- bios: irq routing table fixed and updated for 5 slots
- ne2k: unnecessary reset call in init() removed
- usb: don't execute reset if disabled
2004-07-04 17:10:05 +00:00
Volker Ruppert
8edad22893 - pci irq routing implemented (used by ne2k-pci)
- ne2k: fixed word writes to page 0 reg 0x0f
2004-07-01 22:18:20 +00:00
Volker Ruppert
ae180cc46a - pci slot register mechanism added
* up to 5 slots can be specified with the 'i440fxsupport' config option
  * the pci slot number are hardwired to pci device numbers
  * the 'devfunc' value is returned the calling device (useful for multi-function
    devices)
  * the core of the i440FX chipset is hardwired to pci device 1 + 2; usb is still
    optional and appears at device 1, function 2
- ne2k: enable pci features if connected to a pci slot
- ne2k: asic data port supports 32-bit access if ne2k-pci is active
- pci2isa: improved error messages for ELCR1 and ELCR2
2004-06-29 19:24:34 +00:00
Volker Ruppert
2b16344b70 - NE2000 PCI support added (device appears as a RealTec 8029)
* PCI initialization and configuration space handling added
  * ASIC data port now supports 32-bit r/w if PCI is present
  * PCI device will be enabled if the requested base address is >= 0x1000
- ne2k: 8390 command register is now present on all pages
- ne2k: some panics changed to errors, debug messages improved
- PCI host bridge is now a core plugin (if enabled) and initialized earlier
2004-06-27 18:23:00 +00:00
Stanislav Shwartsman
5873b26a82 Speed up compilation process.
bochs.h already not include iodev.h which reduces compilation dependences for almost all cpu and fpu files, now cpu files will not be recompiled if iodev includes was changed
2004-06-19 15:20:15 +00:00
Christophe Bothamy
381d2ce460 - apply [ 903465 ] SEGV in iodev/ne2k.cc line 1211 on Alpha architecture by Christian Lestrade 2004-05-01 14:05:07 +00:00
Volker Ruppert
c1808b14f4 - allow 16 bit writes to page 0 (patch from Kenneth Stailey) 2004-01-19 17:53:53 +00:00
Volker Ruppert
b7767cc6ee - DCR loopback bit fixed: bit 3 clear means loopback mode, so subtracting 8 was
wrong. Now the bits are working right, but loopback is still not present.
- loopback should be active if DCR is in loopback mode and TCR loop mode is > 0
- reading the FIFO is only valid in loopback mode (causes a BX_ERROR for now)
2003-12-25 16:58:17 +00:00
Volker Ruppert
ca60988fd9 - wx: NetConfigDialog replaced by a new version using ParamDialog
- parameter for the ethernet module must be of type bx_param_enum_c, since we
  have a list of valid modules
2003-08-25 16:46:18 +00:00
Volker Ruppert
bcdcf42bdd - io_len mask in i/o register functions implemented (1 = 8bit, 2 = 16bit, 4 = 32bit).
Unallowed cases are now handled in devices.cc and cause a BX_ERROR.
- io_len mask fixed and unnecessary io_len checks removed in
  * devices.cc
  * extfpuirq.cc
  * gameport.cc
  * ne2k.cc
  * pit.cc
  * pit_wrap.cc (i/o register function calls replaced by DEV_* macro calls)
- TODO: implement this in all other devices
2003-07-31 12:04:48 +00:00
Volker Ruppert
c496962184 - the NE2000 driver for MS-DOS writes a 16 bit value to page 0 reg 5. Now the
low-byte is written to this register and the high-byte is ignored.
2003-07-30 10:45:13 +00:00
Volker Ruppert
d1652093ac - applied some parts of the patch from Andrew Zabolotny <zap@cobra.ru>
* changed all %ll format descriptions to FMT_LL macro so that
    Microsoft Visual C works correctly (it uses %I64)
  * missing type conversions added
  * cdrom.cc: variable types for win32 fixed
  * removed some unused variables in eth_win32.cc and harddrv.cc
  * added missing includes in make_cmos_image.c and niclist.c
2003-06-07 19:16:55 +00:00
Volker Ruppert
fb5d0a939d - hardware reset must be called after initializing everything else (bug found
with valgrind)
2003-05-24 10:50:19 +00:00
Gregory Alexander
a510ce56ee Add configurable option to never completely fill the buffer rings.
It's not clear what the correct behavior is in that case, (we
clearly don't currently handle it correctly) so
simply avoiding it is the easiest thing to do.  As such, this
option is ON by default.
2003-05-20 15:01:34 +00:00
Christophe Bothamy
ffb9fcf69e - fix ne2k to work with grub. The remote-DMA check defaults to a safe
value instead of silently rejecting it. (patch from Keir Fraser)
2003-04-26 14:07:58 +00:00