Commit Graph

133 Commits

Author SHA1 Message Date
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
2352bd4992 - oops, the substitution variable is RFB_LIBS 2002-09-26 02:15:20 +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
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
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
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
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
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
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
Bryce Denney
6a0e1e94be - add configure test for usable wxWindows version 2002-09-23 21:41:35 +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
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
Bryce Denney
08ff8df002 - add special condition for compiling --with-term in cygwin 2002-09-23 05:15:06 +00:00
Bryce Denney
14512ccced - substitute version number in build/macosx/Info.plist 2002-09-23 03:46:47 +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
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
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
Kevin Lawton
0cd7346b9c - Added an instruction cache. Size is fixed for the moment,
but if you hand edit cpu/cpu.h, and change BxICacheEntries,
  you can try different sizes.  I'll make this more flexible
  with configure.  For now, use "--enable-icache" with no parameters.

- Modified fetchdecode.cc/fetchdecode64.cc just enough so that
  instructions which encode a direct address now use a memory
  resolution function which just sticks the immediate address
  into rm_addr.  With cached instructions we need this.
2002-09-19 19:17:20 +00:00
Bryce Denney
620b264889 - remove obsolete loader option 2002-09-17 21:45:51 +00:00
Kevin Lawton
2eb34d13a6 Added a configure option, "--enable-pae". The x86-64 enhancements
already had Physical Address Extensions support - we can now
compile for PAE support for x86-32 mode as well.
2002-09-16 21:55:57 +00:00
Kevin Lawton
366e5f78f0 Removed reference to cpu64/Makefile in the last generation stage
of configure.
2002-09-16 20:39:32 +00:00
Kevin Lawton
5eb4e247bc Merged the final filed ("paging.cc") from Peter Tattam's x86-64
enhancement to bochs.  You can now configure with
--enable-guest2host-tlb.

Force the support of big pages (PSE) when x86-64 is configured.

Reverted back to only one kind of TLB entry style, since everything
is ported.

Fixed one bug in io.cc with as_64 and the index registers.
There are others, as noticed by Peter.
2002-09-16 20:23:38 +00:00
Volker Ruppert
19c660a30c - implementation of the PCI-to-ISA bridge started. I/O ports and features are
not present yet.
2002-09-16 19:18:58 +00:00
Bryce Denney
c3e4ccecb3 - I screwed up the BX_USE_CONFIG_INTERFACE variable earlier today; fixed. 2002-09-16 18:36:01 +00:00
Bryce Denney
7619ecfe91 - this rev deals with a configure script bug that appears on cygwin. When
you have AC_DEFINE(var, value) executed more than once, autoconf is
  supposed to use the last AC_DEFINE value, but sometimes it doesn't.
  I haven't been able to figure out why, so I've just worked around it
  instead.
- for BX_SupportGlobalPages, which could call AC_DEFINE twice, I kept the
  value in a shell variable $support_global_pages until the end and then
  did one AC_DEFINE after it had reached its final value.  Same thing
  with BX_USE_CONFIG_INTERFACE.
- also I realized that we are using AC_SUBST() in many cases where it is
  not needed.  AC_SUBST(name) substitutes the string @name@ with a
  value from the configure script.  For preprocessor symbols like
  BX_SupportPAE, we only need the AC_DEFINE; the AC_SUBST has no effect.
2002-09-16 12:37:16 +00:00
Bryce Denney
4d630a139b - print a message when the use_x86_64 flag forces BX_SupportPAE and
BX_SupportGlobalPages so that it's very clear when they are being
  turned on.
2002-09-16 11:53:35 +00:00
Bryce Denney
fb5f2e83a4 - add -pthread flag to CXXFLAGS when compiling --with-rfb 2002-09-16 00:06:16 +00:00
Kevin Lawton
80dd7a07ec Removed references to building libextdb.a. It doesn't seem to
be used at all, and Peter didn't want it.  "extdb.o" is compiled
into libcpu.a, if configured for it.

Removed a few #warnings for x86-64 compile, based on Peter's
line-item comments regarding the warnings I inserted during
the port/merge.
2002-09-15 15:10:21 +00:00
Kevin Lawton
a367d3b742 Force global pages as well as physical address extensions when
x86-64 support is enabled.  Otherwise, CR4 accesses were
tripping a fault.
2002-09-15 13:52:22 +00:00
Kevin Lawton
278e27d5fe Merged proc_ctrl.cc. Also fixed a bug in CR4 reloading; we were
printing a message when a reserved bit was set, but not causing
a #GP(0).  As well, I force a new PAE support option to 1 when
Hammer support is enabled.
2002-09-14 23:17:55 +00:00
Kevin Lawton
aaeeab5850 Reverted back to using "ar" for making libraries. I had to
declare libs from cpu and cpu64 twice to make the linker
pick up all the symbols.
2002-09-14 05:46:57 +00:00
Kevin Lawton
d16fcfce91 (cpu64) Merged fetchdecode.cc. Also, I had some problems with
circular dependencies between 3 cpu related libs that I need
as part of this transition.  I changed the "ar rv" to "ld -i -o"
to do an incremental load instead of an archive.  Hope this
doesn't break any platforms.  We can reset this later.
2002-09-13 23:59:24 +00:00
Kevin Lawton
f05d453b6c Moved 64-bit only files from cpu64 to cpu and modified the Makefiles
accordingly.  These files cause no conflicts at all, since they
are not used in 32-bit compiles.
2002-09-13 15:53:22 +00:00
Kevin Lawton
c520824de5 Changed configure and the cpu + cpu64 dir Makefiles so it's easy
to incrementally merge files.  For a test, shift16.cc is always
compiled in the cpu/ directory regardless of 32/64-bit configure.
Ultimately, all files will migrate from cpu64 to cpu.
2002-09-13 02:56:14 +00:00
Bryce Denney
0fdbbae45b - integrate Peter Tattam's x86-64 emulation code into the main branch!
This adds a whole new directory cpu64 with the new emulation code.
  Very few changes were necessary outside cpu64.  To try it, configure
  with --enable-x86-64 and make.
- also this adds Peter Tattam's external debugger interface.
- modified files: Makefile.in bochs.h config.h.in configure.in
  load32bitOShack.cc logio.cc cpu/Makefile.in cpu/cpu.cc debug/dbg_main.cc
- added files: cpu/extdb.cc cpu/extdb.h and cpu64/*
2002-09-12 07:16:37 +00:00
Kevin Lawton
08576b24be I implemented Global pages. Though, I haven't tested them. :^)
You need to use '--enable-global-pages' to configure in support.
If you have something to boot that uses them, give them a
spin.  Really the were introduced for PPro and above, but
I haven't put in any limits.  CPUID and CR4 report the proper
bits when configured, regardless of --enable-cpu-level at the
moment.
2002-09-10 03:52:32 +00:00
Bryce Denney
be659a09b3 - check in Stanislav Shwartsman's patch "bochs-mmx.patch-endian-support".
He writes: Detailed description: MMX instruction set support.
  Also supports BIG_ENDIAN systems. Tested on Solaris and HP1100.
- modified files:
    configure.in cpu/Makefile.in cpu/cpu.h cpu/fetchdecode.cc
    cpu/proc_ctrl.cc fpu/fpu_system.h fpu/wmFPUemu_glue.cc
- added files: cpu/i387.h cpu/mmx.cc
2002-09-09 16:11:25 +00:00
Bryce Denney
9a045c7340 - since wxWindows+debugger+readline is a combination that currently doesn't
work (control-C kills process instead of returning to debugger prompt), give
  a configure-time error if they are enabled together.  If we can fix the
  signal problem in readline, this check can be removed.
2002-09-05 19:59:20 +00:00
Bryce Denney
2c9fcbb147 - somehow I lost one important line in my last checkin that defines WX_CONFIG 2002-09-05 15:49:48 +00:00
Bryce Denney
892eaab88c - in wxwindows compile, only include the wxwindows cflags on the few
files that need them.  This is more in line with the other gui libraries,
  and the compile line is easier to read.
- modified: Makefile.in configure.in configure gui/Makefile.in
2002-09-05 15:12:13 +00:00
Kevin Lawton
746f09b427 There's a bug in the repeated IO & mem copy speedups. I
added --enable-repeat-speedups with default to disabled.
Reconfigure/recompile and the speedup code will be #ifdef'd
out for now.  It manifested as junk written to the VGA screen
while booting/running Windows.

Also made some more mods to the main cpu loop.  Moved the
handling of EXT/errorno outside the main loop, much like
the extra EIP/ESP commits were moved, for a little better
performance.

I changed the fetch_ptr/bytesleft method of fetching to
a slightly different model, which calculates a window
for which EIP will be valid (land on the current page),
and a bias which when applied to EIP will be from
0..upper_page_limit.  Speed is about the same for either
method, but a pseudo-op/threaded-interpreter will plug
in better with this and be faster.
2002-09-02 18:44:35 +00:00
Kevin Lawton
3a5f338419 Integrated patches for:
- Paging code rehash.  You must now use --enable-4meg-pages to
    use 4Meg pages, with the default of disabled, since we don't well
    support 4Meg pages yet.  Paging table walks model a real CPU
    more closely now, and I fixed some bugs in the old logic.
  - Segment check redundancy elimination.  After a segment is loaded,
    reads and writes are marked when a segment type check succeeds, and
    they are skipped thereafter, when possible.
  - Repeated IO and memory string copy acceleration.  Only some variants
    of instructions are available on all platforms, word and dword
    variants only on x86 for the moment due to alignment and endian issues.
    This is compiled in currently with no option - I should add a configure
    option.
  - Added a guest linear address to host TLB.  Actually, I just stick
    the host address (mem.vector[addr] address) in the upper 29 bits
    of the field 'combined_access' since they are unused.  Convenient
    for now.  I'm only storing page frame addresses.  This was the
    simplest for of such a TLB.  We can likely enhance this.  Also,
    I only accelerated the normal read/write routines in access.cc.
    Could also modify the read-modify-write versions too.  You must
    use --enable-guest2host-tlb, to try this out.  Currently speeds
    up Win95 boot time by about 3.5% for me.  More ground to cover...
  - Minor mods to CPUI/MOV_CdRd for CMOV.
  - Integrated enhancements from Volker to getHostMemAddr() for PCI
    being enabled.
2002-09-01 20:12:09 +00:00
Bryce Denney
10f56f60d1 - I thought I would add mmx.o ONLY when --enable-mmx was present. Stanislav
has been assuming we would compile mmx.o all the time, so I took out the
  conditional compile stuff.
2002-08-26 19:07:00 +00:00
Bryce Denney
61ff7bbb06 - fix it so that cpu/mmx.o is compiled in when MMX is enabled. 2002-08-26 16:40:21 +00:00
Bryce Denney
bc78eaaa76 - add configure option --enable-mmx to prepare for Stanislav Shwartsman's
MMX patch
2002-08-26 16:17:10 +00:00
Bryce Denney
26385f2866 - I've added lots of comments in siminterface.h, and tried to clean up
the terminology a bit.  In particular, the term "gui" has started
  to mean different things in different contexts, so I've defined
  some more specific names for the parts of the user interface, and
  updated comments and some variable names to reflect it.  See
  siminterface.h for a more complete description of all of these.

    VGAW: VGA display window and toolbar buttons, the traditional Bochs
      display which is ported to X, win32, MacOS X, etc.  Implemented
      in gui/gui.* and platform dependent gui/*.cc files.
    CI: configuration interface that lets the user change settings such
      as floppy disk image, ne2k settings, log options.  The CI consists
      of two parts: configuration user interface (CUI) which does the
      actual rendering to the screen and handles key/mouse/menu events,
      and the siminterface object.
    CUI: configuration user interface.  This handles the user interactions
      that allow the user to configure Bochs.  To actually change any
      values it talks to the siminterface object.  One implementation of
      the CUI is the text-mode menus in gui/control.cc.  Another
      implementation is (will be) the wxWindows menus and dialogs in
      gui/wxmain.cc.
    siminterface: the glue between the CUI and the simulation code,
      accessible throughout the code by the global variable
        bx_simulator_interface_c *SIM;
      Among other things, siminterface methods allow the simulator to ask the
      CUI to display things or ask for user input, and allows the CUI
      to query and modify variables in the simulation code.


    GUI: Literally, "graphical user interface".  Until the configuration menus
      and wxWindows came along, everyone understood that "gui" referred to the
      VGA display window and the toolbar buttons because that's all there
      was.  Now that we have the wxWindows code, which implements both the VGAW
      and the CUI, while all other platforms implement only the VGAW, it's not
      so clear.  So, I'm trying to use VGAW, CI, and CUI consistently since
      they are more specific.
    control panel: This has been used as another name for the configuration
      interface.  "control panel" is also somewhat unspecific and it sounds
      like it would be graphical with buttons and sliders, but our text-mode
      thing is not graphical at all.  I've replaced "control panel" with
      "configuration interface" wherever I could find it.  In configure script,
      the --disable-control-panel option is still supported, but it politely
      suggests that you use --disable-config-interface instead.
- clean up comments in siminterface,wx* code
- add comments and examples for bx_param_* and BxEvents
- remove some obsolete stuff: notify_*_args,
  bx_simulator_interface_c::[sg]et_enabled() methods
- in siminterface.cc, move a few bx_real_sim_c methods to where they belong,
  with the rest of the methods.  No changes to the actual methods.
- remove some DOS ^M's which crept in and confused my editor.
2002-08-26 15:31:23 +00:00
Christophe Bothamy
65b715a6ed - fixed test for NE2K_OBJ 2002-08-22 22:21:19 +00:00
Christophe Bothamy
099dad0041 - updated with patch from brad@openbsd.org. See bug [ 593340 ]. 2002-08-11 11:42:09 +00:00