Commit Graph

2459 Commits

Author SHA1 Message Date
Bryce Denney
e17ae7dee8 - turn on guest2host tlb for beos 2002-10-02 12:43:01 +00:00
Bryce Denney
698da0c303 - compile beos-specific cdrom file if $target says beos, rather than if
they used --with-beos.
2002-10-02 12:11:25 +00:00
Kevin Lawton
1aeb4c71b1 Updated the alternate pc_system.{cc,h} files to add the ID string
parameter so we know which source modules are requesting
  timers.  Also added a SpewPeriodicTimerInfo #define in
  case somebody is still having guest OS hang problems.  If
  enabled, this macro will force a brief dump of the active timers
  list to the bochsout.txt file, every 5Million ticks.
  If the lowest timer's period is extremely low, that would be
  suspect.
2002-10-02 05:54:34 +00:00
Kevin Lawton
83c9d266d0 Added a field on register_timer() so that a name identifying the
requesting source can be registered as well.  Otherwise, there
  is no way to know which source modules are requesting
  suspect frequencies which are too high.
2002-10-02 05:16:01 +00:00
Bryce Denney
7a5b4377fb - replace new preprocessor directive "#panic" with call to BX_INFO and
UndefinedOpcode().
2002-10-02 04:01:45 +00:00
Bryce Denney
c901d60d00 - only XFlush if display has been opened already 2002-10-02 02:52:24 +00:00
Bryce Denney
2f502adc45 - add --subsystem,windows -mwindows to link line for win32 compile with
wxwindows
2002-10-02 00:53:20 +00:00
Bryce Denney
e377b6dd5d - when building on for win32, add a "windres" command to build the
resources into wxbochs_resources.o, and link them in.
- modified: Makefile.in configure.in configure
2002-10-02 00:09:49 +00:00
Bryce Denney
4c9776fb96 - add -lwinmm to the link lines anytime you use --enable-sb16=win. Now
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
  placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
  etc.
- solve compile problems when building bximage, niclist, and any other
  console based program.  The compile flags returned by wx-config and
  sdl-config did strange things to these console programs, for example
  redefining main to SDL_main.  Because I wanted to use the
  configure-generated CFLAGS to compile the programs, but I wanted to
  avoid including GUI specific compile options, I split up the configure's
  @CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
  @CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@.  All programs in the
  Bochs binary will use both, but the console programs will just use
  @CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
  SDL_CFLAGS and WX_CXXFLAGS.  These values are included in CFLAGS and
  CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
2002-10-01 23:37:50 +00:00
Bryce Denney
0d8e31b672 - solve SDL specific build problem: in win32, SDL redefines main to SDL_main.
Include SDL.h so that the C language prototype can be found.  Otherwise
  SDL_main() will get its name mangled and not match what the SDL library is
  expecting.
2002-10-01 23:34:52 +00:00
Kevin Lawton
a11e637ec0 Added an alternative set of pc_system.{cc,h} files for
testing.  Please try these out if you want to help test
  them or if your guest OS appears to be hanging with
  no apparent activity.  The old bochs internal timer
  framework is broken in several areas.

  I put these in the patches directory for now.  After
  a 'make all-clean', you can do something like:

    mv pc_system.cc pc_system.cc-old
    mv pc_system.h  pc_system.h-old
    cp patches/pc_system.cc-kpl .
    cp patches/pc_system.h-kpl .
    make

  And let me know if A) they work for you and B) if they help
  the hanging problem.
2002-10-01 21:27:34 +00:00
Bryce Denney
85ca569ef4 - fix a very stupid memory leak that I added to the the text mode debugger
recently.  oops.
2002-10-01 13:40:05 +00:00
Peter Tattam
562d6b55dd fixed a formatting problem for debug output for external debugger. 2002-10-01 07:13:00 +00:00
Peter Tattam
9078c5fc06 fixed extdb.cc to work in default IA32 bochs 2002-10-01 06:47:06 +00:00
Peter Tattam
94b2dd2bc8 Cleanup of extdb.* files. included in right places now. 2002-10-01 04:13:12 +00:00
Bryce Denney
3fa708ea7a - fix all printfs so that they can handle 64bit integers
- use "long" for the second arg to fseek.
2002-09-30 22:33:52 +00:00
Bryce Denney
ef77eb0ad3 - only register the parameters the first time init is called, to fix bug
[ 613975 ] wxWindows: params redefined on restart
2002-09-30 22:23:57 +00:00
Bryce Denney
be4005269b - many parameters in cpu were being redefined if you stop simulation and
restart another one in wxWindows.  Fixed that.  Also, on restart, the
  apic id's left over from the first run were causing panics.  Fixed that.
- modified: main.cc cpu/apic.cc cpu/cpu.h cpu/init.cc
2002-09-30 22:18:53 +00:00
Bryce Denney
3f9e3ee12d - comment out a few very frequent debug messages
- in CopyParamToGui and CopyGuiToParam, ignore list parameters instead of
  printing a warning
2002-09-30 22:15:20 +00:00
Bryce Denney
e093bec99c - Stu's test for ADD_FLAGS was not working quite right, because the []'s
were being removed by autoconf.  I changed it to use
     if test CONDITION; then ... fi
  instead of
     if [ CONDITION ]; then ... fi
2002-09-30 20:31:14 +00:00
Kevin Lawton
298c1d4ac5 Documented a number of the functions/variables in pc_system.h and
rearranged things to put all the timer related stuff together
  for sanity.
2002-09-30 17:32:34 +00:00
Kevin Lawton
1e5343b421 As a 1st effort to understand/debug the timer code, I cleanup
up pc_system.h.  Moved all variables under the private: section,
  as well as a few member functions.  The string instructions
  were accessing a field directly (only reads), so I indirected
  that via an inline member function for better abstraction.
2002-09-30 16:43:59 +00:00
Bryce Denney
63a7680b4c - add AC_SYS_LARGEFILE test
- also add note about the special largefiles test that wxwindows does
2002-09-30 16:24:25 +00:00
Bryce Denney
e658f463ab - remove pthread check for wxwindows. This used to be needed to add the
"-pthread" flag to the link line, but as of wxWindows 2.3.3 their
  wx-config script adds it for us.  Given the keyboard mapping improvements
  in wx 2.3.3, I don't expect to support any previous version.
2002-09-30 14:35:34 +00:00
Bryce Denney
d92ccf70ae - apply patch from Stu Grossman <grossman@juniper.net> that changes
harddrv code to use off_t for file offsets.  If off_t is going to
  require a configure test, I'll add it later.
2002-09-30 14:19:46 +00:00
Bryce Denney
1387109e7b From: Stu Grossman <grossman@juniper.net>
To: bochs-developers@lists.sourceforge.net
Subject: [Bochs-developers] Fix for configure.in bug

This patches fixes a bug in configure.in which prevents configure from setting
default values for CFLAGS and CXXFLAGS.  Normally, the way autoconf builds
configure, it will set default values for CFLAGS and CXXFLAGS of `-g -O2'.
But, if the user specified them (via the environment), it won't touch them.

The clause in configure.in that tries to set platform-specific flags breaks
this because it always assigns a value (usually blank for most platforms),
which fools the defaulting mechanism later on.
2002-09-30 14:11:21 +00:00
Bryce Denney
fb54f552fa - removing; patch has been applied now 2002-09-30 14:04:26 +00:00
Bryce Denney
ea20513e19 - convert to unix newlines so that patch is happy 2002-09-30 14:03:53 +00:00
Bryce Denney
169332660a - apply patch.carbon-jusansai from Chris Thomas. This is associated with
patch [ 549248 ] Fix Carbon key & menu handling at
  http://sourceforge.net/tracker/index.php?func=detail&group_id=12580&atid=312580&aid=549248
2002-09-30 14:03:20 +00:00
Bryce Denney
ea0874aa4a - add Carbon patch from Chris Thomas (jusansai) 2002-09-30 13:56:51 +00:00
Kevin Lawton
af31c4583b More merging of modRM==11b if () clauses in logical*.cc functions,
and code cleanup.
2002-09-30 03:37:42 +00:00
Kevin Lawton
00c14e4efe Added ./configure option --enable-all-optimizations which turns on
all available optimizations in one shot.

Finished one last case of an instruction which could but didn't use
  the Read-Modify-Write variants of access.cc functions.

Started going through the integer instructions, merging obvious cases
  where there are two "if (modrm==11b) {" clauses and very little
  action in between, and cleaning up the aweful indentation leftover
  from many years ago when those instructions were implemented using
  cut-and-paste.  We may get a little extra performance out of these
  mods, but they'll also be easier after I'm finished to enhance
  with asm() statements to knock out the lazy flags processing on x86.
2002-09-30 02:02:06 +00:00
Kevin Lawton
67721c48f4 The convience functions protected_mode(), v8086_mode() and real_mode()
now simply return a cached value which is set upon mode changes.
  The biggest problem was protected_mode() which did something like:

    return CR0.PM && ! EFLAGS.VM

  This adds up when it was being executed many times in branch functions
  etc.  Now, cached values are set and sampled instead.
2002-09-29 22:38:18 +00:00
Kevin Lawton
a5537449cd Split out reg-reg and reg-memory cases for a few other high-profile
instructions, mainly variants of MOV.  Had to update fetchdecode64
  to keep it inline with the 32-bit mods.
2002-09-29 19:21:38 +00:00
Stanislav Shwartsman
60505911c3 The patch was already committed to main trunk 2002-09-29 18:43:22 +00:00
Stanislav Shwartsman
b8f1d5c031 Fixed the bug caused failures of instrumentation on SMP configuration ... 2002-09-29 16:59:28 +00:00
Stanislav Shwartsman
4593431f49 Committed another instrumentation example for C++ lovers ;) 2002-09-29 16:50:29 +00:00
Volker Ruppert
9fb6561b66 - added descriptions of the new ATA disk options based on the comments in the
bochsrc sample
2002-09-29 16:41:41 +00:00
Kevin Lawton
f99f17bca4 Integrated CPUID CMPXCHG8B bit setting patch from John_Bäckstrand.
Moved it slightly, but it is correct.
2002-09-29 16:23:03 +00:00
Stanislav Shwartsman
bee72cf17b changed old bxInstruction name to new one 2002-09-29 16:10:27 +00:00
Stanislav Shwartsman
5bcef53393 Fixed instrumentation example 2002-09-29 16:05:13 +00:00
Kevin Lawton
895693b3b5 Fixed fetchdecode64() to work with the few MOV instructions which
were split into mod=11b, and mod!=11b cases for performance.
2002-09-29 15:07:11 +00:00
Stanislav Shwartsman
abb1530faf Fixed number of problems with instrumentation merge cause to instrumentation fail the compilation 2002-09-29 15:06:58 +00:00
Stanislav Shwartsman
8d99157993 Another additional for instrumentation 2002-09-29 14:16:30 +00:00
Stanislav Shwartsman
0ea0d828df removed the example because it already integrated to the main trunk 2002-09-28 17:11:30 +00:00
Stanislav Shwartsman
f24624f27a Replaced instrumentation example0 files with new example, for new implementation of the instrumentation 2002-09-28 17:09:04 +00:00
Volker Ruppert
4158c1e862 - serial port detection for two ports added to the POST code
- parallel port detection fixed:
  * write the value of AX to 0x0410, not BX
  * the timeout value is a byte and now stored in CL
  * the offset of the port address list is 2 bytes
2002-09-28 15:03:32 +00:00
Volker Ruppert
06bbbba109 - register description "master disable" renamed to "master clear". This is the
register name in the Intel docs
2002-09-28 13:36:32 +00:00
Volker Ruppert
b98975c832 - parallel port detection for two ports added to the POST code 2002-09-28 12:27:56 +00:00
Stanislav Shwartsman
d495bd75a6 fter integration of SplitMod11b changes Bochs failed to compile in SMP mode.
I fixed the compilation errors in CVS, smbd please check if the fix is property;
2002-09-28 09:38:58 +00:00
Peter Tattam
3ed1d61cd4 Initial work on updating bochs disassembler
Used patch.disasm to do

1) clean up the disasm output to make the dispaly of extra stuff optional.
2) included the part of the patch which displays displacements as
   proper addresses.
2002-09-28 06:29:55 +00:00
Kevin Lawton
08a89fe7b6 Performance mod: I implemented a suggestion from Peter Tattam
and Jas Sandys-Lumsdaine to split out common instructions into
  variants which deal with the mod=11b case (Reg-Reg) and the
  other cases (which do memory ops).  Actually, I only split
  MOV_GwEw and MOV_GdEd for now.  According to some instrumentation
  of a Win95 boot, they were the most frequently used opcode by far.
2002-09-28 05:38:11 +00:00
Bryce Denney
935b0f97bd - a few minor fixes to make it compile 2002-09-28 04:54:17 +00:00
Kevin Lawton
ad3c1474e3 Integrated this patch verbatim. Deleted from patches/. 2002-09-28 01:51:21 +00:00
Kevin Lawton
6843c3dfe8 Integrated patches/patch.logicalxx_asm from Jas Sandys-Lumsdaine.
Essentially, when I coded a few of the instructions to use
  asm()s for acceleration of the eflags, I got lazy and only
  used the asm() to compute eflags and let the normal C operation
  do the actual operation.  Jas's patch, moved the asm()s such
  that they now do the work of the operation as well.

  The patches look great.  The code reads a lot better as well.

  Further work can be done to give the compiler more options with
  register scheduling.
2002-09-28 01:48:18 +00:00
Kevin Lawton
11139670ad Added patch/patch.logicalxx_asm from Jas Sandys-Lumsdaine.
I'm going to look at this next and integrate it if it's good,
  but wanted a record of the patch in CVS.
2002-09-28 01:22:39 +00:00
Kevin Lawton
c49309de14 Committed [english] patches from Jas Sandys-Lumsdaine. These
were simply replacements of the eflags mask constants with
  the macro names already in cpu.h for asm() statements.  I forgot
  to use the macros for some instructions.
  0x000008d5 -> EFlagsOSZAPCMask
  0x000008d4 -> EFlagsOSZAPMask
2002-09-28 01:16:09 +00:00
Kevin Lawton
8755e5b391 This patch was just itegrated. Removed it. 2002-09-28 00:55:12 +00:00
Kevin Lawton
13a1e55f20 Committed patches/patch-bochs-instrumentation from Stanislav.
Some things changed in the ctrl_xfer*.cc, fetchdecode*.cc,
and cpu.cc since the original patches, so I did some patch
integration by hand.  Check the placement of the
macros BX_INSTR_FETCH_DECODE_COMPLETED() and BX_INSTR_OPCODE()
in cpu.cc to make sure I go them right.  Also, I changed the
parameters to BX_INSTR_OPCODE() to update them to the new code.
I put some comments before each of these to help determine if
the placement is right.

These macros are only compiled in if you are gathering instrumentation
data from bochs, so they shouldn't effect others.
2002-09-28 00:54:05 +00:00
Bryce Denney
a2d70c9953 - separate Zwane's patch and my patch so they can be more easily compared.
Now patch.tsc-zwane is back to exactly what Zwane sent to me, and
  patch.tsc-bryce has my modified version.
2002-09-27 23:17:04 +00:00
Bryce Denney
2a0f6ccedb - add wxwindows CFLAGS and CXXFLAGS to the flags for all compiles, not
just the wxwindows ones.  This is required on cygwin, for example, because
  the CFLAGS and CXXFLAGS include gcc flags that change code generation:
  -fno-pcc-struct-return and -fvtable-thunks.  It is not safe to mix code
  compiled with these flags with code compiled without.  I learned this the
  hard way when I found that sometimes code that called a virtual member
  function was jumping to the WRONG member function.
2002-09-27 20:06:57 +00:00
Bryce Denney
84080d26f1 - disable debug specific wxwindows calls, when wxwindows library is not
compiled with debug support
2002-09-27 19:12:56 +00:00
Stanislav Shwartsman
e6adebfe2d Added MMX opcodes to x86-64 mode
Fixed problem with fetching extra byte in ESCx opcodes if FPU is disabled
2002-09-27 09:56:40 +00:00
Kevin Lawton
47f2e7c404 Got rid of the KPL64Hacks macro. The fixes below eliminated it.
Created 64-bit versions of some branch instructions and
  changed fetchdecode64.cc to use them instead.  This keeps the
  #ifdef pollution down for 32-bit code and made fixing them
  easier.  They needed to clear the upper bits of RIP for
  16-bit operand sizes.  They also should not have had a protection
  limit check in them, especially since that field is still
  32-bit in cpu.h, so there's no way to set nominal 64-bit values.
  The 32-bit versions were also not honoring the upper 32-bits
  of RIP.

  LOOPNE64_Jb
  LOOPE64_Jb
  LOOP64_Jb
  JCXZ64_Jb

Changed all occurances of JCC_Jw/JCC_Jd in fetchdecode64.cc to
  use JCC_Jq, which was coded already.  Both JMP_Jq and JCC_Jq are
  now fixed w.r.t. 16-bit opsizes and upper RIP bit clearing.
2002-09-27 07:01:02 +00:00
Peter Tattam
5bfd2c669e SYSRET patch. need to do invalidate_prefetch() for correctness 2002-09-27 03:33:13 +00:00
Bryce Denney
4098cf607e - I screwed up the previous rev by somehow removing a line "typedef struct {".
You can imagine how well it worked without that.
2002-09-27 03:18:44 +00:00
Kevin Lawton
109111202c Modified my fix to JMP_Jq to clear all the upper bits,
63..16 when a 16-bit operand size JMP is executed.  Previous
  fix cleared only 63..32.  I since realized, this is the case
  which does parallel the 32-bit semantics.
2002-09-26 22:34:06 +00:00
Kevin Lawton
6d74a334d6 64-bit bug#1: Instructions such as MOV_ALOq were always
fetching 64-bit address opcode info, which was incorrect.

  Fixed.  Got rid of BxImmediate_Oq.  fetchdecode64.cc now
  uses BxImmediateO, like the fetch routine does.  Addresses which
  are embedded in the opcode, have a size which depends on
  the current addressing size.  For long-mode, this is
  either 64 (default) or 32 (AddrSize over-ride).  BxImmediate_O
  now conditionally fetches based on AddrSize.

64-bit bug#2: In JMP_Jq(), when the current operand size is
  16-bits, the upper dword of RIP was not being cleared.  The
  semantics with this case are weird - one would think the
  top 48 bits would be cleared, but apparently only the top
  32 bits are.  Anyways, I fixed this.

Replaced some of the messy immediate fetching (byte-by-byte) in
  fetchdecode64.cc with ReadHost{Q,D}WordFromLittleEndian() calls
  for cleanliness.  Should do this for all the cases, plus
  the 32-bit stuff.
2002-09-26 21:32:26 +00:00
Bryce Denney
79cd346575 - fix previous rev. It would probably help to put the #include before
the first time that this function is used!
2002-09-26 19:34:44 +00:00
Bryce Denney
5c6d434929 - the raw keycodes code for wxMSW refers to HIWORD, so I made it
conditionally include <windows.h>.  This may seem like a drastic step
  for just one little type, but I expect before long we may want to use
  other symbols like VK_F12 which are also in windows.h.  In a cygwin
  compile this is required.
2002-09-26 19:24:53 +00:00
Stanislav Shwartsman
f987ad036e Changed BxError to UndefinedOpcode function for UD2 opcode (oF 0B) 2002-09-26 18:58:50 +00:00
Bryce Denney
ce8030585f - if cross configuring, don't insist on finding pthreads for the rfb and
wxWindows guis.
- if cross configuring, don't insist on finding curses library.
- on normal configures, when the target platform is win32 (windows, cygwin,
  mingw), don't insist on finding pthread either.

(I'm starting to wonder if when cross_configure=1 we shouldn't just skip over
ALL of the library and header checks.  When you're going to configure on one
platform and build on another, all that information is useless anyway.)
2002-09-26 18:23:34 +00:00
Mike Lerwill
e0275c644f Silence compiler warnings on VC6.0 2002-09-26 09:00:52 +00:00
Bryce Denney
a50f374a28 - fix typo: "event-type" to "event->type" 2002-09-26 03:01:13 +00:00
Bryce Denney
bbc43ba25b - avoid segfaults by checking if the term gui has already been initialized
or not, before calling curses functions.
2002-09-26 02:53:58 +00:00
Bryce Denney
d7251f8693 - move comment on bx_gui_c::specific_init down so that it's next to the
method it describes
2002-09-26 02:46:39 +00:00
Bryce Denney
73681b3a53 - for term compile, search for a function called "color_set" and compile it
away if color_set doesn't exist on that platform.  On Solaris this was
  the only thing keeping term from compiling.  See this bug
  [ 613393 ] solaris: term compile missing color_set
  http://sourceforge.net/tracker/index.php?func=detail&aid=613393&group_id=12580&atid=112580
2002-09-26 02:36:04 +00:00
Bryce Denney
4be28bc5ed - RFB_LIBS was getting overwritten by pthread libs. arg! 2002-09-26 02:19:14 +00:00
Bryce Denney
ec096b9653 *** empty log message *** 2002-09-26 02:15:56 +00:00
Bryce Denney
2352bd4992 - oops, the substitution variable is RFB_LIBS 2002-09-26 02:15:20 +00:00
Bryce Denney
48e0e9dc7d - update so that it applies clean again 2002-09-26 02:12:00 +00:00
Bryce Denney
45acd5b67a - rfb gui needs the socket function. on solaris, you need to link with
-lsocket to get it.
2002-09-26 01:53:29 +00:00
Bryce Denney
085ebec771 - rfb gui needs the socket function. on solaris, you need to link with
-lsocket to get it.
2002-09-26 01:45:10 +00:00
Bryce Denney
87835fd841 - fix memory leaks in the text mode interface that I introduced while working
on the wxWindows interface.  There are many more changes here than
  absolutely required to fix the memory leaks.  Instead, I've tried to
  clean things up so that it does the right thing, and is easier to
  read and maintain.
- For events that the text mode interface is going to ignore anyway, I #ifdefed
  the event creation code instead of calling new and then delete.
- now all synchronous events in siminterface.cc are created as local variables
  on the stack.  Some of them were allocated with new before, and yes some of
  them leaked.
- now I ignore the result of sim_to_ci_event (&event).  It was always
  returning a pointer to the input event anyway.  This makes the event
  sending code simpler.
- wxmain.cc:
  - in the BxEvent handling functions, now all cases "break" down to common
    code at the end which deletes async events.  This is easier to read than
    having each case handle the delete individually.
  - in OnLogMsg, do not delete the event here because it is now handled
    in the common code of OnSim2CIEvent instead.
- thanks to Christophe for pointing out the location of the worst
  memory leak.
2002-09-25 22:54:23 +00:00
Bryce Denney
56b58e6226 - remove "Create Image" button for cdrom from the sketch 2002-09-25 21:28:49 +00:00
Christophe Bothamy
83235c10ec - malloc'ed memory was one byte too short 2002-09-25 19:24:26 +00:00
Bryce Denney
e6e2c08809 - make parse_bochsrc return -1 if any parse errors occur.
- make bx_init_main return -1 if any parse errors occur.
- wxWindows: if bx_init_main returns -1, don't even show the application
  window.  You'll get an error dialog and then it exits.  So far this
  only happens if you run with -q and the parse fails.
- non-wxWindows: if bx_init_main returns -1, just exit.  So far this
  only happens if you run with -q and the parse fails.
- with these changes, handling of bochsrc parse errors seems to work
  as you would expect.  And it certainly doesn't go into an infinite
  recursive loop, as it used to!
- a little more testing and I can close
  bug 614175: infinite panic loop if bochsrc buggy
- modified: main.cc gui/siminterface.h gui/wxmain.cc
2002-09-25 19:05:01 +00:00
Bryce Denney
2b4fb2b0ed - until init_done is set, don't dump CPU registers. It's frustrating to
get a screen full of cpu registers when you actually have a bochsrc
  parse error.
2002-09-25 18:49:35 +00:00
Bryce Denney
a4f0c5b53e - move read configuration and save configuration behavior out of wx.cc
and into wxmain.cc, like other actions.
- set a default siminterface callback for the whole application, which is used
  whenever the simulator is not running.  This is important when the wx code
  calls simulator or param code and triggers a BX_PANIC or something.
  The default callback is responsible for displaying error messages which
  appear while reading the bochsrc, for example.
- move the implementation of BX_SYNC_EVT_LOG_ASK and BX_ASYNC_EVT_LOG_MSG
  into a separate function OnLogMsg().  In the future, OnLogMsg() may be called
  from the application default callback on errors.
- modified: gui/wx.cc gui/wxmain.cc gui/wxmain.h
2002-09-25 18:40:15 +00:00
Bryce Denney
e3760bedc8 - change default action on panic to ASK, for wx only. Once I get the
wx behavior worked out, I'll take out the ifdef and settle on something.
- use new enums BX_LOG_ASK_CHOICE_CONTINUE, BX_LOG_ASK_CHOICE_DIE, etc.
- do not use BX_PANIC inside fatal function! it is very likely to reenter,
  causing infinite recursion.  Use fprintf instead.
2002-09-25 18:35:06 +00:00
Bryce Denney
fd2566023a - add enums for the LOG_ASK choices: continue, die, etc. 2002-09-25 18:32:36 +00:00
Bryce Denney
13de366861 - now parse_line_formatted and parse_line_unformatted return a signed int
(0=success, -1=failure).  If parse_line_unformatted returns failure, I
  stop parsing the bochsrc.
- implement all parsing BX_PANICs with new PARSE_ERR macro, so that we can
  easily change the behavior of all parse errors at once.  For now, I want
  it to BX_PANIC and then return -1 (case panic continues).  Eventually I
  might turn it into BX_ERROR and return -1.
2002-09-25 18:31:38 +00:00
Bryce Denney
2ee888f3bb - create the quit_context as early as possible, in case fatal() gets called
from bx_init_main, bx_do_text_config_interface, or bx_config_interface.
  This should fix bug #614175: infinite panic loop if bochsrc buggy
2002-09-25 16:26:29 +00:00
Bryce Denney
ba6afa5e97 minor cleanups:
- moved cpu_online_map into the BX_CPU_C structure as a static member
  (there is only one per bochs, not one per CPU)
- reduced the diffs in several places to make it more clear what had changed
- removed lots of whitespace diffs
2002-09-25 14:52:45 +00:00
Peter Tattam
67082a5b50 Implemented SWAPGS instruction.
Note that it is unusual to decode (see SGDT instruction)
2002-09-25 14:09:08 +00:00
Bryce Denney
4570f1ba77 - add highmem patch from Zwane Mwaikambo 2002-09-25 13:29:11 +00:00
Bryce Denney
8f9bec3919 - remove unused, and incorrect MSR fields 2002-09-25 13:26:04 +00:00
Bryce Denney
b77654f907 - add APIC patch from Zwane Mwaikambo 2002-09-25 13:16:04 +00:00
Bryce Denney
610d7f00d0 - make the parser a little more informative when things go wrong. 2002-09-25 13:01:30 +00:00
Peter Tattam
a0d90e9b39 Implemented SYSCALL and SYSRET as part of x86-64 emulation.
Since the SYSCALL replaces the LOADALL instruction, it is incompatible with
earlier CPU types.

At moment, the SYSCALL is only enabled by x86-64 emulation, but the code
can be incorporated in IA32 only emulations.

Instructions added:

0F 05		SYSCALL		(replaces LOADALL)
0F 07		SYSRET		(new)

TODO:  restructure #if ... so that it can be used by non x86-64 emulations.
2002-09-25 12:54:41 +00:00
Bryce Denney
6ba1fd1b06 - VC++ doesn't like declaring a var inside a for loop, and then later
declaring another.  I guess it doesn't think the var went out of
  scope at end of first loop.  Oh well, it's easy to fix.
2002-09-25 08:04:07 +00:00
Bryce Denney
3889b9339c - add missing right alt keycode XK_Alt_R to all keymaps 2002-09-25 08:00:25 +00:00
Bryce Denney
a66f903731 - add a few more missing keys: left&right windows keys, pause
- clean up remainder of the old scancode-fixing hack
- change the BX_INFO on each keypress to a BX_DEBUG
2002-09-25 07:24:41 +00:00
Bryce Denney
ae1ac3e266 - add cases in switch statement for keys: Right CTRL, Right ALT, Scroll Lock,
Print Screen, Pause.
2002-09-25 07:21:38 +00:00
Peter Tattam
0de63e8492 Fix to stop external debugger trapping for all exceptions. 2002-09-25 06:36:42 +00:00
Bryce Denney
2107fb3af9 - in the keycode conversion switch statement, rename bx_key to key_event so
that it is as close as possible to the x.cc version.  I've made some
  improvements in x.cc and I want to apply them to wxWindows as well.
2002-09-25 05:35:36 +00:00
Bryce Denney
b99b6a157e - change the way x86-64 default options work to hopefully make them
smarter.  If you use --enable-x86-64, it has the following side
  effects on other options:
  - cpu level defaults to 6 instead of 5
  - ignore bad msr defaults to on (Peter T. requested this)
- if cpu level is 6 or greater, these options are enabled by default.
  - 4meg pages (PSE)
  - physical address extensions (PAE)
  - global pages (PGE)
  - apic support
2002-09-25 04:24:46 +00:00
Bryce Denney
6ccc57320f - add sanity checks for x86-64 compiles to ensure that the required
features are enabled.  Currently checks for cpu level > 5, support
  for PAE, PGE, and PSE.
2002-09-25 03:58:40 +00:00
Bryce Denney
e3539d7a4a - from Peter Tattam: add missing instruction MOVNTI to decode table 2002-09-25 03:32:12 +00:00
Bryce Denney
62066dbd4a - I modified Zwane's patch. see my comments inside 2002-09-25 03:17:32 +00:00
Bryce Denney
8e103b3ffb - fix compile warning about checking that an unsigned int was >= 0 2002-09-25 01:50:14 +00:00
Bryce Denney
70a7056b23 - add tsc patch from Zwane Mwaikambo 2002-09-25 00:00:11 +00:00
Bryce Denney
85b6fa7c8d - add 2 paragraphs about who the paste buffer is allocated and freed
- a few weeks ago I changed the gui code so that it always made a copy
  of the clipboard data using new Bit8u[] and passed it into the keyboard
  code.  But I didn't get the keyboard code quite right, and Christophe
  noticed the incorrect malloc that I had forgotten to remove.  I changed
  it to work as I intended:
    1. gui code allocates paste buffer (new), copies clipboard data in
    2. gui code passes the buffer to the keyboard code, and forgets about it
    3. keyboard code uses the buffer, then frees it when finished (delete)
- modified: iodev/keyboard.h iodev/keyboard.cc
2002-09-24 23:52:54 +00:00
Christophe Bothamy
5b0df32692 - fixed read_toc if start_track is 0 (whole cd).
It missed the first track. Now it returns one track plus leadout.
2002-09-24 23:45:43 +00:00
Christophe Bothamy
cf7e8f2a7c - fixed the pasting code. The bytes array passed as an argument was never freed. 2002-09-24 23:09:52 +00:00
Christophe Bothamy
900d61f6f7 - fixed mismatched malloc/delete 2002-09-24 22:50:51 +00:00
Christophe Bothamy
0dbed48de1 - changed irq for ata2 and ata3, as ps2 mouse needs irq12 2002-09-24 22:49:52 +00:00
Christophe Bothamy
f36fb4fb58 - merged rombios-new-ata.c in rombios.c
- compiled BIOS-bochs-latest from latest rombios.c
2002-09-24 21:56:31 +00:00
Christophe Bothamy
2ef503ae20 - merged rombios-new-ata.c in rombios.c. New features :
. 4 ata interfaces support
  . devices auto-detection
  . 16bits/32bits device access
  . EDD3.0 support
  . ata/atapi layer rewrite
  . added verious DEBUG_XXX to debug only parts of the bios, because we're running low on data space in debug mode
  . moved ata data at offset 0x121 in EBDA. Previously, data was being overwritten by keyboard.sys
  . added jump to [0x40:0x67] after reset if shutdown status is 0x05. Fixes bug [ 601166 ] CMOS Problem @ "0x0F Index 0x05 data"
  . DMA controller init on POST entry
2002-09-24 21:52:32 +00:00
Bryce Denney
4588c9b531 - when I added the realtime PIT option, I accidently enabled it by default.
It should be disabled by default.
2002-09-24 21:47:27 +00:00
Christophe Bothamy
4d179c4fa9 - merged rombios-new-ata.c in rombios.c. This one is not needed any more 2002-09-24 21:44:26 +00:00
Bryce Denney
d3802b9013 - add configure variable $cross_configure, which gets set if you are
configuring for a different machine.  This is used to short-circuit
  certain sanity checks, such as existence of certain required libraries.
- in --with-wx configuration, when $cross_configure=1, do not abort
  configure if library is not found.
- if wxWindows version not found, print "not_found" instead of nothing
2002-09-24 21:35:04 +00:00
Bryce Denney
d21ffad632 - fix call to accessor getB_VM() 2002-09-24 20:41:22 +00:00
Kevin Lawton
62084dd83d Shortened this patch file down to just the important notes. I integrated
the patches, but didn't want to lose the text until they're put into
a doc somewhere.
2002-09-24 20:13:38 +00:00
Kevin Lawton
c3a74d4da0 Integrated patches/patch.promise-dc2300-vlbide from Christophe Bothamy.
From his patch file text:

  > This patch adds Promise DC2300 VLB IDE Support.
  > You may find msdos and win95 drivers on the net. Look for
  > P2300W95.ZIP and DC2300VLBIDEver260b.ZIP.
  >
  > The good news is that now win95 natively sees my cdrom,
  > and that the disks are not in msdos compatibility mode any more.
  >
  > The bad news is that it works only for the first ata interface.
  >
  > I tested that patch on msdos and win95 only.
  >
  > Some info on VLB IDE can be found at http://ryston.cz/petr/vlb/

I got Win95 running with 32-bit paging/filesystem using the
  recommended driver and these patches.  Since the patches did
  such a good job bracketing code modifications with a #define,
  they might as well become part of the current CVS code.
2002-09-24 20:02:00 +00:00
Kevin Lawton
3c09fdb363 I updated code that was using !!get_CF() (or other arithmetic flag) to
use getB_CF() etc.  getB_CF() and friends are only for a relatively
  small number of cases where a true boolean/binary number (0 or 1) is required
  rather than 0 or non-0 as is returned by get_CF().
2002-09-24 18:33:38 +00:00
Bryce Denney
472202226d - add configure option for Greg's realtime pit.
- chose a creative name.... how about --enable-realtime-pit
2002-09-24 18:00:23 +00:00
Bryce Denney
c111260872 - default initializer (=NULL) does not belong on the function definition, only
the declaration in the class.
2002-09-24 17:57:48 +00:00
Bryce Denney
21f5d1f7e8 - remove deprecated -mpentium (which I saw from an unrelated bug report from
Hartmut Birr)
2002-09-24 17:56:09 +00:00
Kevin Lawton
aeca26fc04 Declaration of loadSRegLMNominal() is now only defined for 64-bit. 2002-09-24 16:39:33 +00:00
Kevin Lawton
26ebda0775 Got rid of INIT_64_DESCRIPTOR in all places. Added/replaced it with
loadSRegLMNominal() which should be used to load a segment register
  in long-mode with nominal values which are compatible with existing
  checks and expectations for descriptor cache values.

Fixed 64-bit iret to not do a descriptor fetch if SS selector is null.
  Also load SS with loadSRegLMNorminal() in the same case.
2002-09-24 16:35:44 +00:00
Kevin Lawton
6e7e4c2431 Fixed ctrl_xfer_pro.cc for 64-bit iret. Check for null selector
was not correct (used == 0, rather than s&0xffc == 0).  Also,
  with a null SS selector, it was fetching the descriptor anyways.
  Put more code inside the if (selector != NULL) clause.
  For a temporary measure I added the local INIT_64_DESCRIPTOR
  from segment_ctrl_pro.cc, and used it in the case that the
  SS selector is null.  We need to make a real function which
  sets a descriptor in long-mode to nominal values.  I'm going
  to do that next... I can't stand seeing the current hacks.  :^)
2002-09-24 15:41:03 +00:00
Bryce Denney
05084fd759 - I made the first line of each ata section look a little more like a
section title, and less like the grammar that you're supposed to use.
  Someone on irc was confused because it was written in uppercase, but then
  bochs did not accept the uppercase ATA0-MASTER parameter.
2002-09-24 14:46:58 +00:00
Bryce Denney
2684886624 - fix my merging error from previous rev. Instead of putting the 32bit code
inside the else clause of an if statement, I added a return in the 64bit
  code so that it would not continue.
2002-09-24 14:00:10 +00:00
Bryce Denney
6e473648bd - remove extra #endifs that came from merging Peter's and Kevin's code 2002-09-24 13:57:37 +00:00
Christophe Bothamy
dab39a8031 - this patch enables Promise DC2300 VLB-IDE support 2002-09-24 12:55:13 +00:00
Christophe Bothamy
33a7581f57 - added "floppy" and "disk" as available directive to the boot: option
- legacy "c" and "a" are still supported
2002-09-24 09:50:16 +00:00
Bryce Denney
7ba1d2d96f - replace SDL key handling, which used hardware-dependent scancodes, with
hardware-independent SDL keysyms.
2002-09-24 08:50:51 +00:00
Bryce Denney
de0e58c2c5 These changes are from Peter Tattam
- fix load_ss, remove load_ss_null
- change the "#if KPL64Hacks" around msr stuff into "#if BX_IGNORE_BAD_MSR"
- remove "#if KPL64Hacks" from BX_CPU_C::can_push
- segment_ctrl_pro.cc: bug fix to ss == null handling in 64 bit mode

Modified: cpu/cpu.h cpu/ctrl_xfer_pro.cc cpu/exception.cc
cpu/proc_ctrl.cc cpu/segment_ctrl_pro.cc cpu/stack_pro.cc
2002-09-24 08:29:06 +00:00
Bryce Denney
3b011766fa - add --enable-ignore-bad-msr, which causes Bochs to NOT do a panic
or gpf when an unrecognized MSR is accessed.
2002-09-24 08:15:27 +00:00
Kevin Lawton
82fd79c546 Fixed/updated/cleaned repeat IO & memcpy speedups for Long mode.
Fixed/updated/cleaned guest2host TLB speedups for Long mode.

I now can boot the Linux x86-64 kernel to the VFS mount message,
using all the accelerations.
2002-09-24 04:43:59 +00:00
Kevin Lawton
281e62d8b1 I integrated my hacks to get Linux/x86-64 booting. To keep
these from interfering from a normal compile here's what I did.
In config.h.in (which will generate config.h after a configure),
I added a #define called KPL64Hacks:

  #define KPL64Hacks

*After* running configure, you must set this by hand.  It will
default to off, so you won't get my hacks in a normal compile.
This will go away soon.  There is also a macro just after that
called BailBigRSP().  You don't need to enabled that, but you
can.  In many of the instructions which seemed like they could
be hit by the fetchdecode64() process, but which also touched
EIP/ESP, I inserted a macro.  Usually this macro expands to nothing.
If you like, you can enabled it, and it will panic if it finds
the upper bits of RIP/RSP set.   This helped me find bugs.

Also, I cleaned up the emulation in ctrl_xfer{8,16,32}.cc.
There were some really old legacy code snippets which directly
accessed operands on the stack with access_linear.  Lots of
ugly code instead of just pop_32() etc.  Cleaning those up,
minimized the number of instructions which directly manipulate
the stack pointer, which should help in refining 64-bit support.
2002-09-24 00:44:56 +00:00
Bryce Denney
caa82a19a0 - print CR* registers on exit
[ 501694 ] cr2 value shown when bochs panics
  http://sourceforge.net/tracker/index.php?func=detail&aid=501694&group_id=12580&atid=362580
2002-09-23 22:10:00 +00:00
Bryce Denney
be2b9cc656 *** empty log message *** 2002-09-23 21:41:59 +00:00
Bryce Denney
6a0e1e94be - add configure test for usable wxWindows version 2002-09-23 21:41:35 +00:00
Christophe Bothamy
8ce766fc17 - fixed problem reported by Kevin. the buffer index was incremented twice when repeat-speedups is enabled 2002-09-23 21:11:51 +00:00
Kevin Lawton
2459d81619 Removed this patch which is already in the bochs CVS source. 2002-09-23 19:31:50 +00:00
Kevin Lawton
6d51ca08f1 Removed my patches, which are already integrated into bochs. 2002-09-23 19:29:15 +00:00
Bryce Denney
91402bb98a - add spoolpipe utility from Carl Sopchak
see [ 558422 ] Spool parallel output
  http://sourceforge.net/tracker/index.php?func=detail&aid=558422&group_id=12580&atid=312580
2002-09-23 19:25:06 +00:00
Kevin Lawton
d9ac09ea26 Removed this old 4Meg pages patch. We already have big page
support in bochs.
2002-09-23 19:23:03 +00:00
Bryce Denney
ff0c169407 - add patch from Luiz Henrique Shigunov, see
[ 612486 ] more disasm functions
  http://sourceforge.net/tracker/index.php?func=detail&aid=612486&group_id=12580&atid=312580
2002-09-23 19:20:58 +00:00
Bryce Denney
fb08f28c8b - add Danish keymap from Andreas Ott 2002-09-23 19:16:54 +00:00
Kevin Lawton
91fd4b3745 Added new configure option --enable-host-specific-asms, so the
user can turn on/off use of native host specific inline asm
  statements.  By default, this option is enabled, so you only
  need it to disable inline asms in your compile for now.

Currently only on x86+GCC environments, will inline asm()
  statements be used.  Eventually, other platforms could specify
  some asm()s; probably for endian issues such as byte-swapping
  and unaligned memory accesses.  On x86, there are some inline
  asm()s which do the arithmetic EFLAGS processing so that the
  lazy flags handling is somewhat bypassed.  Eventually, I'll
  add more, at least for the more common instructions.  This
  adds a little extra performance.
2002-09-23 17:59:18 +00:00
Bryce Denney
091e7ee721 - quick and dirty script to run make again in every build-* directory 2002-09-23 17:57:18 +00:00
Bryce Denney
140abecb87 - the valid arg of dbg_xlate_linear2phy is declared as Boolean but we were
giving it Bit32u pointers.  On MacOSX for some reason Boolean is set to
  unsigned char instead of unsigned int, so it actually cares that we get the
  type right.
2002-09-23 17:53:47 +00:00
Bryce Denney
8c3fb9dd1a - add methods to force update of the VGA screen and to force a call
to handle_events.  These are primarily so that when a debugger is
  single stepping, the screen updates immediately instead of after
  thousands of cycles.
2002-09-23 17:41:42 +00:00
Bryce Denney
f4e08f4497 - add to my "to do" list 2002-09-23 17:12:24 +00:00
Bryce Denney
6fafbe4b25 - add example of how to use siminterface callback function 2002-09-23 17:02:33 +00:00
Bryce Denney
93311561aa - add get_notify_callback method 2002-09-23 16:57:45 +00:00
Bryce Denney
97f3350daf - only call XCloseDisplay if display has been opened 2002-09-23 16:30:27 +00:00
Volker Ruppert
ff517c9c59 - added missing register_irq() for the PS/2 mouse (IRQ12) 2002-09-23 16:19:21 +00:00
Bryce Denney
8c6f664eb5 - created a spot for Peter Tattam to put his ask code for external debugger 2002-09-23 15:39:53 +00:00
Bryce Denney
8213f3916a - add option BX_OVERRIDE_ASK (request by Peter T) 2002-09-23 15:28:16 +00:00
Bryce Denney
c6133d926a - uncomment pieces of Peter Tattam's external debugger, but leave them in
an #if BX_EXTERNAL_DEBUGGER block
2002-09-23 15:26:05 +00:00
Bryce Denney
00b2607e6a - added bit definitions of CR4 in comments 2002-09-23 14:45:44 +00:00
Bryce Denney
c9b05afa6d - add "Reserved" bitfields to comments, to make it more complete 2002-09-23 14:38:14 +00:00
Bryce Denney
8b1a27fc7e - I forgot to mention that the previous rev was a patch from Peter Tattam 2002-09-23 14:33:49 +00:00
Bryce Denney
185254e367 - for x86-64, claim that we are an "AuthenticAMD" processor
- return model=2 so that Linux recognizes the processor as having an APIC.
  We don't really know what Hammer returns.
- in SetCR4, allow bits 9 and 10 to be written
2002-09-23 14:31:21 +00:00
Bryce Denney
35d9ad97b9 - from Peter Tattam: change prefetch instructions to nops instead of undefined 2002-09-23 14:25:29 +00:00
Bryce Denney
9810e6ab8d - in CMP_EqId, fix bug in sign extension 2002-09-23 14:25:08 +00:00
Bryce Denney
169efc4cc5 - change help msgs to make it clear that we can support 8 processors, not
just 1,2,4.  Thanks to Ph. Marek for pointing this out.
2002-09-23 14:09:55 +00:00
Christophe Bothamy
ed3270d12d - updated from rombios-new-ata.c rev 1.6 2002-09-23 12:49:02 +00:00
Christophe Bothamy
98c1f73690 - moved ata data at offset 0x121 in EBDA. Previously data was being overwritten by keyboard.sys
- added jump to [0x40:0x67] after reset if shutdown status is 0x05. Fixes bug [ 601166 ] CMOS Problem @ "0x0F Index 0x05 data"
- changed various occurences of "mov ax, #0000" by "xor ax, ax"
- fixed serious bugs in EDD function 0x48
- included Volker's rombios recent changes to PCIBIOS
- initialization of DMA controller on POST entry
2002-09-23 12:47:24 +00:00
Bryce Denney
6aa079b234 - now with cpu level < 5 you must disable mmx 2002-09-23 07:37:07 +00:00
Bryce Denney
cd10908664 - use the GNU defines when compiling in cygwin without WIN32, for example
compiling --with-term
2002-09-23 06:57:57 +00:00
Bryce Denney
92b5efeab6 - update beos build scripts for this century 2002-09-23 06:14:01 +00:00
Bryce Denney
08ff8df002 - add special condition for compiling --with-term in cygwin 2002-09-23 05:15:06 +00:00
Bryce Denney
09e8993e41 - add
- this patch is from [ #567595 ] guess floppy type from image file length.
  from Tal Benavidor
2002-09-23 04:16:18 +00:00
Bryce Denney
a96d0da728 - distinguish between $(srcdir)/build/macosx, where the source files
are found, and build/macosx, where the files created by configure are
  found.  Now VPATH build should work.
2002-09-23 03:58:25 +00:00
Bryce Denney
b9847fe6c1 - rename MIN and MAX to BX_MIN and BX_MAX to avoid name conflicts
on MacOS X
2002-09-23 03:49:39 +00:00
Bryce Denney
14512ccced - substitute version number in build/macosx/Info.plist 2002-09-23 03:46:47 +00:00
Bryce Denney
a6a63ce96c - macosx: add reference to new icons 2002-09-23 03:45:11 +00:00
Bryce Denney
a45214a3ef - from patch [ #590426 ] additions to the MAC OS X build scripts, make
changes to Info.plist and add an icon
2002-09-23 03:43:16 +00:00
Bryce Denney
35630a672a - rename Info.plist to Info.plist.in so that I can make the configure script
substitute the correct version number
2002-09-23 03:41:22 +00:00
Gregory Alexander
249131fbed I added a support function to osdep.
The function gets the real time in useconds and puts it in
a Bit64u.  This function is defined when:
BX_HAVE_REALTIME_USEC is 1.

Right now, BX_HAVE_REALTIME_USEC is defined to be BX_HAVE_GETTIMEOFDAY
and bx_get_realtime64_usec is defined in terms of gettimeofday().

However, it could be defined in terms of any other method of obtaining
the current time accurate to the usecond.  That is why I moved the
function to osdep and added the new define.
2002-09-23 02:20:52 +00:00
Bryce Denney
27e5bd1bd6 - check in minor change in CreateFile() which fixes cdrom access in win2k.
Suggested by Gino Chen Hsiang-Jan in bug [ #470701 ] Win32 CD-ROM
  Need help testing on other windows versions.
2002-09-23 01:23:25 +00:00
Kevin Lawton
30de048055 Enhanced my previous updates, by making sure that both operands
to byte operations in asm() statements use either a byte-accessible
  register (eax,ebx,ecx,edx) or a memory operand with "q" and "mq"
  constraints.
2002-09-23 00:40:58 +00:00
Kevin Lawton
9100d1ab1e Changed "r" constraints to "q", so gcc will emit a byte addressable
register for the x86 asm() tricks.
2002-09-23 00:27:18 +00:00
Christophe Bothamy
af215531f2 - fixed compile problem with --enable-repeat-speedups 2002-09-22 23:47:34 +00:00
Bryce Denney
90c4c03a7f - on make dist-clean, clean up the byproducts of rpm building 2002-09-22 23:42:35 +00:00
Kevin Lawton
41929b75bd Moved the "i = &iStorage" line inside the #ifdef bracketing
for iCache support.  It wouldn't hurt anything, but it
  makes the compiler complain of longjmp/fork issues.
2002-09-22 23:42:01 +00:00
Bryce Denney
e4b5e64048 - modify the RPM build script so that it can build RPMs without root
access.  Now it builds everything within a subdirectory called _rpm_top.
  Some more testing needed in different environments, but it seems to work.
2002-09-22 23:41:50 +00:00
Kevin Lawton
6e7a2e91f2 Added more x86 specific asm() code to directly handle eflags return
values for some common instructions (like test/and/cmp).  Only
  compiles in on x86 of course.
2002-09-22 22:22:16 +00:00
Kevin Lawton
4150ae197e Hopefully this fixes "Bugs item #612880", which was due to
the icache pageStamp check too early, before it was known
  that the TLB entry would produce a physical address in
  range of the normal part of physical memory.  PCI accesses
  were causing seg faults because of this.  I haven't tested
  this for PCI.
2002-09-22 21:47:57 +00:00
Christophe Bothamy
440dffc803 - applied patch.4ata-channels and patch.4ata-channels.bbd
- Features :
 . number of active channels defined at boot-time config
 . new options in bochsrc
 . up to 8 devices support (disks or cdroms)
 . up to 4 cdrom devices can be changed at runtime config
 . wxwindows config interface
2002-09-22 20:56:12 +00:00
Christophe Bothamy
cec1c57d98 - merged Bryce's patch and mine
- preparing for commit of all the changes. We'll keep this patch in case something goes wrong
2002-09-22 20:51:05 +00:00
Bryce Denney
a785453194 - fixed another case of get_##flag##(void) 2002-09-22 19:06:46 +00:00
Bryce Denney
fda29cd55b - in definition of ArithmeticalFlag, we had "getB_##flag##(void)",
which says to paste getB_ with flag and then paste with (.  It should
  be "getB_##flag(void)".  Some preprocessors are complaining about pasting
  the symbol with the paren.
2002-09-22 19:03:24 +00:00
Kevin Lawton
b742ccec7e Changed eflags accessors for get_?F() to use (val32 & (1<<N)) instead
of (1 & (val32>>N)), and added a getB_?F() accessor for special
  cases which need a strict binary value (exactly 0 or 1).  Most
  code only needed a value for logical comparison.  I modified the
  special cases which do need a binary number for shifting and
  comparison between flags, to use the special getB_?F() accessor.

Cleaned up memory.cc functions a little, now that all accesses
  are within a single page.

Fixed a (not very likely encountered) bug in fetchdecode.cc (and
  fetchdecode64.cc) where a 2-byte opcode starting with a prefix
  starts at the last offset on a page.  There were no checks
  on the segment overrides for a boundary condition.  I added them.

The eflags enhancements added just a tiny bit of performance.
2002-09-22 18:22:24 +00:00
Bryce Denney
ec18d9b956 - add $(srcdir) in macosx install lines, so that it works in VPATH build 2002-09-22 17:43:38 +00:00
Bryce Denney
ac4e5bb6cf - add sanity checks
- don't allow MMX on cpu level < 5.
  - require FPU support on cpu level >= 55
  - don't allow MMX support without FPU support (moved this check from
    cpu/i387.h to config.h)
2002-09-22 16:11:12 +00:00
Bryce Denney
e3e16682df from Peter Tattam: in MOVSX_GqEd, typecast op2 to Bit32s instead of Bit16s 2002-09-22 15:42:09 +00:00
Bryce Denney
6b5192d98a - from Peter Tattam: fixed invalid instructions for 64 bit mode 2002-09-22 15:29:51 +00:00
Bryce Denney
17f873abc3 - these fixes are from Psyon
- PacketSetReadTimeout: instead of calling with a very short timeout,
  now we call it with -1 which means no timeout.
- Psyon found that Peter Tattam's changes, while necessary for win95, broke
  WinNT/2000.  So now on Windows NT/2000, we still call
  WaitForSingleObject(lpAdapter->ReadEvent,0) but we ignore the return value.
2002-09-22 14:58:49 +00:00
Jeroen Janssen
53723a8569 hopefully solved bugreport [ 612741 ] VBE mem conflicts w/ local APIC address 2002-09-22 11:31:48 +00:00
Bryce Denney
2b7654a37d - fixed "macro expands to nothing" by renaming the macro 2002-09-22 07:23:26 +00:00
Bryce Denney
c382348cbf - add CopyParamToGui() to DebugLogDialog, which is empty for now. 2002-09-22 04:52:55 +00:00
Bryce Denney
adeb5331f6 - I used to have a method called ParamDialog::Refresh() that reread all the
parameter values associated with the dialog and updated the wxWindows
  controls.  At the time I didn't realize that I was overriding
  wxWindow::Refresh() which repaints the window.  Later, I renamed the method
  to CopyParamToGui() to make it more clear, but many of the callers in
  wxmain.cc continued to call Refresh(), which now reverted to the parent class
  wxWindow::Refresh().  Since there was no compile error I didn't notice for a
  while, but it caused the ParamDialogs to repaint themselves constantly but
  never actually change their values.  This is now fixed by changing those
  method calls to CopyParamToGui().
2002-09-22 04:36:09 +00:00
Bryce Denney
85a7d1dad8 - on win32, the wxWindows interface was never redrawing the screen since I
started using a wxTimer to trigger the redraws.  Now instead of calling
  MyPanel::OnPaint directly, I call Refresh() instead.  This makes the Windows
  display work correctly.
2002-09-22 04:04:40 +00:00
Bryce Denney
5933d94c91 - add typecast to Bit32u to avoid lots of useless -Wall warnings. The constant
expression on the right side of the comparison was turning out signed, while
  the expression on the left was unsigned.
2002-09-22 02:53:09 +00:00
Bryce Denney
d4bf3598f0 - fix some types in printf format strings 2002-09-22 02:44:31 +00:00
Bryce Denney
de67199921 - call SetFocus() on the panel so that it is certain to get key events.
I'm not sure why this wasn't needed before, but after switching to
  wxWindows 2.3.3 it seems to be important.
- in a wxLogDebug() call I was trying to pass a struct instead of a string.
  Fixed that.
2002-09-22 02:43:37 +00:00
Bryce Denney
38ad31fd4b - add Greg's suggestions for dialog box to configure time options, from an
email
2002-09-22 02:42:07 +00:00
Bryce Denney
556e4d2590 - fix call to create slowdown timer object. I'm pretty sure I broke this
on August 28 when I was messing with init and reset methods.
2002-09-22 02:29:59 +00:00
Kevin Lawton
7fd744b4ef Oops, I had #ifdef 0'd the code in here to do a test compile,
and forgot to put it back.
2002-09-22 02:07:46 +00:00
Bryce Denney
e41655a78c - add configure test for BX_HAVE_GETTIMEOFDAY
- hardcode BX_HAVE_GETTIMEOFDAY=0 if cross compiling for VC++
  (this part hasn't been tested)
- modified files: configure configure.in config.h.in iodev/pit_wrap.cc
2002-09-22 01:56:18 +00:00
Kevin Lawton
3bfeab23c9 Split out JZ/JNZ instructions from JCC because they were called
so frequently.
Coded asm() statements for INC/DEC_ERX() instructions.
Cleaned up the iCache a litle including a bug fix.  The
  generation ID was decrementing the whole field including
  some high meta bits.  That could roll over after 1 Billion
  cycles.  I know only decrement if the field is valid, to
  save the write.
I implemented inline functions which can serve the value of
  the arithmetic flags if they are cached, and redirect to
  the lazy_flags.cc routines if not.
Most of this was just prep work for adding more asm() statements
  for native eflags processing when on x86.
2002-09-22 01:52:21 +00:00
Bryce Denney
bed405dad0 - revert 1.30. The change I made caused VPATH builds to fail, like when
you run configure from another directory.  We'll have to try some other
  way to make nmake happy.
2002-09-22 01:35:12 +00:00
Bryce Denney
cddddb96d9 - avoid using $< syntax because nmake can't handle it 2002-09-22 01:19:19 +00:00
Volker Ruppert
4c4294cc6f - new variable 'charmap_updated', 'charmap_changed' array renamed to
'char_changed'. These variables are currently only used by the win32 gui for
  the update of the font bitmaps. SDL and wxWindows do not use the variables
  since they are using the charmap data directly
- free text snapshot memory when the user has cancelled the dialog
- write text snapshot file in binary mode (disables the LF -> CRLF conversion
  in cygwin)
2002-09-21 19:38:47 +00:00
Stanislav Shwartsman
a08834b7f7 MMX cannot be compiled without FPU 2002-09-21 17:24:24 +00:00
Volker Ruppert
d7e6649f72 - log type PCI2ISALOG added
- pci2isa prefix changed to "P2I"
- device name changed to "PIIX3 PCI-to-ISA bridge"
- added more default values to the reset() function
- added stubs for i/o mapped registers
- array pci_conf[] is now a part of the structure s
2002-09-21 11:38:12 +00:00
Volker Ruppert
7ea3cdfd76 - update dependencies after adding the pci2isa device 2002-09-21 10:24:43 +00:00
Gregory Alexander
e668567e85 Made BX_USE_REALTIME_PIT checked at runtime. This is
a precursor to making it a runtime option.  I'm not
sure how to do this, but it should be trivial.  All it
would take is adding the option and changing the
macro for BX_USE_REALTIME_PIT to point to that option.
2002-09-21 04:02:51 +00:00
Gregory Alexander
44c5829ea5 Realtime PIT with gettimeofday is working beautifully.
It's MUCH smoother than with the time(NULL) version.

We need to work on setting up the config parameters some more.
2002-09-21 03:20:59 +00:00
Kevin Lawton
e2e219eda0 Modified the way that the register field (low 3 bits of a few opcodes
also extended by the REX.B field on Hammer) is passed to instructions.
I rearranged the bxInstruction_c to free up a field to be used
to pass this info when mod-rm bytes are not used.  This got rid
of the ugly ((i->b1 & 7) + i->rex_b) code.

Probably shaved just a very little run time off Hammer emulation,
and even less on x86-32.  The resultant is a little cleaner anyways.
2002-09-20 23:17:51 +00:00
Bryce Denney
dc18466f15 - fix "fatal error U1083: target macro '' expands to nothing" that
Psyon reported
- clean up remnants of cpu64 merge in configure script, Makefile.in,
  and cpu/Makefile.in
2002-09-20 23:16:23 +00:00
Gregory Alexander
1f05d9aa6b Working on Realtime PIT code.
Getting fair results with gettimeofday.
2002-09-20 23:10:55 +00:00
Bryce Denney
0d68427d37 - we kept getting /usr/include/math.h in the dependency list for keyboard.cc
and I could never explain it.  The problem was that in keyboard.cc it
  included "math.h" with quotes instead of <math.h> with less than/greater
  than, so gcc -MM didn't realize it was a system header.
2002-09-20 22:42:29 +00:00
Bryce Denney
375fcf648b - plug up some memory leaks in wxWindows code, with help from Valgrind
- MyPanel::blankCursor
  - MyFrame::panel
  - AdvancedLogOptions::action (2d array of wxChoice *'s)
  - ParamDialog::idHash, ParamDialog::paramHash, and ParamStructs
  - file dialog in BrowseTextCtrl
- fix illegal use of a wxObject.  I had been clearing the ParamStruct
  with memset(), but I forgot that ParamStruct was a subclass of wxObject
  so I was trashing the wxObject fields too!  Instead I created a
  ParamStruct constructor that clears the pointers to NULL.
- comment out debug output from AdvancedLogOptionsDialog::SetAction
- modified files: gui/wx.cc gui/wxdialog.cc gui/wxdialog.h
  gui/wxmain.cc gui/wxmain.h
2002-09-20 21:25:09 +00:00
Stanislav Shwartsman
470dd1d30f Examples directory for mew instrumentation stuff 2002-09-20 20:25:55 +00:00
Stanislav Shwartsman
973422be6f Removed patch-smp-fpu because it already merged with MMX support 2002-09-20 20:15:34 +00:00
Stanislav Shwartsman
22d8918774 New version of Bochs instrumentation stuff 2002-09-20 20:12:36 +00:00
Volker Ruppert
efbcf33bc7 - real mode PCI BIOS modifies the iret flags on stack if no error is present
- bug in the 'find PCI device' functions fixed
- register for the PCI i/o addresses is always DX
2002-09-20 19:36:05 +00:00
Bryce Denney
28fa5324b8 - add a few little bugs to the list
- put off some log related features until later
- advanced log options and debug log are done, so I removed them from the list
- added some wxWindows coding hints I found on usenet
2002-09-20 18:16:59 +00:00
Bryce Denney
ed36bc11f0 - sync up control.cc (text mode config interface) with wxmain.cc (wxWindows
interface) by using get/set_default_log_action.  This has very minimal effect
  on the behavior of the text config interface.
- modified: main.cc gui/control.cc
2002-09-20 18:14:27 +00:00
Bryce Denney
d285e86bdb - test with --enable-icache instead of --enable-fetchdecode
- change x,y increment between successive xterms to only 30 (--parallel mode)
- run everything with nice to be less of a hog
2002-09-20 17:57:54 +00:00
Bryce Denney
eca3ef17dc - How to handle default log options has been somewhat confused for a long
time, so I've tried to improve it.  Now the logfunctions class has a
  static field default_onoff[] which represents the default actions for
  each kind of log message.  Default_onoff[] is initialized with static
  data so it should be valid by the time it's used.  This can be reached by
  static accesors logfunctions::set_default_action and
  logfunctions::get_default_action.  It seemed appropriate to put the defaults
  inside the logfunctions class, rather than in bx_options or siminterface.
  However, to make them accessible to the config interface, I added similar
  methods in siminterface that map to the accessors in logfunctions.
- logio.cc had two different definitions of LOG_THIS for different halves
  of the file, which was ugly and confusing.  (LOG_THIS is needed for BX_INFO,
  BX_DEBUG, etc.)  I removed the first definition and fixed the minor compile
  problems that ensued.  In the initializers for iofunctions, everything
  is complicated because of the unpredictable order that constructors get
  called.  They must use this->log to print things, because genlog hasn't
  been initialized yet.
- now if SIM->set_log_action(int mod, int level, int action) is called
  with mod<0, it sets the action for all modules/devices instead of just one.
- modified: bochs.h logio.cc main.cc gui/siminterface.cc gui/siminterface.h
2002-09-20 17:56:22 +00:00
Bryce Denney
a33f144f6c - implement behavior of the AdvancedLogOptionsDialog
- LogOptionsDialog: show the "no change" option.  When options other than
  "no change" are selected, set both the default log action and the
  specific log action for all devices.
- AdvancedLogOptionsDialog: store the wxChoice*'s in a 2d array since I
  have to refer to them later.
- since both the log options and advanced log options dialogs needed to
  create many wxChoices using similar rules, I moved the creation code
  into a utility function makeLogOptionChoiceBox.
- I finally discovered the wxADJUST_MINSIZE option to wxSizer::Add(),
  which solves some layout problems that I was having with wxChoices.
  With this setting, the wxChoice will automatically grow to the size of
  the largest string that can be selected.
- improve sizing of the scrollWin according to the desired size of the panel
  that contains all the wxChoices.
- add sketches for proposed dialog that combines both LogOptionsDialog and
  AdvancedLogOptionsDialog using tabs
2002-09-20 17:53:14 +00:00
Bryce Denney
d2b5e83283 - fix typo in a comment. Also this hunk will conflict with what I'm
about to check in.
2002-09-20 17:52:05 +00:00
Bryce Denney
f9a1de5a58 - I remembered the real reason why I made an abstract class
bx_simulator_interface_c, so I included that in the comments.
2002-09-20 17:39:07 +00:00
Christophe Bothamy
3dfb397974 - added patch found in sf [ 609616 ] remote GDB stub
From sf patch page :

This patch adds remote GDB stub capability to Bochs.
It's an updated version of the patched bochs 1.3pre1 in
found in this URL:

http://www.rtmk.org/bochs-gdb.html

more details in the same site. thanks Johan Rydberg
2002-09-20 16:14:55 +00:00
Bryce Denney
aee82fdde3 - eliminate unused warning on int cpu 2002-09-20 15:35:44 +00:00
Christophe Bothamy
c0be71cded - applied patch from Luiz Henrique Shigunov [ 605815 ] more disasm functions
Modified Files: dis_decode.cc dis_groups.cc disasm.h
2002-09-20 15:34:55 +00:00
Kevin Lawton
9b02229b84 Removed defunct options from configure.in (for dynamic translation
and old style fetchdecode cache).  Removed generations of
dynamic/Makefile.  Upgraded my autoconf to 2.50 to get rid
of those pesky "EOF" errors.
2002-09-20 15:34:51 +00:00
Bryce Denney
226fd0e2c0 - enable MMX by default 2002-09-20 15:12:25 +00:00
Christophe Bothamy
de39c3bd6d - VGABIOS-lgpl name change
. removed VGABIOS-lgpl-0.3
  . added VGABIOS-lgpl-latest (current cvs version)
  . updated configuration file
2002-09-20 13:23:46 +00:00
Bryce Denney
452f65235b - rename Refresh to CopyParamToGui
- rename CommitChanges to CopyGuiToParam
2002-09-20 12:40:13 +00:00
Bryce Denney
b4b0e689e8 - remake configure with autoconf 2.53 2002-09-20 12:34:39 +00:00
Gregory Alexander
f5f6cc65be Working on using gettimeofday for timing instead of time(NULL). 2002-09-20 04:42:25 +00:00