2001-04-10 05:04:59 +04:00
|
|
|
//
|
2011-01-26 02:29:08 +03:00
|
|
|
// Copyright (C) 2001-2011 The Bochs Project
|
2001-04-10 05:04:59 +04:00
|
|
|
//
|
2001-04-10 06:20:02 +04:00
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2 of the License, or (at your option) any later version.
|
2001-04-10 05:04:59 +04:00
|
|
|
//
|
2001-04-10 06:20:02 +04:00
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
2001-04-10 05:04:59 +04:00
|
|
|
//
|
2001-04-10 06:20:02 +04:00
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
2009-08-22 23:30:23 +04:00
|
|
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2009-12-04 23:02:12 +03:00
|
|
|
//
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2001-04-10 05:59:07 +04:00
|
|
|
//
|
|
|
|
// config.h.in is distributed in the source TAR file. When you run
|
|
|
|
// the configure script, it generates config.h with some changes
|
|
|
|
// according to your build environment. For example, in config.h.in,
|
|
|
|
// SIZEOF_UNSIGNED_CHAR is set to 0. When configure produces config.h
|
|
|
|
// it will change "0" to the detected value for your system.
|
2008-02-06 01:57:43 +03:00
|
|
|
//
|
2001-04-10 05:59:07 +04:00
|
|
|
// config.h contains ONLY preprocessor #defines and a few typedefs.
|
|
|
|
// It must be included by both C and C++ files, so it must not
|
|
|
|
// contain anything language dependent such as a class declaration.
|
|
|
|
//
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2004-12-14 01:26:36 +03:00
|
|
|
#ifndef _BX_CONFIG_H_
|
2001-04-10 05:04:59 +04:00
|
|
|
#define _BX_CONFIG_H_ 1
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////
|
|
|
|
// USER CONFIGURABLE OPTIONS : EDIT ONLY OPTIONS IN THIS SECTION //
|
|
|
|
///////////////////////////////////////////////////////////////////
|
|
|
|
|
2002-04-18 04:22:20 +04:00
|
|
|
|
|
|
|
#if 1
|
|
|
|
// quit_sim is defined in gui/siminterface.h
|
|
|
|
#define BX_EXIT(x) SIM->quit_sim (x)
|
|
|
|
#else
|
|
|
|
// provide the real main and the usual exit.
|
|
|
|
#define BX_EXIT(x) ::exit(x)
|
|
|
|
#endif
|
|
|
|
|
2001-05-23 12:16:07 +04:00
|
|
|
// if simulating Linux, this provides a few more debugging options
|
|
|
|
// such as tracing all system calls.
|
2006-01-15 22:35:39 +03:00
|
|
|
#define BX_DEBUG_LINUX 0
|
2001-05-23 12:16:07 +04:00
|
|
|
|
2008-02-06 01:57:43 +03:00
|
|
|
// adds support for the GNU readline library in the debugger command
|
2001-05-23 12:16:07 +04:00
|
|
|
// prompt.
|
2006-01-15 22:35:39 +03:00
|
|
|
#define HAVE_LIBREADLINE 0
|
|
|
|
#define HAVE_READLINE_HISTORY_H 0
|
2001-05-23 12:16:07 +04:00
|
|
|
|
2003-08-04 20:03:09 +04:00
|
|
|
// Define to 1 if you have <locale.h>
|
2006-01-15 22:35:39 +03:00
|
|
|
#define HAVE_LOCALE_H 0
|
2003-08-04 20:03:09 +04:00
|
|
|
|
2001-04-10 05:04:59 +04:00
|
|
|
// I rebuilt the code which provides timers to IO devices.
|
|
|
|
// Setting this to 1 will introduce a little code which
|
|
|
|
// will panic out if cases which shouldn't happen occur.
|
|
|
|
// Set this to 0 for optimal performance.
|
2007-11-22 09:28:05 +03:00
|
|
|
#define BX_TIMER_DEBUG 0
|
2001-04-10 05:04:59 +04:00
|
|
|
|
|
|
|
// Settable A20 line. For efficiency, you can disable
|
|
|
|
// having a settable A20 line, eliminating conditional
|
|
|
|
// code for every physical memory access. You'll have
|
|
|
|
// to tell your software not to mess with the A20 line,
|
|
|
|
// and accept it as always being on if you change this.
|
|
|
|
// 1 = use settable A20 line. (normal)
|
|
|
|
// 0 = A20 is like the rest of the address lines
|
|
|
|
|
|
|
|
#define BX_SUPPORT_A20 1
|
|
|
|
|
|
|
|
// Processor Instructions Per Second
|
|
|
|
// To find out what value to use for the 'ips' directive
|
|
|
|
// in your '.bochsrc' file, set BX_SHOW_IPS to 1, and
|
|
|
|
// run the software in bochs you plan to use most. Bochs
|
|
|
|
// will print out periodic IPS ratings. This will change
|
|
|
|
// based on the processor mode at the time, and various
|
|
|
|
// other factors. You'll get a reasonable estimate though.
|
|
|
|
// When you're done, reset BX_SHOW_IPS to 0, do a
|
|
|
|
// 'make all-clean', then 'make' again.
|
|
|
|
|
|
|
|
#define BX_SHOW_IPS 0
|
|
|
|
|
|
|
|
|
2006-01-22 15:31:16 +03:00
|
|
|
#if (BX_SHOW_IPS) && (defined(__MINGW32__) || defined(_MSC_VER))
|
2001-04-10 05:04:59 +04:00
|
|
|
#define SIGALRM 14
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Compile in support for DMA & FLOPPY IO. You'll need this
|
|
|
|
// if you plan to use the floppy drive emulation. But if
|
|
|
|
// you're environment doesn't require it, you can change
|
|
|
|
// it to 0.
|
|
|
|
|
|
|
|
#define BX_DMA_FLOPPY_IO 1
|
|
|
|
|
|
|
|
// Default number of Megs of memory to emulate. The
|
|
|
|
// 'megs:' directive in the '.bochsrc' file overrides this,
|
|
|
|
// allowing per-run settings.
|
|
|
|
|
2005-03-07 00:23:38 +03:00
|
|
|
#define BX_DEFAULT_MEM_MEGS 32
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2009-12-20 12:00:40 +03:00
|
|
|
// CPU level emulation. Default level is set in the configure script.
|
|
|
|
// BX_CPU_LEVEL defines the CPU level to emulate.
|
2001-04-10 05:04:59 +04:00
|
|
|
#define BX_CPU_LEVEL 0
|
|
|
|
|
2002-09-12 11:16:37 +04:00
|
|
|
// emulate x86-64 instruction set?
|
|
|
|
#define BX_SUPPORT_X86_64 0
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2008-05-11 00:39:53 +04:00
|
|
|
// emulate long physical address (>32 bit)
|
|
|
|
#define BX_PHY_ADDRESS_LONG 0
|
|
|
|
|
2001-10-05 17:52:25 +04:00
|
|
|
#define BX_HAVE_SLEEP 0
|
2003-08-25 03:39:33 +04:00
|
|
|
#define BX_HAVE_MSLEEP 0
|
2001-09-24 09:35:05 +04:00
|
|
|
#define BX_HAVE_USLEEP 0
|
|
|
|
#define BX_HAVE_NANOSLEEP 0
|
2001-10-07 04:10:19 +04:00
|
|
|
#define BX_HAVE_ABORT 0
|
2002-03-08 07:45:00 +03:00
|
|
|
#define BX_HAVE_SOCKLEN_T 0
|
2002-11-09 00:29:16 +03:00
|
|
|
#define BX_HAVE_SOCKADDR_IN_SIN_LEN 0
|
2002-09-22 05:56:18 +04:00
|
|
|
#define BX_HAVE_GETTIMEOFDAY 0
|
2003-08-25 03:39:33 +04:00
|
|
|
#if defined(WIN32)
|
|
|
|
#define BX_HAVE_REALTIME_USEC 1
|
|
|
|
#else
|
|
|
|
#define BX_HAVE_REALTIME_USEC (BX_HAVE_GETTIMEOFDAY)
|
|
|
|
#endif
|
2003-05-03 20:37:18 +04:00
|
|
|
#define BX_HAVE_MKSTEMP 0
|
2003-05-07 00:15:31 +04:00
|
|
|
#define BX_HAVE_SYS_MMAN_H 0
|
2003-06-13 20:05:03 +04:00
|
|
|
#define BX_HAVE_XPM_H 0
|
2003-10-02 15:33:42 +04:00
|
|
|
#define BX_HAVE_TIMELOCAL 0
|
2003-10-02 11:38:00 +04:00
|
|
|
#define BX_HAVE_GMTIME 0
|
|
|
|
#define BX_HAVE_MKTIME 0
|
2005-07-03 13:57:41 +04:00
|
|
|
#define BX_HAVE_NET_IF_H 0
|
2011-04-25 19:20:27 +04:00
|
|
|
#define BX_HAVE___BUILTIN_BSWAP16 0
|
|
|
|
#define BX_HAVE___BUILTIN_BSWAP32 0
|
|
|
|
#define BX_HAVE___BUILTIN_BSWAP64 0
|
2001-09-24 09:35:05 +04:00
|
|
|
|
2002-01-27 12:24:08 +03:00
|
|
|
// This turns on Roland Mainz's idle hack. Presently it is specific to the X11
|
2005-06-17 22:37:51 +04:00
|
|
|
// and term gui. If people try to enable it elsewhere, give a compile error
|
|
|
|
// after the gui definition so that they don't waste their time trying.
|
2001-11-12 03:49:57 +03:00
|
|
|
#define BX_USE_IDLE_HACK 0
|
|
|
|
|
2002-10-30 21:30:29 +03:00
|
|
|
// Minimum Emulated IPS.
|
|
|
|
// This is used in the realtime PIT as well as for checking the
|
|
|
|
// IPS value set in the config file.
|
|
|
|
#define BX_MIN_IPS 200000
|
|
|
|
|
2006-06-22 00:42:26 +04:00
|
|
|
// Minimum and maximum values for SMP quantum variable. Defines
|
2008-02-06 01:57:43 +03:00
|
|
|
// how many instructions each CPU could execute execute in one
|
2006-06-22 00:42:26 +04:00
|
|
|
// shot (one cpu_loop call)
|
|
|
|
#define BX_SMP_QUANTUM_MIN 1
|
|
|
|
#define BX_SMP_QUANTUM_MAX 16
|
|
|
|
|
2001-05-23 12:16:07 +04:00
|
|
|
// Use Static Member Funtions to eliminate 'this' pointer passing
|
|
|
|
// If you want the efficiency of 'C', you can make all the
|
|
|
|
// members of the C++ CPU class to be static.
|
|
|
|
// This defaults to 1 since it should improve performance, but when
|
|
|
|
// SMP mode is enabled, it will be turned off by configure.
|
|
|
|
#define BX_USE_CPU_SMF 1
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2007-10-30 21:57:46 +03:00
|
|
|
#define BX_USE_MEM_SMF 1
|
2006-09-02 16:08:28 +04:00
|
|
|
|
2001-04-10 05:04:59 +04:00
|
|
|
// Use static member functions in IO DEVice emulation modules.
|
|
|
|
// For efficiency, use C like functions for IO handling,
|
|
|
|
// and declare a device instance at compile time,
|
|
|
|
// instead of using 'new' and storing the pointer. This
|
|
|
|
// eliminates some overhead, especially for high-use IO
|
|
|
|
// devices like the disk drive.
|
|
|
|
// 1 = Use static member efficiency (normal)
|
|
|
|
// 0 = Use nonstatic member functions (use only if you need
|
|
|
|
// multiple instances of a device class
|
|
|
|
|
2006-04-05 22:49:35 +04:00
|
|
|
#define BX_USE_HD_SMF 1 // Hard drive
|
|
|
|
#define BX_USE_BIOS_SMF 1 // BIOS
|
|
|
|
#define BX_USE_CMOS_SMF 1 // CMOS
|
|
|
|
#define BX_USE_DMA_SMF 1 // DMA
|
|
|
|
#define BX_USE_FD_SMF 1 // Floppy
|
|
|
|
#define BX_USE_KEY_SMF 1 // Keyboard
|
|
|
|
#define BX_USE_PAR_SMF 1 // Parallel
|
|
|
|
#define BX_USE_PIC_SMF 1 // PIC
|
|
|
|
#define BX_USE_PIT_SMF 1 // PIT
|
|
|
|
#define BX_USE_SER_SMF 1 // Serial
|
|
|
|
#define BX_USE_UM_SMF 1 // Unmapped
|
|
|
|
#define BX_USE_VGA_SMF 1 // VGA
|
2011-03-12 20:37:26 +03:00
|
|
|
#define BX_USE_SB16_SMF 1 // SB 16 soundcard
|
|
|
|
#define BX_USE_ES1370_SMF 1 // ES1370 soundcard
|
2006-04-05 22:49:35 +04:00
|
|
|
#define BX_USE_DEV_SMF 1 // System Devices (port92)
|
|
|
|
#define BX_USE_PCI_SMF 1 // PCI
|
|
|
|
#define BX_USE_P2I_SMF 1 // PCI-to-ISA bridge
|
|
|
|
#define BX_USE_PIDE_SMF 1 // PCI-IDE
|
|
|
|
#define BX_USE_PCIVGA_SMF 1 // PCI-VGA
|
|
|
|
#define BX_USE_PCIDEV_SMF 1 // PCI-DEV
|
2009-01-19 12:48:12 +03:00
|
|
|
#define BX_USE_USB_UHCI_SMF 1 // USB UHCI hub
|
|
|
|
#define BX_USE_USB_OHCI_SMF 1 // USB OHCI hub
|
2006-04-05 22:49:35 +04:00
|
|
|
#define BX_USE_PCIPNIC_SMF 1 // PCI pseudo NIC
|
|
|
|
#define BX_USE_NE2K_SMF 1 // NE2K
|
|
|
|
#define BX_USE_EFI_SMF 1 // External FPU IRQ
|
|
|
|
#define BX_USE_GAMEPORT_SMF 1 // Gameport
|
|
|
|
#define BX_USE_CIRRUS_SMF 1 // SVGA Cirrus
|
|
|
|
#define BX_USE_BUSM_SMF 1 // Bus Mouse
|
2006-09-24 20:58:13 +04:00
|
|
|
#define BX_USE_ACPI_SMF 1 // ACPI
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2002-10-25 01:07:56 +04:00
|
|
|
#define BX_PLUGINS 0
|
2011-01-23 23:21:21 +03:00
|
|
|
#define BX_HAVE_LTDL 0
|
2002-10-25 01:07:56 +04:00
|
|
|
#define BX_HAVE_DLFCN_H 0
|
|
|
|
|
|
|
|
#if BX_PLUGINS && \
|
|
|
|
( !BX_USE_HD_SMF || !BX_USE_BIOS_SMF || !BX_USE_CMOS_SMF \
|
|
|
|
|| !BX_USE_DMA_SMF || !BX_USE_FD_SMF || !BX_USE_KEY_SMF \
|
|
|
|
|| !BX_USE_PAR_SMF || !BX_USE_PIC_SMF || !BX_USE_PIT_SMF \
|
|
|
|
|| !BX_USE_SER_SMF || !BX_USE_UM_SMF || !BX_USE_VGA_SMF \
|
2011-03-12 20:37:26 +03:00
|
|
|
|| !BX_USE_SB16_SMF || !BX_USE_ES1370_SMF || !BX_USE_DEV_SMF \
|
|
|
|
|| !BX_USE_PCI_SMF || !BX_USE_P2I_SMF || !BX_USE_PCIVGA_SMF \
|
|
|
|
|| !BX_USE_USB_UHCI_SMF || !BX_USE_USB_OHCI_SMF || !BX_USE_PCIPNIC_SMF \
|
|
|
|
|| !BX_USE_PIDE_SMF || !BX_USE_ACPI_SMF || !BX_USE_NE2K_SMF \
|
|
|
|
|| !BX_USE_EFI_SMF || !BX_USE_GAMEPORT_SMF || !BX_USE_PCIDEV_SMF \
|
|
|
|
|| !BX_USE_CIRRUS_SMF)
|
2002-10-25 01:07:56 +04:00
|
|
|
#error You must use SMF to have plugins
|
|
|
|
#endif
|
|
|
|
|
2001-06-16 23:27:41 +04:00
|
|
|
#define USE_RAW_SERIAL 0
|
|
|
|
|
2003-05-03 20:37:18 +04:00
|
|
|
// This option enables compressed (zlib) hd support
|
|
|
|
#define BX_COMPRESSED_HD_SUPPORT 0
|
|
|
|
#define BX_HAVE_ZLIB 0
|
|
|
|
|
|
|
|
#if BX_COMPRESSED_HD_SUPPORT && !BX_HAVE_ZLIB
|
2008-10-18 22:10:14 +04:00
|
|
|
#error You must have zlib to enable compressed hd support
|
2003-05-03 20:37:18 +04:00
|
|
|
#endif
|
2001-05-07 09:47:59 +04:00
|
|
|
|
2002-09-23 00:56:12 +04:00
|
|
|
// This option defines the number of supported ATA channels.
|
|
|
|
// There are up to two drives per ATA channel.
|
|
|
|
#define BX_MAX_ATA_CHANNEL 4
|
|
|
|
|
|
|
|
#if (BX_MAX_ATA_CHANNEL>4 || BX_MAX_ATA_CHANNEL<1)
|
2008-10-18 22:10:14 +04:00
|
|
|
#error "BX_MAX_ATA_CHANNEL should be between 1 and 4"
|
2002-09-23 00:56:12 +04:00
|
|
|
#endif
|
2001-04-10 05:04:59 +04:00
|
|
|
|
|
|
|
// =================================================================
|
|
|
|
// BEGIN: OPTIONAL DEBUGGER SECTION
|
|
|
|
//
|
|
|
|
// These options are only used if you compile in support for the
|
|
|
|
// native command line debugging environment. Typically, the debugger
|
|
|
|
// is not used, and this section can be ignored.
|
|
|
|
// =================================================================
|
|
|
|
|
|
|
|
// Compile in support for virtual/linear/physical breakpoints.
|
2007-10-13 02:11:25 +04:00
|
|
|
// Enable only those you need. Recommend using only linear
|
|
|
|
// breakpoints, unless you need others. Less supported means
|
2001-04-10 05:04:59 +04:00
|
|
|
// slightly faster execution time.
|
2008-08-08 01:09:30 +04:00
|
|
|
#define BX_DBG_MAX_VIR_BPOINTS 16
|
|
|
|
#define BX_DBG_MAX_LIN_BPOINTS 16
|
|
|
|
#define BX_DBG_MAX_PHY_BPOINTS 16
|
|
|
|
|
|
|
|
#define BX_DBG_MAX_WATCHPONTS 16
|
2001-04-10 05:04:59 +04:00
|
|
|
|
|
|
|
// max file pathname size for debugger commands
|
|
|
|
#define BX_MAX_PATH 256
|
|
|
|
// max nesting level for debug scripts including other scripts
|
|
|
|
#define BX_INFILE_DEPTH 10
|
|
|
|
// use this command to include (nest) debug scripts
|
|
|
|
#define BX_INCLUDE_CMD "source"
|
|
|
|
|
|
|
|
// Make a call to command line debugger extensions. If set to 1,
|
|
|
|
// a call is made. An external routine has a chance to process
|
|
|
|
// the command. If it does, than the debugger ignores the command.
|
|
|
|
#define BX_DBG_EXTENSIONS 0
|
|
|
|
|
|
|
|
// =================================================================
|
|
|
|
// END: OPTIONAL DEBUGGER SECTION
|
|
|
|
// =================================================================
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
// END OF USER CONFIGURABLE OPTIONS : DON'T EDIT ANYTHING BELOW !!! //
|
|
|
|
// THIS IS GENERATED BY THE ./configure SCRIPT //
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#define BX_WITH_X11 0
|
|
|
|
#define BX_WITH_BEOS 0
|
|
|
|
#define BX_WITH_WIN32 0
|
|
|
|
#define BX_WITH_MACOS 0
|
2001-09-26 04:13:16 +04:00
|
|
|
#define BX_WITH_CARBON 0
|
2001-04-10 05:04:59 +04:00
|
|
|
#define BX_WITH_NOGUI 0
|
2001-05-08 23:07:26 +04:00
|
|
|
#define BX_WITH_TERM 0
|
2001-05-24 05:07:09 +04:00
|
|
|
#define BX_WITH_RFB 0
|
2001-08-16 00:33:47 +04:00
|
|
|
#define BX_WITH_AMIGAOS 0
|
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
|
|
|
#define BX_WITH_SDL 0
|
2002-11-21 22:26:07 +03:00
|
|
|
#define BX_WITH_SVGA 0
|
2002-04-18 04:22:20 +04:00
|
|
|
#define BX_WITH_WX 0
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2004-01-29 21:50:33 +03:00
|
|
|
// BX_USE_TEXTCONFIG should be set to 1 unless Bochs is compiled
|
2005-01-05 22:54:32 +03:00
|
|
|
// for wxWidgets only.
|
2004-01-29 21:50:33 +03:00
|
|
|
#define BX_USE_TEXTCONFIG 1
|
|
|
|
|
2008-04-09 20:33:38 +04:00
|
|
|
// A certain functions must NOT be fastcall even if compiled with fastcall
|
|
|
|
// option, and those are callbacks from Windows which are defined either
|
|
|
|
// as cdecl or stdcall. The entry point main() also has to remain cdecl.
|
|
|
|
#ifndef CDECL
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
#define CDECL __cdecl
|
|
|
|
#else
|
|
|
|
#define CDECL
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2002-10-25 01:07:56 +04:00
|
|
|
// add special export symbols for win32 DLL building. The main code must
|
|
|
|
// have __declspec(dllexport) on variables, functions, or classes that the
|
2008-02-06 01:57:43 +03:00
|
|
|
// plugins can access. The plugins should #define PLUGGABLE which will
|
2002-10-25 01:07:56 +04:00
|
|
|
// activate the __declspec(dllimport) instead.
|
|
|
|
#if defined(WIN32) || defined(__CYGWIN__)
|
|
|
|
# if BX_PLUGINS && defined(BX_PLUGGABLE)
|
|
|
|
// #warning I will import DLL symbols from Bochs main program.
|
2008-02-06 01:57:43 +03:00
|
|
|
# define BOCHSAPI __declspec(dllimport)
|
2005-06-14 00:28:38 +04:00
|
|
|
# elif BX_PLUGINS
|
2002-10-25 01:07:56 +04:00
|
|
|
// #warning I will export DLL symbols.
|
2008-02-06 01:57:43 +03:00
|
|
|
# define BOCHSAPI __declspec(dllexport)
|
2002-10-25 01:07:56 +04:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
#ifndef BOCHSAPI
|
|
|
|
# define BOCHSAPI
|
|
|
|
#endif
|
|
|
|
|
2002-11-15 21:31:55 +03:00
|
|
|
#if defined(__CYGWIN__)
|
|
|
|
// Make BOCHSAPI_CYGONLY exactly the same as BOCHSAPI. This symbol
|
|
|
|
// will be used for any cases where Cygwin requires a special tag
|
|
|
|
// but VC++ does not.
|
|
|
|
#define BOCHSAPI_CYGONLY BOCHSAPI
|
|
|
|
#else
|
|
|
|
// define the symbol to be empty
|
|
|
|
#define BOCHSAPI_CYGONLY /*empty*/
|
|
|
|
#endif
|
2002-10-25 01:07:56 +04:00
|
|
|
|
2005-06-09 21:42:34 +04:00
|
|
|
#if defined(_MSC_VER)
|
|
|
|
// Make BOCHSAPI_MSVCONLY exactly the same as BOCHSAPI. This symbol
|
|
|
|
// will be used for any cases where VC++ requires a special tag
|
|
|
|
// but Cygwin does not.
|
|
|
|
#define BOCHSAPI_MSVCONLY BOCHSAPI
|
|
|
|
#else
|
|
|
|
// define the symbol to be empty
|
|
|
|
#define BOCHSAPI_MSVCONLY /*empty*/
|
|
|
|
#endif
|
|
|
|
|
2002-10-25 01:07:56 +04:00
|
|
|
#define BX_DEFAULT_CONFIG_INTERFACE "defined_by_configure"
|
|
|
|
#define BX_DEFAULT_DISPLAY_LIBRARY "defined_by_configure"
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2002-01-27 12:24:08 +03:00
|
|
|
// Roland Mainz's idle hack is presently specific to X11. If people try to
|
|
|
|
// enable it elsewhere, give a compile error so that they don't waste their
|
|
|
|
// time trying.
|
2005-06-17 22:37:51 +04:00
|
|
|
#if (BX_USE_IDLE_HACK && !BX_WITH_X11 && !BX_WITH_TERM)
|
|
|
|
# error IDLE_HACK will only work with the X11 or term gui. Correct configure args and retry.
|
2002-01-27 12:24:08 +03:00
|
|
|
#endif
|
|
|
|
|
2001-04-10 05:04:59 +04:00
|
|
|
#define WORDS_BIGENDIAN 0
|
|
|
|
|
|
|
|
#define SIZEOF_UNSIGNED_CHAR 0
|
|
|
|
#define SIZEOF_UNSIGNED_SHORT 0
|
|
|
|
#define SIZEOF_UNSIGNED_INT 0
|
|
|
|
#define SIZEOF_UNSIGNED_LONG 0
|
|
|
|
#define SIZEOF_UNSIGNED_LONG_LONG 0
|
2001-04-10 05:50:00 +04:00
|
|
|
#define SIZEOF_INT_P 0
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2001-04-10 06:06:10 +04:00
|
|
|
#define BX_64BIT_CONSTANTS_USE_LL 1
|
|
|
|
#if BX_64BIT_CONSTANTS_USE_LL
|
|
|
|
// doesn't work on Microsoft Visual C++, maybe others
|
|
|
|
#define BX_CONST64(x) (x##LL)
|
2008-03-26 19:25:05 +03:00
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
#define BX_CONST64(x) (x##I64)
|
2001-04-10 06:06:10 +04:00
|
|
|
#else
|
|
|
|
#define BX_CONST64(x) (x)
|
|
|
|
#endif
|
|
|
|
|
2002-03-06 22:16:40 +03:00
|
|
|
#if defined(WIN32)
|
2001-04-10 05:04:59 +04:00
|
|
|
typedef unsigned char Bit8u;
|
|
|
|
typedef signed char Bit8s;
|
|
|
|
typedef unsigned short Bit16u;
|
|
|
|
typedef signed short Bit16s;
|
|
|
|
typedef unsigned int Bit32u;
|
|
|
|
typedef signed int Bit32s;
|
|
|
|
#ifdef __MINGW32__
|
|
|
|
typedef unsigned long long Bit64u;
|
|
|
|
typedef signed long long Bit64s;
|
2003-10-07 01:36:13 +04:00
|
|
|
#include <sys/types.h>
|
2001-04-10 05:04:59 +04:00
|
|
|
#else
|
|
|
|
typedef unsigned __int64 Bit64u;
|
|
|
|
typedef signed __int64 Bit64s;
|
|
|
|
#endif
|
|
|
|
#elif BX_WITH_MACOS
|
|
|
|
typedef unsigned char Bit8u;
|
|
|
|
typedef signed char Bit8s;
|
|
|
|
typedef unsigned short Bit16u;
|
|
|
|
typedef signed short Bit16s;
|
|
|
|
typedef unsigned int Bit32u;
|
|
|
|
typedef signed int Bit32s;
|
|
|
|
typedef unsigned long long Bit64u;
|
|
|
|
typedef signed long long Bit64s;
|
2002-03-06 22:16:40 +03:00
|
|
|
#else
|
2001-04-10 05:04:59 +04:00
|
|
|
|
|
|
|
// Unix like platforms
|
|
|
|
|
|
|
|
#if SIZEOF_UNSIGNED_CHAR != 1
|
|
|
|
# error "sizeof (unsigned char) != 1"
|
|
|
|
#else
|
|
|
|
typedef unsigned char Bit8u;
|
|
|
|
typedef signed char Bit8s;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if SIZEOF_UNSIGNED_SHORT != 2
|
|
|
|
# error "sizeof (unsigned short) != 2"
|
|
|
|
#else
|
|
|
|
typedef unsigned short Bit16u;
|
|
|
|
typedef signed short Bit16s;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if SIZEOF_UNSIGNED_INT == 4
|
|
|
|
typedef unsigned int Bit32u;
|
|
|
|
typedef signed int Bit32s;
|
|
|
|
#elif SIZEOF_UNSIGNED_LONG == 4
|
|
|
|
typedef unsigned long Bit32u;
|
|
|
|
typedef signed long Bit32s;
|
|
|
|
#else
|
|
|
|
# error "can't find sizeof(type) of 4 bytes!"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if SIZEOF_UNSIGNED_LONG == 8
|
|
|
|
typedef unsigned long Bit64u;
|
|
|
|
typedef signed long Bit64s;
|
|
|
|
#elif SIZEOF_UNSIGNED_LONG_LONG == 8
|
|
|
|
typedef unsigned long long Bit64u;
|
|
|
|
typedef signed long long Bit64s;
|
|
|
|
#else
|
|
|
|
# error "can't find data type of 8 bytes"
|
|
|
|
#endif
|
|
|
|
|
2002-03-06 22:16:40 +03:00
|
|
|
#endif
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2007-01-16 20:46:30 +03:00
|
|
|
#define GET32L(val64) ((Bit32u)(((Bit64u)(val64)) & 0xFFFFFFFF))
|
|
|
|
#define GET32H(val64) ((Bit32u)(((Bit64u)(val64)) >> 32))
|
|
|
|
|
2002-10-14 02:38:17 +04:00
|
|
|
// now that Bit32u and Bit64u exist, defined bx_address
|
|
|
|
#if BX_SUPPORT_X86_64
|
|
|
|
typedef Bit64u bx_address;
|
|
|
|
#else
|
|
|
|
typedef Bit32u bx_address;
|
|
|
|
#endif
|
|
|
|
|
2006-02-23 21:24:56 +03:00
|
|
|
// define physical and linear address types
|
|
|
|
typedef bx_address bx_lin_address;
|
2002-10-14 02:38:17 +04:00
|
|
|
|
2007-04-14 14:05:30 +04:00
|
|
|
#if BX_SUPPORT_X86_64
|
|
|
|
#define BX_LIN_ADDRESS_WIDTH 48
|
|
|
|
#else
|
|
|
|
#define BX_LIN_ADDRESS_WIDTH 32
|
|
|
|
#endif
|
|
|
|
|
2008-05-11 00:39:53 +04:00
|
|
|
#if BX_PHY_ADDRESS_LONG
|
|
|
|
typedef Bit64u bx_phy_address;
|
2010-05-12 18:55:12 +04:00
|
|
|
#if BX_CPU_LEVEL == 5
|
|
|
|
#define BX_PHY_ADDRESS_WIDTH 36
|
|
|
|
#else
|
|
|
|
#define BX_PHY_ADDRESS_WIDTH 40
|
|
|
|
#endif
|
2008-05-11 00:39:53 +04:00
|
|
|
#else
|
|
|
|
typedef Bit32u bx_phy_address;
|
|
|
|
#define BX_PHY_ADDRESS_WIDTH 32
|
|
|
|
#endif
|
|
|
|
|
2008-10-18 22:10:14 +04:00
|
|
|
// small sanity check
|
|
|
|
#if BX_PHY_ADDRESS_LONG
|
|
|
|
#if (BX_PHY_ADDRESS_WIDTH <= 32)
|
|
|
|
#error "BX_PHY_ADDRESS_LONG implies emulated physical address width > 32 bit"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2008-12-01 22:35:25 +03:00
|
|
|
#define BX_PHY_ADDRESS_MASK ((((Bit64u)(1)) << BX_PHY_ADDRESS_WIDTH) - 1)
|
|
|
|
|
2009-10-31 22:16:09 +03:00
|
|
|
#define BX_PHY_ADDRESS_RESERVED_BITS (~BX_PHY_ADDRESS_MASK)
|
2008-12-01 22:35:25 +03:00
|
|
|
|
2002-10-21 15:13:54 +04:00
|
|
|
// technically, in an 8 bit signed the real minimum is -128, not -127.
|
|
|
|
// But if you decide to negate -128 you tend to get -128 again, so it's
|
|
|
|
// better not to use the absolute maximum in the signed range.
|
|
|
|
#define BX_MAX_BIT64U ( (Bit64u) -1 )
|
|
|
|
#define BX_MIN_BIT64U ( 0 )
|
|
|
|
#define BX_MAX_BIT64S ( ((Bit64u) -1) >> 1 )
|
2006-04-22 22:14:55 +04:00
|
|
|
#define BX_MIN_BIT64S ( (Bit64s)-(((Bit64u) -1) >> 1) )
|
2002-10-21 15:13:54 +04:00
|
|
|
#define BX_MAX_BIT32U ( (Bit32u) -1 )
|
|
|
|
#define BX_MIN_BIT32U ( 0 )
|
|
|
|
#define BX_MAX_BIT32S ( ((Bit32u) -1) >> 1 )
|
2006-04-22 22:14:55 +04:00
|
|
|
#define BX_MIN_BIT32S ( (Bit32s)-(((Bit32u) -1) >> 1) )
|
2002-10-21 15:13:54 +04:00
|
|
|
#define BX_MAX_BIT16U ( (Bit16u) -1 )
|
|
|
|
#define BX_MIN_BIT16U ( 0 )
|
|
|
|
#define BX_MAX_BIT16S ( ((Bit16u) -1) >> 1 )
|
2006-04-22 22:14:55 +04:00
|
|
|
#define BX_MIN_BIT16S ( (Bit16s)-(((Bit16u) -1) >> 1) )
|
2002-10-21 15:13:54 +04:00
|
|
|
#define BX_MAX_BIT8U ( (Bit8u) -1 )
|
|
|
|
#define BX_MIN_BIT8U ( 0 )
|
|
|
|
#define BX_MAX_BIT8S ( ((Bit8u) -1) >> 1 )
|
2006-04-22 22:14:55 +04:00
|
|
|
#define BX_MIN_BIT8S ( (Bit8s)-(((Bit8u) -1) >> 1) )
|
2001-06-20 18:01:39 +04:00
|
|
|
|
|
|
|
|
2001-04-10 05:50:00 +04:00
|
|
|
// create an unsigned integer type that is the same size as a pointer.
|
2008-02-06 01:57:43 +03:00
|
|
|
// You can typecast a pointer to a bx_pr_equiv_t without losing any
|
2008-09-18 23:44:20 +04:00
|
|
|
// bits (and without getting the compiler excited).
|
2001-04-10 05:50:00 +04:00
|
|
|
#if SIZEOF_INT_P == 4
|
|
|
|
typedef Bit32u bx_ptr_equiv_t;
|
|
|
|
#elif SIZEOF_INT_P == 8
|
|
|
|
typedef Bit64u bx_ptr_equiv_t;
|
|
|
|
#else
|
2001-04-10 06:31:24 +04:00
|
|
|
# error "could not define bx_ptr_equiv_t to size of int*"
|
2001-04-10 05:50:00 +04:00
|
|
|
#endif
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2002-10-25 15:44:41 +04:00
|
|
|
// Use a boolean type that will not conflict with the builtin type
|
|
|
|
// on any system.
|
|
|
|
typedef Bit32u bx_bool;
|
2001-04-10 05:04:59 +04:00
|
|
|
|
|
|
|
#if BX_WITH_MACOS
|
|
|
|
# define bx_ptr_t char *
|
|
|
|
#else
|
|
|
|
# define bx_ptr_t void *
|
|
|
|
#endif
|
|
|
|
|
2002-03-06 22:16:40 +03:00
|
|
|
#if defined(WIN32)
|
2001-04-10 05:04:59 +04:00
|
|
|
# define BX_LITTLE_ENDIAN
|
|
|
|
#elif BX_WITH_MACOS
|
|
|
|
# define BX_BIG_ENDIAN
|
|
|
|
#else
|
|
|
|
#if WORDS_BIGENDIAN
|
|
|
|
# define BX_BIG_ENDIAN
|
|
|
|
#else
|
|
|
|
# define BX_LITTLE_ENDIAN
|
|
|
|
#endif
|
2002-03-06 22:16:40 +03:00
|
|
|
#endif // defined(WIN32)
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2002-09-15 09:29:06 +04:00
|
|
|
|
|
|
|
#if BX_SUPPORT_X86_64
|
|
|
|
#ifdef BX_LITTLE_ENDIAN
|
|
|
|
typedef
|
|
|
|
struct {
|
|
|
|
Bit64u lo;
|
|
|
|
Bit64u hi;
|
|
|
|
} Bit128u;
|
|
|
|
typedef
|
|
|
|
struct {
|
|
|
|
Bit64u lo;
|
|
|
|
Bit64s hi;
|
|
|
|
} Bit128s;
|
|
|
|
#else // must be Big Endian
|
|
|
|
typedef
|
|
|
|
struct {
|
|
|
|
Bit64u hi;
|
|
|
|
Bit64u lo;
|
|
|
|
} Bit128u;
|
|
|
|
typedef
|
|
|
|
struct {
|
|
|
|
Bit64s hi;
|
|
|
|
Bit64u lo;
|
|
|
|
} Bit128s;
|
|
|
|
#endif
|
|
|
|
#endif // #if BX_SUPPORT_X86_64
|
|
|
|
|
|
|
|
|
2001-05-09 00:18:04 +04:00
|
|
|
// for now only term.cc requires a GUI sighandler.
|
|
|
|
#define BX_GUI_SIGHANDLER (BX_WITH_TERM)
|
|
|
|
|
2001-04-10 05:04:59 +04:00
|
|
|
#define HAVE_SIGACTION 1
|
|
|
|
|
2001-04-10 06:10:09 +04:00
|
|
|
// configure will change the definition of "inline" to the value
|
|
|
|
// that the C compiler allows. It tests the following keywords to
|
|
|
|
// see if any is permitted: inline, __inline__, __inline. If none
|
|
|
|
// is permitted, it defines inline to be empty.
|
2001-04-10 05:04:59 +04:00
|
|
|
#define inline inline
|
|
|
|
|
2001-04-10 06:10:09 +04:00
|
|
|
// Use BX_CPP_INLINE for all C++ inline functions. Note that the
|
|
|
|
// word "inline" itself may now be redefined by the above #define.
|
|
|
|
#define BX_CPP_INLINE inline
|
|
|
|
|
2002-09-19 23:17:20 +04:00
|
|
|
#ifdef __GNUC__
|
2002-10-06 18:16:23 +04:00
|
|
|
|
|
|
|
// Some helpful compiler hints for compilers that allow them; GCC for now.
|
|
|
|
//
|
|
|
|
// BX_CPP_AlignN(n):
|
|
|
|
// Align a construct on an n-byte boundary.
|
|
|
|
//
|
|
|
|
// BX_CPP_AttrPrintf(formatArg, firstArg):
|
|
|
|
// This function takes printf-like arguments, so the compiler can check
|
|
|
|
// the consistency of the format string and the matching arguments.
|
|
|
|
// 'formatArg' is the parameter number (starting from 1) of the format
|
|
|
|
// string argument. 'firstArg' is the parameter number of the 1st argument
|
|
|
|
// to check against the string argument. NOTE: For non-static member
|
|
|
|
// functions, the this-ptr is argument number 1 but is invisible on
|
|
|
|
// the function prototype declaration - but you still have to count it.
|
|
|
|
//
|
|
|
|
// BX_CPP_AttrNoReturn():
|
|
|
|
// This function never returns. The compiler can optimize-out following
|
|
|
|
// code accordingly.
|
|
|
|
|
2002-09-19 23:17:20 +04:00
|
|
|
#define BX_CPP_AlignN(n) __attribute__ ((aligned (n)))
|
2002-10-06 18:16:23 +04:00
|
|
|
#define BX_CPP_AttrPrintf(formatArg, firstArg) \
|
|
|
|
__attribute__ ((format (printf, formatArg, firstArg)))
|
|
|
|
#define BX_CPP_AttrNoReturn() __attribute__ ((noreturn))
|
|
|
|
|
2002-09-20 01:42:24 +04:00
|
|
|
#else
|
2002-10-06 18:16:23 +04:00
|
|
|
|
|
|
|
#define BX_CPP_AlignN(n) /* Not supported. */
|
|
|
|
#define BX_CPP_AttrPrintf(formatArg, firstArg) /* Not supported. */
|
|
|
|
#define BX_CPP_AttrNoReturn() /* Not supported. */
|
|
|
|
|
2002-09-19 23:17:20 +04:00
|
|
|
#endif
|
|
|
|
|
2009-04-23 22:28:17 +04:00
|
|
|
#define BX_GDBSTUB 0
|
2009-01-12 22:15:35 +03:00
|
|
|
#define BX_DEBUGGER 0
|
|
|
|
#define BX_DISASM 0
|
|
|
|
#define BX_DEBUGGER_GUI 0
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2005-03-26 22:44:21 +03:00
|
|
|
#if (BX_DEBUGGER == 1) && (BX_DISASM == 0)
|
2008-10-18 22:10:14 +04:00
|
|
|
#error Dissembler is required for BX_DEBUGGER !
|
2005-03-26 22:44:21 +03:00
|
|
|
#endif
|
|
|
|
|
2001-04-10 05:04:59 +04:00
|
|
|
#define BX_INSTRUMENTATION 0
|
|
|
|
|
2007-10-30 21:57:46 +03:00
|
|
|
// enable BX_DEBUG/BX_ERROR/BX_INFO messages
|
|
|
|
#define BX_NO_LOGGING 0
|
|
|
|
|
2008-06-13 01:02:54 +04:00
|
|
|
// enable BX_ASSERT checks
|
|
|
|
#define BX_ASSERT_ENABLE 0
|
|
|
|
|
2001-04-10 05:04:59 +04:00
|
|
|
// limited i440FX PCI support
|
2004-08-06 19:49:55 +04:00
|
|
|
#define BX_SUPPORT_PCI 0
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2004-08-16 12:07:23 +04:00
|
|
|
// CLGD54XX emulation
|
|
|
|
#define BX_SUPPORT_CLGD54XX 0
|
|
|
|
|
2004-01-15 05:08:37 +03:00
|
|
|
// Experimental host PCI device mapping
|
2004-08-06 19:49:55 +04:00
|
|
|
#define BX_SUPPORT_PCIDEV 0
|
2008-02-06 01:57:43 +03:00
|
|
|
|
2004-08-06 19:49:55 +04:00
|
|
|
#if (BX_SUPPORT_PCIDEV && !BX_SUPPORT_PCI)
|
2008-10-18 22:10:14 +04:00
|
|
|
#error To enable PCI host device mapping, you must also enable PCI
|
2004-01-15 05:08:37 +03:00
|
|
|
#endif
|
|
|
|
|
2003-01-28 19:58:10 +03:00
|
|
|
// limited USB on PCI
|
2009-01-19 12:48:12 +03:00
|
|
|
#define BX_SUPPORT_USB_UHCI 0
|
|
|
|
#define BX_SUPPORT_USB_OHCI 0
|
|
|
|
#define BX_SUPPORT_PCIUSB (BX_SUPPORT_USB_UHCI || BX_SUPPORT_USB_OHCI)
|
2003-01-28 19:58:10 +03:00
|
|
|
|
2004-08-06 19:49:55 +04:00
|
|
|
#if (BX_SUPPORT_PCIUSB && !BX_SUPPORT_PCI)
|
2008-10-18 22:10:14 +04:00
|
|
|
#error To enable USB, you must also enable PCI
|
2003-01-28 19:58:10 +03:00
|
|
|
#endif
|
|
|
|
|
2009-01-19 12:48:12 +03:00
|
|
|
// Experimental bus mouse support
|
2004-12-11 11:35:33 +03:00
|
|
|
#define BX_SUPPORT_BUSMOUSE 0
|
|
|
|
|
2007-08-01 00:25:52 +04:00
|
|
|
#define BX_SUPPORT_ALIGNMENT_CHECK 0
|
2001-04-10 05:04:59 +04:00
|
|
|
#define BX_SUPPORT_FPU 0
|
2003-05-15 20:41:17 +04:00
|
|
|
#define BX_SUPPORT_3DNOW 0
|
2007-07-15 23:03:39 +04:00
|
|
|
#define BX_SUPPORT_MISALIGNED_SSE 0
|
2007-10-12 01:29:01 +04:00
|
|
|
#define BX_SUPPORT_MONITOR_MWAIT 0
|
2009-01-31 13:43:24 +03:00
|
|
|
#define BX_SUPPORT_VMX 0
|
2011-03-19 23:09:34 +03:00
|
|
|
#define BX_SUPPORT_AVX 0
|
2005-11-27 00:36:51 +03:00
|
|
|
|
2010-04-04 21:08:40 +04:00
|
|
|
#if BX_SUPPORT_VMX >= 2 && BX_SUPPORT_X86_64 == 0
|
|
|
|
#error "VMXx2 require x86-64 support"
|
|
|
|
#endif
|
|
|
|
|
2002-09-02 22:44:35 +04:00
|
|
|
#define BX_SupportRepeatSpeedups 0
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2007-12-09 21:36:05 +03:00
|
|
|
#define BX_SUPPORT_TRACE_CACHE 0
|
|
|
|
|
2008-08-19 20:43:07 +04:00
|
|
|
#if BX_SUPPORT_3DNOW
|
|
|
|
#define BX_CPU_VENDOR_INTEL 0
|
|
|
|
#else
|
|
|
|
#define BX_CPU_VENDOR_INTEL 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Maximum CPUID vendor and brand string lengths
|
|
|
|
#define BX_CPUID_VENDOR_LEN 12
|
|
|
|
#define BX_CPUID_BRAND_LEN 48
|
|
|
|
|
2008-12-28 23:30:48 +03:00
|
|
|
#define BX_CONFIGURE_MSRS 0
|
|
|
|
|
2007-08-01 00:25:52 +04:00
|
|
|
#if (BX_SUPPORT_ALIGNMENT_CHECK && BX_CPU_LEVEL < 4)
|
2008-10-18 22:10:14 +04:00
|
|
|
#error Alignment exception check is not supported in i386 !
|
2007-08-01 00:25:52 +04:00
|
|
|
#endif
|
|
|
|
|
2008-12-28 23:30:48 +03:00
|
|
|
#if (BX_CONFIGURE_MSRS && BX_CPU_LEVEL < 5)
|
|
|
|
#error MSRs are supported only with CPU level >= 5 !
|
|
|
|
#endif
|
|
|
|
|
2007-12-17 00:06:44 +03:00
|
|
|
#if (!BX_SUPPORT_FPU && BX_CPU_LEVEL > 4)
|
2008-10-18 22:10:14 +04:00
|
|
|
#error With CPU level > 4, you must enable FPU support !
|
2002-09-22 20:11:12 +04:00
|
|
|
#endif
|
|
|
|
|
2005-10-17 03:13:19 +04:00
|
|
|
#if (BX_SUPPORT_FPU && BX_CPU_LEVEL < 3)
|
2008-10-18 22:10:14 +04:00
|
|
|
#error "FPU cannot be compiled without cpu level >= 3 !"
|
2002-10-11 05:11:11 +04:00
|
|
|
#endif
|
|
|
|
|
2009-01-31 13:43:24 +03:00
|
|
|
#if (BX_CPU_LEVEL<6 && BX_SUPPORT_VMX)
|
|
|
|
#error "VMX only supported with CPU_LEVEL >= 6 !"
|
|
|
|
#endif
|
|
|
|
|
2002-09-25 07:58:40 +04:00
|
|
|
#if BX_SUPPORT_X86_64
|
|
|
|
// Sanity checks to ensure that you cannot accidently use conflicting options.
|
|
|
|
|
2006-01-13 14:10:29 +03:00
|
|
|
#if BX_CPU_LEVEL < 6
|
2008-10-18 22:10:14 +04:00
|
|
|
#error "X86-64 requires cpu level 6 or greater !"
|
2002-09-25 07:58:40 +04:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2010-02-12 13:42:57 +03:00
|
|
|
// We have tested the following combinations:
|
|
|
|
// * processors=1, bootstrap=0, ioapic_id=1 (uniprocessor system)
|
|
|
|
// * processors=2, bootstrap=0, ioapic_id=2
|
|
|
|
// * processors=4, bootstrap=0, ioapic_id=4
|
|
|
|
// * processors=8, bootstrap=0, ioapic_id=8
|
|
|
|
#define BX_SUPPORT_SMP 0
|
|
|
|
#define BX_BOOTSTRAP_PROCESSOR 0
|
|
|
|
|
2010-02-28 17:52:17 +03:00
|
|
|
// For P6 and Pentium family processors the local APIC ID feild is 4 bits
|
|
|
|
// APIC_MAX_ID indicate broadcast so it can't be used as valid APIC ID
|
|
|
|
#define BX_MAX_SMP_THREADS_SUPPORTED 0xfe /* leave APIC ID for I/O APIC */
|
|
|
|
|
2009-02-20 18:47:04 +03:00
|
|
|
// include in APIC models, required for a multiprocessor system.
|
2009-11-20 17:58:48 +03:00
|
|
|
#if BX_SUPPORT_SMP || BX_CPU_LEVEL >= 5
|
|
|
|
#define BX_SUPPORT_APIC 1
|
|
|
|
#else
|
|
|
|
#define BX_SUPPORT_APIC 0
|
|
|
|
#endif
|
2009-02-20 18:47:04 +03:00
|
|
|
|
2001-11-11 08:43:12 +03:00
|
|
|
#define BX_HAVE_GETENV 0
|
2002-11-18 05:32:53 +03:00
|
|
|
#define BX_HAVE_SETENV 0
|
2001-04-10 05:04:59 +04:00
|
|
|
#define BX_HAVE_SELECT 0
|
2001-04-10 05:50:00 +04:00
|
|
|
#define BX_HAVE_SNPRINTF 0
|
2004-02-08 13:22:29 +03:00
|
|
|
#define BX_HAVE_VSNPRINTF 0
|
2001-04-10 05:50:00 +04:00
|
|
|
#define BX_HAVE_STRTOULL 0
|
2001-05-17 10:59:23 +04:00
|
|
|
#define BX_HAVE_STRTOUQ 0
|
2001-04-10 05:59:07 +04:00
|
|
|
#define BX_HAVE_STRDUP 0
|
2003-01-11 01:32:46 +03:00
|
|
|
#define BX_HAVE_STRREV 0
|
2009-02-02 22:10:13 +03:00
|
|
|
#define BX_HAVE_STRICMP 0
|
|
|
|
#define BX_HAVE_STRCASECMP 0
|
2001-06-12 07:37:55 +04:00
|
|
|
#define BX_HAVE_STRUCT_TIMEVAL 0
|
2003-08-18 03:40:39 +04:00
|
|
|
|
|
|
|
// used in term gui
|
2008-02-06 01:57:43 +03:00
|
|
|
#define BX_HAVE_COLOR_SET 0
|
2003-08-18 03:40:39 +04:00
|
|
|
#define BX_HAVE_MVHLINE 0
|
|
|
|
#define BX_HAVE_MVVLINE 0
|
|
|
|
|
2001-04-10 05:50:00 +04:00
|
|
|
|
|
|
|
// set if your compiler does not understand __attribute__ after a struct
|
|
|
|
#define BX_NO_ATTRIBUTES 0
|
|
|
|
#if BX_NO_ATTRIBUTES
|
|
|
|
#define GCC_ATTRIBUTE(x) /* attribute not supported */
|
|
|
|
#else
|
|
|
|
#define GCC_ATTRIBUTE __attribute__
|
|
|
|
#endif
|
|
|
|
|
2003-03-03 02:59:12 +03:00
|
|
|
// set to use fast function calls
|
|
|
|
#define BX_FAST_FUNC_CALL 0
|
|
|
|
|
|
|
|
// On gcc2.95+ x86 only
|
|
|
|
#if BX_FAST_FUNC_CALL && defined(__i386__) && defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
2005-02-05 17:54:12 +03:00
|
|
|
#if BX_USE_CPU_SMF == 1
|
2003-03-03 02:59:12 +03:00
|
|
|
# define BX_CPP_AttrRegparmN(X) __attribute__((regparm(X)))
|
|
|
|
#else
|
2006-01-11 22:08:10 +03:00
|
|
|
// FIXME: BX_FAST_FUNC_CALL doesn't work with BX_USE_CPU_SMF = 0
|
2005-02-05 17:54:12 +03:00
|
|
|
# define BX_CPP_AttrRegparmN(X) /* Not defined */
|
|
|
|
#endif
|
|
|
|
#else
|
2003-03-03 02:59:12 +03:00
|
|
|
# define BX_CPP_AttrRegparmN(X) /* Not defined */
|
|
|
|
#endif
|
|
|
|
|
2003-12-08 02:35:48 +03:00
|
|
|
// set if you do have <set>, used in bx_debug/dbg_main.c
|
2003-08-04 20:03:09 +04:00
|
|
|
#define BX_HAVE_SET 0
|
|
|
|
|
2003-12-08 02:35:48 +03:00
|
|
|
// set if you do have <set.h>, used in bx_debug/dbg_main.c
|
2003-08-04 20:03:09 +04:00
|
|
|
#define BX_HAVE_SET_H 0
|
|
|
|
|
2009-05-03 22:31:23 +04:00
|
|
|
// set if you do have <map>, used in bx_debug/dbg_main.c
|
|
|
|
#define BX_HAVE_MAP 0
|
|
|
|
|
|
|
|
// set if you do have <map.h>, used in bx_debug/dbg_main.c
|
|
|
|
#define BX_HAVE_MAP_H 0
|
|
|
|
|
2009-03-24 18:23:05 +03:00
|
|
|
// Support x86 hardware debugger registers and facilities.
|
|
|
|
// These are the debug facilities offered by the x86 architecture,
|
2001-04-10 05:04:59 +04:00
|
|
|
// not the optional built-in debugger.
|
|
|
|
#define BX_X86_DEBUGGER 0
|
|
|
|
|
|
|
|
#define BX_SUPPORT_CDROM 0
|
|
|
|
|
|
|
|
#if BX_SUPPORT_CDROM
|
|
|
|
// This is the C++ class name to use if we are supporting
|
|
|
|
// low-level CDROM.
|
|
|
|
# define LOWLEVEL_CDROM cdrom_interface
|
|
|
|
#endif
|
|
|
|
|
2001-05-23 04:46:47 +04:00
|
|
|
// NE2K network emulation
|
2004-08-06 19:49:55 +04:00
|
|
|
#define BX_SUPPORT_NE2K 0
|
2004-10-04 00:06:12 +04:00
|
|
|
|
|
|
|
// Pseudo PCI NIC
|
|
|
|
#define BX_SUPPORT_PCIPNIC 0
|
|
|
|
|
|
|
|
#if (BX_SUPPORT_PCIPNIC && !BX_SUPPORT_PCI)
|
2008-10-18 22:10:14 +04:00
|
|
|
#error To enable the PCI pseudo NIC, you must also enable PCI
|
2004-10-04 00:06:12 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// this enables the lowlevel stuff below if one of the NICs is present
|
|
|
|
#define BX_NETWORKING 0
|
|
|
|
|
2011-02-26 23:10:06 +03:00
|
|
|
// which networking modules will be enabled
|
|
|
|
// determined by configure script
|
|
|
|
#define BX_NETMOD_ARPBACK 0
|
|
|
|
#define BX_NETMOD_FBSD 0
|
|
|
|
#define BX_NETMOD_LINUX 0
|
|
|
|
#define BX_NETMOD_WIN32 0
|
|
|
|
#define BX_NETMOD_TAP 0
|
|
|
|
#define BX_NETMOD_TUNTAP 0
|
|
|
|
#define BX_NETMOD_VDE 0
|
2011-02-27 11:08:12 +03:00
|
|
|
#define BX_NETMOD_SLIRP 0
|
2011-02-26 23:10:06 +03:00
|
|
|
|
2011-03-12 20:37:26 +03:00
|
|
|
// Soundcard and gameport support
|
|
|
|
#define BX_SUPPORT_SB16 0
|
|
|
|
#define BX_SUPPORT_ES1370 0
|
|
|
|
#define BX_SUPPORT_GAMEPORT 0
|
2011-03-19 15:57:13 +03:00
|
|
|
#define BX_SUPPORT_SOUNDLOW 0
|
2011-03-12 20:37:26 +03:00
|
|
|
|
2011-03-19 15:57:13 +03:00
|
|
|
#if BX_SUPPORT_SOUNDLOW
|
|
|
|
// Determines which sound lowlevel class is to be used.
|
2011-03-12 20:37:26 +03:00
|
|
|
// Currently the following are available:
|
|
|
|
// bx_sound_linux_c Output for Linux, to /dev/dsp and /dev/midi00
|
2011-03-19 15:57:13 +03:00
|
|
|
// or ALSA PCM and sequencer interface
|
2011-03-12 20:37:26 +03:00
|
|
|
// bx_sound_windows_c Output for Windows midi and wave mappers
|
2011-03-19 15:57:13 +03:00
|
|
|
// bx_sound_osx_c Output for MacOSX midi and wave device
|
|
|
|
// bx_sound_lowlevel_c Dummy functions, no output
|
|
|
|
#define BX_SOUND_LOWLEVEL_C bx_sound_lowlevel_c
|
2011-03-12 20:37:26 +03:00
|
|
|
// Use ALSA sound interface on Linux
|
|
|
|
#define BX_HAVE_ALSASOUND 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (BX_SUPPORT_ES1370 && !BX_SUPPORT_PCI)
|
|
|
|
#error To enable the ES1370 soundcard, you must also enable PCI
|
|
|
|
#endif
|
2011-02-26 23:10:06 +03:00
|
|
|
|
|
|
|
// I/O Interface to debugger
|
2004-08-06 19:49:55 +04:00
|
|
|
#define BX_SUPPORT_IODEBUG 0
|
2001-09-14 18:51:26 +04:00
|
|
|
|
2002-08-28 12:29:19 +04:00
|
|
|
#ifdef WIN32
|
2002-08-28 19:26:09 +04:00
|
|
|
#define BX_FLOPPY0_NAME "Floppy Disk A:"
|
|
|
|
#define BX_FLOPPY1_NAME "Floppy Disk B:"
|
2002-08-28 12:29:19 +04:00
|
|
|
#else
|
2002-08-28 19:26:09 +04:00
|
|
|
#define BX_FLOPPY0_NAME "Floppy Disk 0"
|
|
|
|
#define BX_FLOPPY1_NAME "Floppy Disk 1"
|
2002-08-28 12:29:19 +04:00
|
|
|
#endif
|
|
|
|
|
2011-05-08 00:22:54 +04:00
|
|
|
#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 0)
|
|
|
|
#error "gcc 4.0.0 is know to produce incorrect code which breaks Bochs emulation"
|
|
|
|
#endif
|
|
|
|
|
2001-04-10 05:04:59 +04:00
|
|
|
#endif // _BX_CONFIG_H
|