Commit Graph

96 Commits

Author SHA1 Message Date
Volker Ruppert
89654a4beb Prepared devices and timer code for HPET support
- PIT / CMOS: added methods to control IRQ generation (for HPET legacy mode).
- Added method for activating timer with nanosecond value.
- Removed unused declaration in the keyboard code.
- TODO: virtual timer code also needs to handle nanosecond values.
2017-04-15 20:31:07 +00:00
Volker Ruppert
73bcd4f8ca Added method to convert cpu ticks to nanoseconds (required for HPET).
I/O APIC: no need to call reset() in init().
2017-04-14 19:35:21 +00:00
Stanislav Shwartsman
b5a603c8c7 fixed %d->%u format found by cppcheck (patch by Maxim Derbasov) 2015-01-25 21:24:13 +00:00
Volker Ruppert
c7c92bb62b Fixed OPL chip detection.
- Increment timer counter before checking for overflow.
- Implemented ISA bus delay in the pc_system code and use it for the SB16.
  This makes OPL chip detection work at ips values > 4 Mips.
TODO: OPL chip should use wave output instead of MIDI (maybe port from DOSBox).
TODO: Use isa_bus_delay() for other legacy devices if required.
2014-12-31 12:27:32 +00:00
Stanislav Shwartsman
8d1e3b2ac1 Added statistics collection infrastructure in Bochs and
implemented important CPU statistics which were used for Bochs CPU model performance analysis.
old statistics code from paging.cc and cpu.cc is replaced with new infrastructure.

In order to enale statitics collection in Bochs CPU:

- Enable statistics @ compilation time in cpu/cpustats.h
- Dump statistics periodically by adding -dumpstats N into Bochs command line
2014-10-14 15:59:10 +00:00
Volker Ruppert
35c0724c50 Some work on the Bochs timer code
- add timer parameter to the save/restore tree
- change timer parameter type to Bit32u
- don't call timer function if set to NULL
- optimized loop that calls the timer functions
- minor cleanups
2014-01-24 17:22:34 +00:00
Stanislav Shwartsman
cc112767a2 bugfixes 2014-01-19 21:19:41 +00:00
Volker Ruppert
29d40bf9fe Added an optional device-specific Bit8u parameter to the timer structure.
A device can set it with setTimerParam() and read it in the timer handled using
triggeredTimerParam(). Simplified some timer handler by using these methods.
TODO: implement HD / CD seek timer
2014-01-17 18:25:13 +00:00
Volker Ruppert
5b9d937cc1 Make sure winsock.h is included in serial.cc and eth_win32.cc
Including winsock.h not needed in pc_system.cc
Don't specify architecture in gcc 4.7+ example
2013-11-01 16:26:59 +00:00
Stanislav Shwartsman
49bb3ba8f5 some cleanups and optimizations with new event interface 2012-10-03 15:49:45 +00:00
Volker Ruppert
d74762b984 - wx: use new log function name for the table of log modules
- added some more log function names
2012-02-23 17:16:35 +00:00
Volker Ruppert
de94b08a1a - class bx_list_c now contains a chained list of parameters. Removed the now
obsolete maxsize parameter from all lists.
2012-02-12 18:43:20 +00:00
Stanislav Shwartsman
44c3b65961 update CHANGES with fixed bug 2011-11-21 13:21:19 +00:00
Stanislav Shwartsman
76b742bd93 fixed timer breakpoint handling in internal debugger 2011-11-21 12:50:37 +00:00
Stanislav Shwartsman
c67338203c small fixups, code cleanup and reorganization 2011-09-05 17:14:49 +00:00
Stanislav Shwartsman
00981cd7a6 Adding Id and Rev property to all files 2011-02-24 22:05:47 +00:00
Stanislav Shwartsman
fcdadabbc4 Rewritten SMC handling, removed pageWriteStamp, now trace fetch chck only for pAddr 2011-01-12 18:49:11 +00:00
Stanislav Shwartsman
5fec008130 change copyright to bochs project 2009-12-04 20:02:12 +00:00
Stanislav Shwartsman
e023673f84 increase param list length 2009-10-23 08:37:56 +00:00
Stanislav Shwartsman
e3a3916211 add a20mask to restore state 2009-10-22 07:51:07 +00:00
Stanislav Shwartsman
7233fdf3c1 fixed non-printable character 2009-08-22 19:30:23 +00:00
Stanislav Shwartsman
2a268ecd5b small cleanup 2009-04-24 08:16:06 +00:00
Stanislav Shwartsman
4470c6a1c8 make ICACHE always enabled option and deprecate it in the configure script
Trace cache still can be turned off
2009-03-13 18:48:08 +00:00
Stanislav Shwartsman
9929e6ed78 - updated FSF address 2009-01-16 18:18:59 +00:00
Stanislav Shwartsman
dcb82ec4bf Optimize TLB flush methods 2008-08-13 21:51:54 +00:00
Stanislav Shwartsman
3fd4a09bbc preparations for future 64-bit physical address support 2008-05-10 20:39:53 +00:00
Stanislav Shwartsman
b1a7736514 Code cleanup 2008-04-06 18:27:24 +00:00
Stanislav Shwartsman
a459a64f3e whispace, tab2space, indent, dos2unix and other cleanups 2008-02-15 22:05:43 +00:00
Stanislav Shwartsman
e137560b14 Complete MONITOR/MWAIT implemntation (including monitoring of memory range)
Fixed PANIC in read/write Cr/Dr - should #UD with unkown register used
2007-11-01 18:03:48 +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
c719eecb8d Implemented Bochs benchmarking mode according to feature request
[ 1799946 ] benchmark mode
2007-09-22 15:59:41 +00:00
Volker Ruppert
f688701592 - cleanup() method added to reset the number of status items (cannot be done in
init() since the floppy indicators are register prior to gui init
- create framebuffer only if it doesn't exist
2006-09-17 20:37:28 +00:00
Volker Ruppert
4c1e82f18c - moved some parts of the timer init from the constructor to initialize()
- exit() method sets the number of registered timers back to 1 (or 2 if APIC
  is present)
- fixed some parameter types for save/restore
- debug message for timer registration added
- slowdown timer: exit method added to reset the timer id
2006-09-16 19:30:56 +00:00
Volker Ruppert
5dd0d64b11 - several changes for restart support in wx (not yet complete)
* don't initialize cpu specific parameters for the wx debugger if they already
    exist
  * separate siminterface method init_save_restore() added
  * old wx specific handling in quit_sim() removed
  * new bx_list_c method clear() deletes all parameters from the list
  * moved devices cleanup code from the pc_system to a new devices method exit()
  * pc_system init code now sets ticksTotal to 0
2006-09-07 18:50:51 +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
bc3cbb49b6 Write Virtual timer save/restore using macroses 2006-05-28 20:24:51 +00:00
Stanislav Shwartsman
286b89d763 Several x86-64 MSRs were not-initilized !
Fixed small save-restore bug in dma.cc
First step to make save-restore code look better (only several files processed for example)
2006-05-28 17:07:57 +00:00
Stanislav Shwartsman
8b0df8e99b Merge SAVE_RESTORE branch to CVS 2006-05-27 15:54:49 +00:00
Stanislav Shwartsman
7c1767d17a Partial sync with save-restore 2006-05-27 14:02:34 +00:00
Stanislav Shwartsman
99406e5f56 revert last change in pc_system.cc 2006-05-18 18:08:30 +00:00
Michael Brown
26056d930c The debugger can call activate_timer() on arbitrary timers, including
timer 0, so it should not be a fatal error.  Attempting to register,
unregister or deactivate timer 0 is still an error.
2006-05-18 13:42:22 +00:00
Stanislav Shwartsman
8db1de7124 - Fixed several issues, each cause to NullTimer function never be called, the method is required for icache correct functionalit
- Speed-up icache by correct purging of Icache entries
- Several new assertions for timers, to prevent bugs in future
2006-05-16 20:55:55 +00:00
Stanislav Shwartsman
f93ab35357 Flush TLB for all CPUs when memory mapping information changed by system (A20 change, PAM write or similar events) 2006-04-29 17:21:49 +00:00
Stanislav Shwartsman
e85a90a720 Remove cpu.h -> devices.cc dependancy, kill_bochs_request moved from CPU to bx_pc_system
Small Icache simplification and speedup
2006-03-14 18:11:22 +00:00
Stanislav Shwartsman
3ec2e9e7de Fixed segfault in SMP mode 2006-03-08 19:27:56 +00:00
Stanislav Shwartsman
7b6c2587a9 Now devices could be compiled separatelly from CPU
Averything that required cpu.h include now has it explicitly and there are a lot of files not dependant by CPU at all which will compile a lot faster now ...
2006-03-06 22:03:16 +00:00
Stanislav Shwartsman
fc0894bbe1 Enable A20 after system reset 2006-03-04 16:58:10 +00:00
Stanislav Shwartsman
b8984e7b1d Commit an assertion to pc_system_c constructor - check that no timers defined whne the construction is called. This is done to prevent the bug like critical APIC timer bug added in 2.2.5 and fixed in 2.2.6 release. 2006-01-31 20:43:24 +00:00
Stanislav Shwartsman
37eb82c69c Totally remove the cosimulation code from Bochs.
The Bochs anyway even doesn't compile if cosimulation configured enabled.
But in the same time the cosimulation code only disturbs to the future development of Bochs debugger, for example adding x86-64 functionality ...
For those of you who still may want to see the cosimulation code inside I put it in patch and upload it Bochs CVS patches folder. Read comments for the patch ! ----------------------------------------------------------------------
2006-01-25 22:20:00 +00:00
Volker Ruppert
c56b918a8e - code cleanup: removed unused defines and structure members
- removed plugin flag 'use_devmodel_interface' (all plugins are using it)
2006-01-20 19:12:03 +00:00