From 906310874d41c531eacbef6afe03828a97532366 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Sat, 2 Sep 2023 15:11:38 +0300 Subject: [PATCH] WIP: Say hello to meson build system Closed: #7 --- bochs/bx_debug/meson.build | 19 + bochs/bx_debug/parser.y | 2 + bochs/config.h.meson.in | 904 ++++++++++++++++++++++++++++ bochs/cpu/avx/meson.build | 28 + bochs/cpu/cpudb/meson.build | 34 ++ bochs/cpu/decoder/meson.build | 7 + bochs/cpu/fpu/meson.build | 25 + bochs/cpu/meson.build | 101 ++++ bochs/gui/meson.build | 53 ++ bochs/host/linux/pcidev/meson.build | 1 + bochs/instrument/stubs/meson.build | 3 + bochs/iodev/display/meson.build | 9 + bochs/iodev/hdimage/meson.build | 21 + bochs/iodev/meson.build | 42 ++ bochs/iodev/network/meson.build | 18 + bochs/iodev/sound/meson.build | 15 + bochs/iodev/usb/meson.build | 17 + bochs/memory/meson.build | 6 + bochs/meson.build | 250 ++++++++ bochs/meson.options | 153 +++++ 20 files changed, 1708 insertions(+) create mode 100644 bochs/bx_debug/meson.build create mode 100644 bochs/config.h.meson.in create mode 100644 bochs/cpu/avx/meson.build create mode 100644 bochs/cpu/cpudb/meson.build create mode 100644 bochs/cpu/decoder/meson.build create mode 100644 bochs/cpu/fpu/meson.build create mode 100644 bochs/cpu/meson.build create mode 100644 bochs/gui/meson.build create mode 100644 bochs/host/linux/pcidev/meson.build create mode 100644 bochs/instrument/stubs/meson.build create mode 100644 bochs/iodev/display/meson.build create mode 100644 bochs/iodev/hdimage/meson.build create mode 100644 bochs/iodev/meson.build create mode 100644 bochs/iodev/network/meson.build create mode 100644 bochs/iodev/sound/meson.build create mode 100644 bochs/iodev/usb/meson.build create mode 100644 bochs/memory/meson.build create mode 100644 bochs/meson.build create mode 100644 bochs/meson.options diff --git a/bochs/bx_debug/meson.build b/bochs/bx_debug/meson.build new file mode 100644 index 0000000000..fdd9b2bc22 --- /dev/null +++ b/bochs/bx_debug/meson.build @@ -0,0 +1,19 @@ +flex = find_program('flex', required: false) +yacc = find_program('yacc', required: false) + +sources = [ + 'dbg_breakpoints.cc', + 'dbg_main.cc', + 'linux.cc', + 'symbols.cc' +] + +if flex.found() and yacc.found() + lgen = generator(flex, output : '@PLAINNAME@.c', arguments : ['-Pbx', '-o', '@OUTPUT@', '@INPUT@']) + ygen = generator(yacc, output : '@PLAINNAME@.cc', arguments : ['-p', 'bx', '-d', '-o', '@OUTPUT@', '@INPUT@']) + sources += [lgen.process('lexer.l'), ygen.process('parser.y')] +else + sources += ['parser.cc', 'lexer.c'] +endif + +bx_deps += static_library('debug', sources, include_directories: [top_include]) diff --git a/bochs/bx_debug/parser.y b/bochs/bx_debug/parser.y index 3affacce05..c009dcb0e4 100644 --- a/bochs/bx_debug/parser.y +++ b/bochs/bx_debug/parser.y @@ -1532,3 +1532,5 @@ expression: ; %% + +#endif /* if BX_DEBUGGER */ diff --git a/bochs/config.h.meson.in b/bochs/config.h.meson.in new file mode 100644 index 0000000000..6d440fca32 --- /dev/null +++ b/bochs/config.h.meson.in @@ -0,0 +1,904 @@ +// +// Copyright (C) 2001-2021 The Bochs Project +// +// 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. +// +// 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. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// + +// +// 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. +// +// 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. +// + +#ifndef _BX_CONFIG_H_ +#define _BX_CONFIG_H_ 1 + +/////////////////////////////////////////////////////////////////// +// USER CONFIGURABLE OPTIONS : EDIT ONLY OPTIONS IN THIS SECTION // +/////////////////////////////////////////////////////////////////// + + +#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 + +// if simulating Linux, this provides a few more debugging options +// such as tracing all system calls. +#define BX_DEBUG_LINUX 0 + +// adds support for the GNU readline library in the debugger command +// prompt. +#mesondefine HAVE_LIBREADLINE +#mesondefine HAVE_READLINE_HISTORY_H + +// Define to 1 if you have +#mesondefine HAVE_LOCALE_H + +// 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. +#define BX_TIMER_DEBUG 0 + +// 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 + +#mesondefine BX_SUPPORT_A20 + +// 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 + + +#define MSVC_TARGET 0 +#if defined(_MSC_VER) && defined(MSVC_TARGET) +#if defined(_M_X64) && (MSVC_TARGET != 64) +#error Bochs not configured for MSVC WIN64 +#elif !defined(_M_X64) && (MSVC_TARGET != 32) +#error Bochs not configured for MSVC WIN32 +#endif +#endif + +#if (BX_SHOW_IPS) && (defined(__MINGW32__) || defined(_MSC_VER)) +#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. + +#mesondefine BX_DMA_FLOPPY_IO + +// Default number of Megs of memory to emulate. The +// 'megs:' directive in the '.bochsrc' file overrides this, +// allowing per-run settings. + +#define BX_DEFAULT_MEM_MEGS 32 + + +// CPU level emulation. Default level is set in the configure script. +// BX_CPU_LEVEL defines the CPU level to emulate. +#mesondefine BX_CPU_LEVEL + +// emulate x86-64 instruction set? +#mesondefine BX_SUPPORT_X86_64 + +// emulate long physical address (>32 bit) +#mesondefine BX_PHY_ADDRESS_LONG + +#mesondefine BX_HAVE_SLEEP +#mesondefine BX_HAVE_MSLEEP +#mesondefine BX_HAVE_USLEEP +#mesondefine BX_HAVE_NANOSLEEP +#mesondefine BX_HAVE_ABORT +#mesondefine BX_HAVE_SOCKLEN_T +#mesondefine BX_HAVE_SOCKADDR_IN_SIN_LEN +#mesondefine BX_HAVE_GETTIMEOFDAY +#if defined(WIN32) +#define BX_HAVE_REALTIME_USEC 1 +#else +#define BX_HAVE_REALTIME_USEC (BX_HAVE_GETTIMEOFDAY) +#endif +#mesondefine BX_HAVE_MKSTEMP +#mesondefine BX_HAVE_SYS_MMAN_H +#mesondefine BX_HAVE_XPM_H +#mesondefine BX_HAVE_XRANDR_H +#mesondefine BX_HAVE_TIMELOCAL +#mesondefine BX_HAVE_GMTIME +#mesondefine BX_HAVE_MKTIME +#mesondefine BX_HAVE_TMPFILE64 +#mesondefine BX_HAVE_FSEEK64 +#mesondefine BX_HAVE_FSEEKO64 +#mesondefine BX_HAVE_NET_IF_H +#mesondefine BX_HAVE___BUILTIN_BSWAP32 +#mesondefine BX_HAVE___BUILTIN_BSWAP64 +#mesondefine BX_HAVE_SSIZE_T + +// This turns on Roland Mainz's idle hack. Presently it is specific to the X11 +// 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. +#mesondefine BX_USE_IDLE_HACK + +// 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 1000000 + +// Minimum and maximum values for SMP quantum variable. Defines +// how many instructions each CPU could execute in one +// shot (one cpu_loop call) +#define BX_SMP_QUANTUM_MIN 1 +#define BX_SMP_QUANTUM_MAX 32 + +// 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. +#mesondefine BX_USE_CPU_SMF + +#mesondefine BX_USE_MEM_SMF + +// 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 + +#mesondefine BX_USE_HD_SMF +#mesondefine BX_USE_BIOS_SMF +#mesondefine BX_USE_CMOS_SMF +#mesondefine BX_USE_DMA_SMF +#mesondefine BX_USE_FD_SMF +#mesondefine BX_USE_KEY_SMF +#mesondefine BX_USE_PAR_SMF +#mesondefine BX_USE_PIC_SMF +#mesondefine BX_USE_PIT_SMF +#mesondefine BX_USE_SER_SMF +#mesondefine BX_USE_UM_SMF +#mesondefine BX_USE_VGA_SMF +#mesondefine BX_USE_SB16_SMF +#mesondefine BX_USE_ES1370_SMF +#mesondefine BX_USE_DEV_SMF +#mesondefine BX_USE_PCI_SMF +#mesondefine BX_USE_P2I_SMF +#mesondefine BX_USE_PIDE_SMF +#mesondefine BX_USE_PCIDEV_SMF +#mesondefine BX_USE_USB_UHCI_SMF +#mesondefine BX_USE_USB_OHCI_SMF +#mesondefine BX_USE_USB_EHCI_SMF +#mesondefine BX_USE_USB_XHCI_SMF +#mesondefine BX_USE_PCIPNIC_SMF +#mesondefine BX_USE_EFI_SMF +#mesondefine BX_USE_GAMEPORT_SMF +#mesondefine BX_USE_CIRRUS_SMF +#mesondefine BX_USE_BUSM_SMF +#mesondefine BX_USE_ACPI_SMF + +#mesondefine BX_PLUGINS +#mesondefine BX_HAVE_LTDL +#mesondefine BX_HAVE_DLFCN_H + +#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 \ + || !BX_USE_SB16_SMF || !BX_USE_ES1370_SMF || !BX_USE_DEV_SMF \ + || !BX_USE_PCI_SMF || !BX_USE_P2I_SMF || !BX_USE_USB_UHCI_SMF \ + || !BX_USE_USB_OHCI_SMF || !BX_USE_USB_EHCI_SMF || !BX_USE_USB_XHCI_SMF \ + || !BX_USE_PCIPNIC_SMF || !BX_USE_PIDE_SMF || !BX_USE_ACPI_SMF \ + || !BX_USE_EFI_SMF || !BX_USE_GAMEPORT_SMF || !BX_USE_PCIDEV_SMF \ + || !BX_USE_CIRRUS_SMF) +#error You must use SMF to have plugins +#endif + +#mesondefine BX_USE_RAW_SERIAL + +// This option enables RAM file backing for large guest memory with a smaller +// amount host memory, without causing a panic when host memory is exhausted. +#mesondefine BX_LARGE_RAMFILE + +// 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) + #error "BX_MAX_ATA_CHANNEL should be between 1 and 4" +#endif + +// ================================================================= +// 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. +// Enable only those you need. Recommend using only linear +// breakpoints, unless you need others. Less supported means +// slightly faster execution time. +#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 + +// 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 // +////////////////////////////////////////////////////////////////////// + + +#mesondefine BX_WITH_X11 +#mesondefine BX_WITH_WIN32 +#mesondefine BX_WITH_MACOS +#mesondefine BX_WITH_CARBON +#mesondefine BX_WITH_NOGUI +#mesondefine BX_WITH_TERM +#mesondefine BX_WITH_RFB +#mesondefine BX_WITH_VNCSRV +#mesondefine BX_WITH_AMIGAOS +#mesondefine BX_WITH_SDL +#mesondefine BX_WITH_SDL2 +#mesondefine BX_WITH_WX + +// BX_USE_TEXTCONFIG should be set to 1 unless Bochs is compiled +// for wxWidgets only. +#mesondefine BX_USE_TEXTCONFIG + +// BX_USE_GUI should be set to 1 for all guis with VGA console support +// for 'textconfig'. +#mesondefine BX_USE_GUI_CONSOLE + +// BX_USE_WIN32CONFIG should be set to 1 on WIN32 for the guis +// "win32", "sdl" and "sdl2" only. +#if BX_USE_TEXTCONFIG && defined(WIN32) && (BX_WITH_WIN32 || BX_WITH_SDL || BX_WITH_SDL2) + #define BX_USE_WIN32CONFIG 1 +#else + #define BX_USE_WIN32CONFIG 0 +#endif + +// set to 1 if wxMSW is a unicode version +#mesondefine WX_MSW_UNICODE +// set to GDK major version for wxGTK +#mesondefine WX_GDK_VERSION + +// 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 + +// add special export symbols for win32 DLL building. The main code must +// have __declspec(dllexport) on variables, functions, or classes that the +// plugins can access. The plugins should #define PLUGGABLE which will +// activate the __declspec(dllimport) instead. +#if (defined(WIN32) || defined(__CYGWIN__)) && !defined(BXIMAGE) +# if BX_PLUGINS && defined(BX_PLUGGABLE) +// #warning I will import DLL symbols from Bochs main program. +# define BOCHSAPI __declspec(dllimport) +# elif BX_PLUGINS +// #warning I will export DLL symbols. +# define BOCHSAPI __declspec(dllexport) +# endif +#endif +#ifndef BOCHSAPI +# define BOCHSAPI +#endif + +#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 + +#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 + +#mesondefine BX_DEFAULT_CONFIG_INTERFACE +#mesondefine BX_DEFAULT_DISPLAY_LIBRARY + +// 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. +#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. +#endif + +#mesondefine WORDS_BIGENDIAN + +#mesondefine SIZEOF_UNSIGNED_CHAR +#mesondefine SIZEOF_UNSIGNED_SHORT +#mesondefine SIZEOF_UNSIGNED_INT +#mesondefine SIZEOF_UNSIGNED_LONG +#mesondefine SIZEOF_UNSIGNED_LONG_LONG +#mesondefine SIZEOF_INT_P + +#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) +#elif defined(_MSC_VER) +#define BX_CONST64(x) (x##I64) +#else +#define BX_CONST64(x) (x) +#endif + +#if defined(WIN32) + 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 __GNUC__ + typedef unsigned long long Bit64u; + typedef signed long long Bit64s; +#include +#include +#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; +#else + +// 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 + +#endif + +#define GET32L(val64) ((Bit32u)(((Bit64u)(val64)) & 0xFFFFFFFF)) +#define GET32H(val64) ((Bit32u)(((Bit64u)(val64)) >> 32)) + +// now that Bit32u and Bit64u exist, defined bx_address +#if BX_SUPPORT_X86_64 +typedef Bit64u bx_address; +#else +typedef Bit32u bx_address; +#endif + +// define physical and linear address types +typedef bx_address bx_lin_address; + +#if BX_SUPPORT_X86_64 +#define BX_LIN_ADDRESS_WIDTH 48 +#else +#define BX_LIN_ADDRESS_WIDTH 32 +#endif + +#if BX_PHY_ADDRESS_LONG +typedef Bit64u bx_phy_address; +#if BX_CPU_LEVEL == 5 + #define BX_PHY_ADDRESS_WIDTH 36 +#else + #define BX_PHY_ADDRESS_WIDTH 40 +#endif +#else +typedef Bit32u bx_phy_address; +#define BX_PHY_ADDRESS_WIDTH 32 +#endif + +// 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 + +// 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 ) +#define BX_MIN_BIT64S ( (Bit64s)(1ULL << 63) ) +#define BX_MAX_BIT32U ( (Bit32u) -1 ) +#define BX_MIN_BIT32U ( 0 ) +#define BX_MAX_BIT32S ( ((Bit32u) -1) >> 1 ) +#define BX_MIN_BIT32S ( (Bit32s)(1U << 31) ) +#define BX_MAX_BIT16U ( (Bit16u) -1 ) +#define BX_MIN_BIT16U ( 0 ) +#define BX_MAX_BIT16S ( ((Bit16u) -1) >> 1 ) +#define BX_MIN_BIT16S ( (Bit16s)-(((Bit16u) -1) >> 1) - 1) +#define BX_MAX_BIT8U ( (Bit8u) -1 ) +#define BX_MIN_BIT8U ( 0 ) +#define BX_MAX_BIT8S ( ((Bit8u) -1) >> 1 ) +#define BX_MIN_BIT8S ( (Bit8s)-(((Bit8u) -1) >> 1) - 1) + + +// create an unsigned integer type that is the same size as a pointer. +// You can typecast a pointer to a bx_pr_equiv_t without losing any +// bits (and without getting the compiler excited). +#if SIZEOF_INT_P == 4 + typedef Bit32u bx_ptr_equiv_t; +#elif SIZEOF_INT_P == 8 + typedef Bit64u bx_ptr_equiv_t; +#else +# error "could not define bx_ptr_equiv_t to size of int*" +#endif + +#if BX_WITH_MACOS +# define bx_ptr_t char * +#else +# define bx_ptr_t void * +#endif + +#if defined(WIN32) +# 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 +#endif // defined(WIN32) + +// for now only term.cc requires a GUI sighandler. +#define BX_GUI_SIGHANDLER (BX_WITH_TERM) + +#define HAVE_SIGACTION 1 + +// Use BX_CPP_INLINE for all C++ inline functions. +#define BX_CPP_INLINE inline + +#ifdef __GNUC__ + +// 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. + +#define BX_CPP_AlignN(n) __attribute__ ((aligned (n))) +#define BX_CPP_AttrPrintf(formatArg, firstArg) \ + __attribute__ ((format (printf, formatArg, firstArg))) +#define BX_CPP_AttrNoReturn() __attribute__ ((noreturn)) + +#ifndef likely +#define likely(x) __builtin_expect(!!(x), 1) +#endif + +#ifndef unlikely +#define unlikely(x) __builtin_expect(!!(x), 0) +#endif + +#else + +#define BX_CPP_AlignN(n) /* Not supported. */ +#define BX_CPP_AttrPrintf(formatArg, firstArg) /* Not supported. */ +#define BX_CPP_AttrNoReturn() /* Not supported. */ + +#ifndef likely +#define likely(x) (x) +#endif + +#ifndef unlikely +#define unlikely(x) (x) +#endif + +#endif + +#mesondefine BX_GDBSTUB +#mesondefine BX_DEBUGGER +#mesondefine BX_DEBUGGER_GUI + +#mesondefine BX_INSTRUMENTATION + +// enable BX_DEBUG/BX_ERROR/BX_INFO messages +#mesondefine BX_NO_LOGGING + +// enable BX_ASSERT checks +#mesondefine BX_ASSERT_ENABLE + +// enable statistics collection +#mesondefine BX_ENABLE_STATISTICS + +#mesondefine BX_SUPPORT_ALIGNMENT_CHECK +#mesondefine BX_SUPPORT_FPU +#mesondefine BX_SUPPORT_3DNOW +#mesondefine BX_SUPPORT_PKEYS +#mesondefine BX_SUPPORT_CET +#mesondefine BX_SUPPORT_MONITOR_MWAIT +#mesondefine BX_SUPPORT_PERFMON +#mesondefine BX_SUPPORT_MEMTYPE +#mesondefine BX_SUPPORT_SVM +#mesondefine BX_SUPPORT_VMX +#mesondefine BX_SUPPORT_AVX +#mesondefine BX_SUPPORT_EVEX + +#if BX_SUPPORT_SVM && BX_SUPPORT_X86_64 == 0 + #error "SVM require x86-64 support" +#endif + +#if BX_SUPPORT_VMX >= 2 && BX_SUPPORT_X86_64 == 0 + #error "VMX=2 require x86-64 support" +#endif + +#if BX_SUPPORT_AVX && BX_SUPPORT_X86_64 == 0 + #error "AVX require x86-64 support" +#endif + +#if BX_SUPPORT_EVEX && BX_SUPPORT_AVX == 0 + #error "EVEX and AVX-512 support require AVX to be compiled in" +#endif + +#mesondefine BX_SUPPORT_REPEAT_SPEEDUPS +#mesondefine BX_SUPPORT_HANDLERS_CHAINING_SPEEDUPS +#mesondefine BX_ENABLE_TRACE_LINKING + +#if (BX_DEBUGGER || BX_GDBSTUB) && BX_SUPPORT_HANDLERS_CHAINING_SPEEDUPS + #error "Handler-chaining-speedups are not supported together with internal debugger or gdb-stub!" +#endif + +#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 +#mesondefine BX_CPUID_VENDOR_LEN +#mesondefine BX_CPUID_BRAND_LEN + +#mesondefine BX_CONFIGURE_MSRS + +#if (BX_SUPPORT_ALIGNMENT_CHECK && BX_CPU_LEVEL < 4) + #error Alignment exception check is not supported in i386 ! +#endif + +#if (BX_CONFIGURE_MSRS && BX_CPU_LEVEL < 5) + #error MSRs are supported only with CPU level >= 5 ! +#endif + +#if (!BX_SUPPORT_FPU && BX_CPU_LEVEL > 4) + #error With CPU level > 4, you must enable FPU support ! +#endif + +#if (BX_SUPPORT_FPU && BX_CPU_LEVEL < 3) + #error "FPU cannot be compiled without cpu level >= 3 !" +#endif + +#if (BX_CPU_LEVEL<6 && BX_SUPPORT_VMX) + #error "VMX only supported with CPU_LEVEL >= 6 !" +#endif + +#if BX_SUPPORT_X86_64 +// Sanity checks to ensure that you cannot accidently use conflicting options. + +#if BX_CPU_LEVEL < 6 + #error "X86-64 requires cpu level 6 or greater !" +#endif +#endif + +// 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 +#mesondefine BX_SUPPORT_SMP +#mesondefine BX_BOOTSTRAP_PROCESSOR + +// 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 +#mesondefine BX_MAX_SMP_THREADS_SUPPORTED + +// include in APIC models, required for a multiprocessor system. +#if BX_SUPPORT_SMP || BX_CPU_LEVEL >= 5 + #define BX_SUPPORT_APIC 1 +#else + #define BX_SUPPORT_APIC 0 +#endif + +#mesondefine BX_HAVE_GETENV +#mesondefine BX_HAVE_SETENV +#mesondefine BX_HAVE_SELECT +#mesondefine BX_HAVE_SNPRINTF +#mesondefine BX_HAVE_VSNPRINTF +#mesondefine BX_HAVE_STRTOULL +#mesondefine BX_HAVE_STRTOUQ +#mesondefine BX_HAVE_STRDUP +#mesondefine BX_HAVE_STRREV +#mesondefine BX_HAVE_STRICMP +#mesondefine BX_HAVE_STRCASECMP + +// used in term gui +#mesondefine BX_HAVE_COLOR_SET +#mesondefine BX_HAVE_MVHLINE +#mesondefine BX_HAVE_MVVLINE + + +// set if your compiler does not understand __attribute__ after a struct +#mesondefine BX_NO_ATTRIBUTES +#if BX_NO_ATTRIBUTES +#define GCC_ATTRIBUTE(x) /* attribute not supported */ +#else +#define GCC_ATTRIBUTE __attribute__ +#endif + +// 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)) +#if BX_USE_CPU_SMF == 1 +# define BX_CPP_AttrRegparmN(X) __attribute__((regparm(X))) +#else +// FIXME: BX_FAST_FUNC_CALL doesn't work with BX_USE_CPU_SMF = 0 +# define BX_CPP_AttrRegparmN(X) /* Not defined */ +#endif +#else +# define BX_CPP_AttrRegparmN(X) /* Not defined */ +#endif + +// set if you do have , used in bx_debug/dbg_main.c +#mesondefine BX_HAVE_SET + +// set if you do have , used in bx_debug/dbg_main.c +#mesondefine BX_HAVE_SET_H + +// set if you do have , used in bx_debug/dbg_main.c +#mesondefine BX_HAVE_MAP + +// set if you do have , used in bx_debug/dbg_main.c +#mesondefine BX_HAVE_MAP_H + +// Support x86 hardware debugger registers and facilities. +// These are the debug facilities offered by the x86 architecture, +// not the optional built-in debugger. +#mesondefine BX_X86_DEBUGGER + +// limited i440FX PCI support +#mesondefine BX_SUPPORT_PCI + +// Experimental host PCI device mapping +#mesondefine BX_SUPPORT_PCIDEV + +#if (BX_SUPPORT_PCIDEV && !BX_SUPPORT_PCI) + #error To enable PCI host device mapping, you must also enable PCI +#endif + +// CLGD54XX emulation +#mesondefine BX_SUPPORT_CLGD54XX + +// Experimental 3dfx Voodoo (SST-1/2) emulation +#mesondefine BX_SUPPORT_VOODOO + +// USB host controllers +#mesondefine BX_SUPPORT_USB_UHCI +#mesondefine BX_SUPPORT_USB_OHCI +#mesondefine BX_SUPPORT_USB_EHCI +#mesondefine BX_SUPPORT_USB_XHCI +#define BX_SUPPORT_PCIUSB \ + (BX_SUPPORT_USB_UHCI || BX_SUPPORT_USB_OHCI || BX_SUPPORT_USB_EHCI || BX_SUPPORT_USB_XHCI) + +#if (BX_SUPPORT_PCIUSB && !BX_SUPPORT_PCI) + #error To enable USB, you must also enable PCI +#endif + +#if (BX_SUPPORT_USB_EHCI && !BX_SUPPORT_USB_UHCI) + #error To enable EHCI, you must also enable UHCI +#endif + +// MS bus mouse support +#mesondefine BX_SUPPORT_BUSMOUSE + +#mesondefine BX_SUPPORT_CDROM + +#if BX_SUPPORT_CDROM + // This is the C++ class name to use if we are supporting + // low-level CDROM. +# define LOWLEVEL_CDROM cdrom_base_c +#endif + +// NE2K network emulation +#mesondefine BX_SUPPORT_NE2K + +// Pseudo PCI NIC +#mesondefine BX_SUPPORT_PCIPNIC + +#if (BX_SUPPORT_PCIPNIC && !BX_SUPPORT_PCI) + #error To enable the PCI pseudo NIC, you must also enable PCI +#endif + +// Intel(R) Gigabit Ethernet +#mesondefine BX_SUPPORT_E1000 + +#if (BX_SUPPORT_E1000 && !BX_SUPPORT_PCI) + #error To enable the E1000 NIC, you must also enable PCI +#endif + +// this enables the lowlevel stuff below if one of the NICs is present +#mesondefine BX_NETWORKING + +// which networking modules will be enabled +// determined by configure script +#mesondefine BX_NETMOD_FBSD +#mesondefine BX_NETMOD_LINUX +#mesondefine BX_NETMOD_WIN32 +#mesondefine BX_NETMOD_TAP +#mesondefine BX_NETMOD_TUNTAP +#mesondefine BX_NETMOD_VDE +#mesondefine BX_NETMOD_SLIRP +#mesondefine BX_NETMOD_SOCKET + +// Soundcard and gameport support +#mesondefine BX_SUPPORT_SB16 +#mesondefine BX_SUPPORT_ES1370 +#mesondefine BX_SUPPORT_GAMEPORT +#mesondefine BX_SUPPORT_SOUNDLOW + +// which sound lowlevel modules will be enabled +#mesondefine BX_HAVE_SOUND_ALSA +#mesondefine BX_HAVE_SOUND_OSS +#mesondefine BX_HAVE_SOUND_OSX +#mesondefine BX_HAVE_SOUND_SDL +#mesondefine BX_HAVE_SOUND_WIN + +#if BX_SUPPORT_SOUNDLOW +// Determines which sound lowlevel driver is to be used as the default. +// Currently the following are available: +// alsa Output for Linux with ALSA PCM and sequencer interface +// oss Output for Linux, to /dev/dsp and /dev/midi00 +// osx Output for MacOSX midi and wave device +// sdl Wave output with SDL/SDL2 +// win Output for Windows midi and wave mappers +// file Wave and midi output to file +// dummy Dummy functions, no output +#define BX_SOUND_LOWLEVEL_NAME "dummy" +// resampling support +#define BX_HAVE_LIBSAMPLERATE 0 +#define BX_HAVE_SOXR_LSR 0 +// SDL2 audio capture support (version >= 2.0.5) +#define BX_HAVE_SDL2_AUDIO_CAPTURE 0 +#endif + +#if (BX_SUPPORT_ES1370 && !BX_SUPPORT_PCI) + #error To enable the ES1370 soundcard, you must also enable PCI +#endif + +// I/O Interface to debugger +#mesondefine BX_SUPPORT_IODEBUG + +#ifdef WIN32 +#define BX_FLOPPY0_NAME "Floppy Disk A:" +#define BX_FLOPPY1_NAME "Floppy Disk B:" +#else +#define BX_FLOPPY0_NAME "Floppy Disk 0" +#define BX_FLOPPY1_NAME "Floppy Disk 1" +#endif + +#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 0) +#error "gcc 4.0.0 is known to produce incorrect code which breaks Bochs emulation" +#endif + +#endif // _BX_CONFIG_H diff --git a/bochs/cpu/avx/meson.build b/bochs/cpu/avx/meson.build new file mode 100644 index 0000000000..4dc594777e --- /dev/null +++ b/bochs/cpu/avx/meson.build @@ -0,0 +1,28 @@ +sources = [ + 'avx.cc', + 'avx2.cc', + 'avx512.cc', + 'avx512_bitalg.cc', + 'avx512_broadcast.cc', + 'avx512_cvt.cc', + 'avx512_fma.cc', + 'avx512_mask16.cc', + 'avx512_mask32.cc', + 'avx512_mask64.cc', + 'avx512_mask8.cc', + 'avx512_move.cc', + 'avx512_pfp.cc', + 'avx512_rcp14.cc', + 'avx512_rsqrt14.cc', + 'avx_cvt.cc', + 'avx_fma.cc', + 'avx_ifma52.cc', + 'avx_pfp.cc', + 'gather.cc', + 'tbm32.cc', + 'tbm64.cc', + 'vnni.cc', + 'xop.cc' +] + +bx_deps += static_library('avx', sources, include_directories: [top_include, '..']) diff --git a/bochs/cpu/cpudb/meson.build b/bochs/cpu/cpudb/meson.build new file mode 100644 index 0000000000..5e884dbb88 --- /dev/null +++ b/bochs/cpu/cpudb/meson.build @@ -0,0 +1,34 @@ +sources = [ + # AMD + 'amd/amd_k6_2_chomper.cc', + 'amd/athlon64_clawhammer.cc', + 'amd/athlon64_venice.cc', + 'amd/phenomx3_8650_toliman.cc', + 'amd/ryzen.cc', + 'amd/trinity_apu.cc', + 'amd/turion64_tyler.cc', + 'amd/zambezi.cc', + + # Intel + 'intel/atom_n270.cc', + 'intel/broadwell_ult.cc', + 'intel/core2_penryn_t9600.cc', + 'intel/core_duo_t2400_yonah.cc', + 'intel/corei3_cnl.cc', + 'intel/corei5_arrandale_m520.cc', + 'intel/corei5_lynnfield_750.cc', + 'intel/corei7_haswell_4770.cc', + 'intel/corei7_icelake-u.cc', + 'intel/corei7_ivy_bridge_3770K.cc', + 'intel/corei7_sandy_bridge_2600K.cc', + 'intel/corei7_skylake-x.cc', + 'intel/p2_klamath.cc', + 'intel/p3_katmai.cc', + 'intel/p4_prescott_celeron_336.cc', + 'intel/p4_willamette.cc', + 'intel/pentium.cc', + 'intel/pentium_mmx.cc', + 'intel/tigerlake.cc', +] + +bx_deps += static_library('cpudb', sources, include_directories: [top_include, '..', 'amd', 'intel']) diff --git a/bochs/cpu/decoder/meson.build b/bochs/cpu/decoder/meson.build new file mode 100644 index 0000000000..9f7d01b3d0 --- /dev/null +++ b/bochs/cpu/decoder/meson.build @@ -0,0 +1,7 @@ +sources = [ + 'disasm.cc', + 'fetchdecode32.cc', + 'fetchdecode64.cc' +] + +bx_deps += static_library('decoder', sources, include_directories: [top_include, '..']) diff --git a/bochs/cpu/fpu/meson.build b/bochs/cpu/fpu/meson.build new file mode 100644 index 0000000000..c87fa38047 --- /dev/null +++ b/bochs/cpu/fpu/meson.build @@ -0,0 +1,25 @@ +sources = [ + 'f2xm1.cc', + 'ferr.cc', + 'fpatan.cc', + 'fprem.cc', + 'fpu_arith.cc', + 'fpu.cc', + 'fpu_cmov.cc', + 'fpu_compare.cc', + 'fpu_const.cc', + 'fpu_load_store.cc', + 'fpu_misc.cc', + 'fpu_trans.cc', + 'fsincos.cc', + 'fyl2x.cc', + 'poly.cc', + 'softfloat16.cc', + 'softfloat.cc', + 'softfloat-muladd.cc', + 'softfloat-round-pack.cc', + 'softfloat-specialize.cc', + 'softfloatx80.cc', +] + +bx_deps += static_library('fpu', sources, include_directories: [top_include, '..']) diff --git a/bochs/cpu/meson.build b/bochs/cpu/meson.build new file mode 100644 index 0000000000..9292b21ca8 --- /dev/null +++ b/bochs/cpu/meson.build @@ -0,0 +1,101 @@ +subdir('avx') +subdir('cpudb') +subdir('decoder') +subdir('fpu') + +sources = [ + '3dnow.cc', + 'access2.cc', + 'access.cc', + 'aes.cc', + 'apic.cc', + 'arith16.cc', + 'arith32.cc', + 'arith64.cc', + 'arith8.cc', + 'bcd.cc', + 'bit16.cc', + 'bit32.cc', + 'bit64.cc', + 'bit.cc', + 'bmi32.cc', + 'bmi64.cc', + 'call_far.cc', + 'cet.cc', + 'cmpccxadd32.cc', + 'cmpccxadd64.cc', + 'cpu.cc', + 'cpuid.cc', + 'crc32.cc', + 'crregs.cc', + 'ctrl_xfer16.cc', + 'ctrl_xfer32.cc', + 'ctrl_xfer64.cc', + 'ctrl_xfer_pro.cc', + 'data_xfer16.cc', + 'data_xfer32.cc', + 'data_xfer64.cc', + 'data_xfer8.cc', + 'debugstuff.cc', + 'event.cc', + 'exception.cc', + 'faststring.cc', + 'flag_ctrl.cc', + 'flag_ctrl_pro.cc', + 'fpu_emu.cc', + 'generic_cpuid.cc', + 'gf2.cc', + 'icache.cc', + 'init.cc', + 'io.cc', + 'iret.cc', + 'jmp_far.cc', + 'load.cc', + 'logical16.cc', + 'logical32.cc', + 'logical64.cc', + 'logical8.cc', + 'mmx.cc', + 'msr.cc', + 'mult16.cc', + 'mult32.cc', + 'mult64.cc', + 'mult8.cc', + 'mwait.cc', + 'paging.cc', + 'proc_ctrl.cc', + 'protect_ctrl.cc', + 'rdrand.cc', + 'ret_far.cc', + 'segment_ctrl.cc', + 'segment_ctrl_pro.cc', + 'sha.cc', + 'shift16.cc', + 'shift32.cc', + 'shift64.cc', + 'shift8.cc', + 'smm.cc', + 'soft_int.cc', + 'sse.cc', + 'sse_move.cc', + 'sse_pfp.cc', + 'sse_rcp.cc', + 'sse_string.cc', + 'stack16.cc', + 'stack32.cc', + 'stack64.cc', + 'stack.cc', + 'string.cc', + 'svm.cc', + 'tasking.cc', + 'vapic.cc', + 'vm8086.cc', + 'vmcs.cc', + 'vmexit.cc', + 'vmfunc.cc', + 'vmx.cc', + 'wide_int.cc', + 'xsave.cc', +] + +bx_deps += static_library('cpu', sources, include_directories: [top_include]) diff --git a/bochs/gui/meson.build b/bochs/gui/meson.build new file mode 100644 index 0000000000..f7976a6087 --- /dev/null +++ b/bochs/gui/meson.build @@ -0,0 +1,53 @@ +sources = [ + 'enh_dbg.cc', + 'gui.cc', + 'keymap.cc', + 'nogui.cc', + 'paramtree.cc', + 'scrollwin.cc', + 'sdl2.cc', + 'sdl.cc', + 'siminterface.cc', + 'term.cc', + 'textconfig.cc', + 'x.cc' +] + +if host_machine.system() == 'amiga' + sources += 'amigaos.cc' +endif + +if host_machine.system() == 'darwin' + sources += ['macintosh.cc', 'carbon.cc'] +endif + + +if host_machine.system() == 'windows' + sources += [ +# 'rfb.cc', + 'win32.cc', + 'win32config.cc', + 'win32_enh_dbg_osdep.cc', + 'win32paramdlg.cc' + ] +endif + +if vncsrv_dep.found() + sources += 'vncsrv.cc' +endif + +gui_deps = [x11_dep, sdl1_dep, sdl2_dep, term_dep, vncsrv_dep, wx_dep] + +if wx_dep.found() + sources += ['wx.cc', 'wxdialog.cc', 'wxmain.cc'] + gtk_dep = dependency('gtk+-3.0', required : false) +else + gtk_dep = dependency('gtk+-2.0', required : false) +endif + +if gtk_dep.found() + gui_deps += gtk_dep + sources += 'gtk_enh_dbg_osdep.cc' +endif + +bx_deps += static_library('gui', sources, dependencies: gui_deps, include_directories: [top_include, '../iodev']) diff --git a/bochs/host/linux/pcidev/meson.build b/bochs/host/linux/pcidev/meson.build new file mode 100644 index 0000000000..d15630e75a --- /dev/null +++ b/bochs/host/linux/pcidev/meson.build @@ -0,0 +1 @@ +# find a way to build linux .ko from meson diff --git a/bochs/instrument/stubs/meson.build b/bochs/instrument/stubs/meson.build new file mode 100644 index 0000000000..30c84c8845 --- /dev/null +++ b/bochs/instrument/stubs/meson.build @@ -0,0 +1,3 @@ +sources = ['instrument.cc'] + +bx_deps += static_library('instrument', sources, include_directories: [top_include]) diff --git a/bochs/iodev/display/meson.build b/bochs/iodev/display/meson.build new file mode 100644 index 0000000000..53b18e21ac --- /dev/null +++ b/bochs/iodev/display/meson.build @@ -0,0 +1,9 @@ +sources = [ + 'banshee.cc', + 'ddc.cc', + 'svga_cirrus.cc', + 'vga.cc', + 'vgacore.cc', + 'voodoo.cc' +] +bx_deps += static_library('display', sources, include_directories: [top_include, '..']) diff --git a/bochs/iodev/hdimage/meson.build b/bochs/iodev/hdimage/meson.build new file mode 100644 index 0000000000..3bbc52fef8 --- /dev/null +++ b/bochs/iodev/hdimage/meson.build @@ -0,0 +1,21 @@ +sources = [ + 'cdrom.cc', + 'hdimage.cc', + 'vbox.cc', + 'vmware3.cc', + 'vmware4.cc', + 'vpc.cc', + 'vvfat.cc', +] + +if host_machine.system() == 'amiga' + sources += 'cdrom_amigaos.cc' +elif host_machine.system() == 'windows' + sources += 'cdrom_win32.cc' +elif host_machine.system() == 'darwin' + sources += 'cdrom_osx.cc' +else + sources += 'cdrom_misc.cc' +endif + +bx_deps += static_library('hdimage', sources, include_directories: [top_include, '..']) diff --git a/bochs/iodev/meson.build b/bochs/iodev/meson.build new file mode 100644 index 0000000000..bee2a3a635 --- /dev/null +++ b/bochs/iodev/meson.build @@ -0,0 +1,42 @@ +subdir('display') +subdir('hdimage') +subdir('network') +subdir('sound') +subdir('usb') + +sources = [ + 'acpi.cc', + 'biosdev.cc', + 'busmouse.cc', + 'cmos.cc', + 'devices.cc', + 'dma.cc', + 'extfpuirq.cc', + 'floppy.cc', + 'harddrv.cc', + 'hpet.cc', + 'ioapic.cc', + 'iodebug.cc', + 'keyboard.cc', + 'parallel.cc', + 'pci2isa.cc', + 'pci.cc', + 'pcidev.cc', + 'pci_ide.cc', + 'pic.cc', + 'pit82c54.cc', + 'pit.cc', + 'scancodes.cc', + 'serial.cc', + 'serial_raw.cc', + 'slowdown_timer.cc', + 'speaker.cc', + 'unmapped.cc', + 'virt_timer.cc' +] + +if get_option('support_gameport') + sources += 'gameport.cc' +endif + +bx_deps += static_library('iodev', sources, include_directories: [top_include]) diff --git a/bochs/iodev/network/meson.build b/bochs/iodev/network/meson.build new file mode 100644 index 0000000000..1ebdbd4dc4 --- /dev/null +++ b/bochs/iodev/network/meson.build @@ -0,0 +1,18 @@ +sources = [ + 'e1000.cc', + 'eth_fbsd.cc', + 'eth_linux.cc', + 'eth_null.cc', + 'eth_slirp.cc', + 'eth_socket.cc', + 'eth_tap.cc', + 'eth_tuntap.cc', + 'eth_vde.cc', + 'eth_vnet.cc', + 'eth_win32.cc', + 'ne2k.cc', + 'netmod.cc', + 'netutil.cc', + 'pcipnic.cc' +] +bx_deps += static_library('network', sources, include_directories: [top_include, '..']) diff --git a/bochs/iodev/sound/meson.build b/bochs/iodev/sound/meson.build new file mode 100644 index 0000000000..b7a39e8519 --- /dev/null +++ b/bochs/iodev/sound/meson.build @@ -0,0 +1,15 @@ +sources = [ + 'es1370.cc', + 'opl.cc', + 'sb16.cc', + 'soundalsa.cc', + 'sounddummy.cc', + 'soundfile.cc', + 'soundlow.cc', + 'soundmod.cc', + 'soundoss.cc', + 'soundosx.cc', + 'soundsdl.cc', + 'soundwin.cc' +] +bx_deps += static_library('sound', sources, dependencies: [sdl1_dep, sdl2_dep, alsa_dep, oss_dep], include_directories: [top_include, '..']) diff --git a/bochs/iodev/usb/meson.build b/bochs/iodev/usb/meson.build new file mode 100644 index 0000000000..45108d5fdd --- /dev/null +++ b/bochs/iodev/usb/meson.build @@ -0,0 +1,17 @@ +sources = [ + 'scsi_device.cc', + 'uhci_core.cc', + 'usb_common.cc', + 'usb_ehci.cc', + 'usb_floppy.cc', + 'usb_hid.cc', + 'usb_hub.cc', + 'usb_msd.cc', + 'usb_ohci.cc', + 'usb_pcap.cc', + 'usb_printer.cc', + 'usb_uasp.cc', + 'usb_uhci.cc', + 'usb_xhci.cc' +] +bx_deps += static_library('usb', sources, include_directories: [top_include, '..']) diff --git a/bochs/memory/meson.build b/bochs/memory/meson.build new file mode 100644 index 0000000000..b81b377510 --- /dev/null +++ b/bochs/memory/meson.build @@ -0,0 +1,6 @@ +sources = [ + 'memory.cc', + 'misc_mem.cc' +] + +bx_deps += static_library('memory', sources, include_directories: [top_include]) diff --git a/bochs/meson.build b/bochs/meson.build new file mode 100644 index 0000000000..206f97e1a7 --- /dev/null +++ b/bochs/meson.build @@ -0,0 +1,250 @@ +project('bochs', ['c', 'cpp'], + meson_version: '>=1.1.0', + default_options : ['cpp_std=c++11'], + version: '2.7.1') + +cc = meson.get_compiler('c') +cxx = meson.get_compiler('cpp') + +x11_dep = dependency('x11', required : get_option('with_x11')) +xrandr_dep = dependency('xrandr', required : get_option('with_x11')) +xpm_dep = dependency('xpm', required : get_option('with_x11')) +sdl1_dep = dependency('sdl', required : get_option('with_sdl1')) +sdl2_dep = dependency('sdl2', required : get_option('with_sdl2')) +term_dep = dependency('curses', required : get_option('with_term')) +vncsrv_dep = dependency('libvncserver', required : get_option('with_vncsrv')) +wx_dep = dependency('wxwidgets', required : get_option('with_wx')) +readline_dep = dependency('readline', required: false) +alsa_dep = dependency('alsa', required : false) +oss_dep = dependency('oss', required : false) +dl_dep = dependency('dl', required : get_option('plugins')) + +conf_data = configuration_data() + +conf_data.set('BX_CPU_LEVEL', get_option('cpu_level')) +conf_data.set('BX_CPUID_VENDOR_LEN', get_option('cpuid_vendor_len')) +conf_data.set('BX_CPUID_BRAND_LEN', get_option('cpuid_brand_len')) +conf_data.set10('BX_SUPPORT_SMP', get_option('support_smp')) +conf_data.set10('BX_BOOTSTRAP_PROCESSOR', get_option('bootstrap_processor')) +conf_data.set10('BX_MAX_SMP_THREADS_SUPPORTED', get_option('max_smp_threads_supported')) + +conf_data.set10('BX_USE_GUI_CONSOLE', x11_dep.found() or sdl1_dep.found() or sdl2_dep.found() or (host_machine.system() == 'windows') or (host_machine.system() == 'darwin') or (host_machine.system() == 'amiga')) +conf_data.set10('BX_USE_TEXTCONFIG', term_dep.found()) + +conf_data.set10('BX_WITH_RFB', false) # FIX ME +conf_data.set10('BX_WITH_CARBON', false) # FIX ME +conf_data.set10('WX_MSW_UNICODE', 0) # FIX ME +conf_data.set10('WX_GDK_VERSION', 0) # FIX ME +if wx_dep.found() + conf_data.set('WX_GDK_VERSION', 3) # FIX ME +endif + +conf_data.set10('BX_WITH_MACOS', host_machine.system() == 'darwin') +conf_data.set10('BX_WITH_WIN32', host_machine.system() == 'windows') +conf_data.set10('BX_WITH_NOGUI', get_option('with_nogui').enabled()) +conf_data.set10('BX_WITH_TERM', term_dep.found()) +conf_data.set10('BX_WITH_VNCSRV', vncsrv_dep.found()) +conf_data.set10('BX_WITH_AMIGAOS', host_machine.system() == 'amiga') +conf_data.set10('BX_WITH_X11', x11_dep.found()) +conf_data.set10('BX_WITH_SDL', sdl1_dep.found()) +conf_data.set10('BX_WITH_SDL2', sdl2_dep.found()) +conf_data.set10('BX_WITH_WX', wx_dep.found()) + +conf_data.set_quoted('BX_DEFAULT_CONFIG_INTERFACE', get_option('default_config_interface')) +conf_data.set_quoted('BX_DEFAULT_DISPLAY_LIBRARY', get_option('default_display_library')) +conf_data.set10('WORDS_BIGENDIAN', host_machine.endian() == 'big') + +conf_data.set('SIZEOF_UNSIGNED_CHAR', cc.sizeof('unsigned char')) +conf_data.set('SIZEOF_UNSIGNED_SHORT', cc.sizeof('unsigned short')) +conf_data.set('SIZEOF_UNSIGNED_INT', cc.sizeof('unsigned int')) +conf_data.set('SIZEOF_UNSIGNED_LONG', cc.sizeof('unsigned long')) +conf_data.set('SIZEOF_UNSIGNED_LONG_LONG', cc.sizeof('unsigned long long')) +conf_data.set('SIZEOF_INT_P', cc.sizeof('int *')) + +if readline_dep.found() + conf_data.set10('HAVE_LIBREADLINE', 1) + conf_data.set10('HAVE_READLINE_HISTORY_H', cc.has_header('readline/history.h', dependencies: [readline_dep], required: false)) +endif +conf_data.set10('HAVE_LOCALE_H', cc.has_header('locale.h', required: false)) +conf_data.set10('BX_HAVE_SLEEP', cc.has_function('sleep', prefix : '#include ')) +conf_data.set10('BX_HAVE_MSLEEP', cc.has_function('msleep', prefix : '#include \n#include \n#include ')) +conf_data.set10('BX_HAVE_USLEEP', cc.has_function('usleep', prefix : '#include ')) +conf_data.set10('BX_HAVE_NANOSLEEP', cc.has_function('nanosleep', prefix : '#include ')) +conf_data.set10('BX_HAVE_ABORT', cc.has_function('abort', prefix : '#include ')) +conf_data.set10('BX_HAVE_SOCKLEN_T', cc.has_type('socklen_t', prefix : '#include \n#include ')) +conf_data.set10('BX_HAVE_SOCKADDR_IN_SIN_LEN', cc.has_member('sockaddr_in', 'sin_len', prefix : '#include \n#include ')) +conf_data.set10('BX_HAVE_GETTIMEOFDAY', cc.has_function('gettimeofday', prefix : '#include ')) +conf_data.set10('BX_HAVE_MKSTEMP', cc.has_function('mkstemp', prefix : '#include ')) +conf_data.set10('BX_HAVE_SYS_MMAN_H', cc.has_header('sys/mman.h')) +conf_data.set10('BX_HAVE_XPM_H', xpm_dep.found()) +conf_data.set10('BX_HAVE_XRANDR_H', xrandr_dep.found()) +conf_data.set10('BX_HAVE_TIMELOCAL', cc.has_function('timelocal', prefix : '#include ')) +conf_data.set10('BX_HAVE_GMTIME', cc.has_function('gmtime', prefix : '#include ')) +conf_data.set10('BX_HAVE_MKTIME', cc.has_function('mktime', prefix : '#include ')) +conf_data.set10('BX_HAVE_TMPFILE64', cc.has_function('tmpfile64', prefix : '#include ')) +conf_data.set10('BX_HAVE_FSEEK64', cc.has_function('fseek64', prefix : '#include ')) +conf_data.set10('BX_HAVE_FSEEKO64', cc.has_function('fseeko64', prefix : '#include ')) +conf_data.set10('BX_HAVE_NET_IF_H', cc.has_header('net/if.h')) +conf_data.set10('BX_HAVE___BUILTIN_BSWAP32', cc.has_function('__builtin_bswap32')) +conf_data.set10('BX_HAVE___BUILTIN_BSWAP64', cc.has_function('__builtin_bswap64')) +conf_data.set10('BX_HAVE_SSIZE_T', cc.has_type('ssize_t', prefix : '#include ')) + +conf_data.set10('BX_HAVE_LTDL', dl_dep.found()) +conf_data.set10('BX_HAVE_DLFCN_H', cc.has_header('dlfcn.h')) +conf_data.set10('HAVE_ASSERT_H', cc.has_header('assert.h')) + +# map, set, etc are mandatory C++11, do we still need to check for them ?!?! +conf_data.set10('BX_HAVE_SET', cxx.has_header('set', required: false)) +conf_data.set10('BX_HAVE_MAP', cxx.has_header('map', required: false)) +conf_data.set10('BX_HAVE_SET_H', cxx.has_header('set.h', required: false)) +conf_data.set10('BX_HAVE_MAP_H', cxx.has_header('map.h', required: false)) + +conf_data.set10('BX_HAVE_GETENV', cc.has_function('getenv', prefix : '#include ')) +conf_data.set10('BX_HAVE_SETENV', cc.has_function('setenv', prefix : '#include ')) +conf_data.set10('BX_HAVE_SELECT', cc.has_function('select', prefix : '#include ')) +conf_data.set10('BX_HAVE_SNPRINTF', cc.has_function('snprintf', prefix : '#include ')) +conf_data.set10('BX_HAVE_VSNPRINTF', cc.has_function('vsnprintf', prefix : '#include ')) +conf_data.set10('BX_HAVE_STRTOULL', cc.has_function('strtoull', prefix : '#include ')) +conf_data.set10('BX_HAVE_STRTOUQ', cc.has_function('strtouq', prefix : '#include ')) +conf_data.set10('BX_HAVE_STRDUP', cc.has_function('strdup', prefix : '#include ')) +conf_data.set10('BX_HAVE_STRREV', cc.has_function('strrev', prefix : '#include ')) +conf_data.set10('BX_HAVE_STRICMP', cc.has_function('stricmp', prefix : '#include ')) +conf_data.set10('BX_HAVE_STRCASECMP', cc.has_function('strcasecmp', prefix : '#include ')) + + +conf_data.set10('BX_HAVE_COLOR_SET', term_dep.found()) +conf_data.set10('BX_HAVE_MVHLINE', term_dep.found()) +conf_data.set10('BX_HAVE_MVVLINE', term_dep.found()) + + +enable_network = get_option('networking') +conf_data.set10('BX_NETWORKING', enable_network) +conf_data.set10('BX_NETMOD_FBSD', enable_network and cc.has_header('net/bpf.h', required: false)) +conf_data.set10('BX_NETMOD_LINUX', enable_network and cc.has_header('netpacket/packet.h', required: false)) +conf_data.set10('BX_NETMOD_WIN32', enable_network and host_machine.system() == 'windows') +conf_data.set10('BX_NETMOD_VDE', enable_network and host_machine.system() == 'windows' and get_option('netmod_vde')) +conf_data.set10('BX_NETMOD_TAP', enable_network and get_option('netmod_tap')) +conf_data.set10('BX_NETMOD_TUNTAP', enable_network and get_option('netmod_tuntap')) +iphlpapi_dep = cc.find_library('iphlpapi', required: false) +conf_data.set10('BX_NETMOD_SLIRP', enable_network and host_machine.system() == 'windows' and iphlpapi_dep.found()) +conf_data.set10('BX_NETMOD_SOCKET', enable_network and host_machine.system() == 'windows' and iphlpapi_dep.found()) + + +conf_data.set10('BX_HAVE_SOUND_OSX', host_machine.system() == 'darwin') +conf_data.set10('BX_HAVE_SOUND_WIN', host_machine.system() == 'windows') +conf_data.set10('BX_HAVE_SOUND_SDL', sdl1_dep.found() or sdl2_dep.found()) +conf_data.set10('BX_HAVE_SOUND_ALSA', alsa_dep.found()) +conf_data.set10('BX_HAVE_SOUND_OSS', oss_dep.found()) + + +# keep it in sync with meson.options +options = [ + # various otions + 'debug_linux', 'support_a20', 'dma_floppy_io', 'support_x86_64', 'phy_address_long', 'use_idle_hack', 'plugins', 'use_raw_serial', 'large_ramfile', 'dbg_extensions', + + 'use_textconfig', + + 'gdbstub', 'debugger', 'debugger_gui', 'support_iodebug', 'instrumentation', + + 'no_logging', + + 'assert_enable', + + 'enable_statistics', + + 'support_alignment_check', 'support_fpu', 'support_3dnow', 'support_pkeys', 'support_cet', 'support_monitor_mwait', + 'support_perfmon', 'support_memtype', 'support_svm', 'support_vmx', 'support_avx', 'support_evex', + + 'support_repeat_speedups', 'support_handlers_chaining_speedups', 'enable_trace_linking', 'configure_msrs', + + # Soundcard and gameport support + 'support_sb16', 'support_es1370', 'support_gameport', 'support_soundlow', + + # Support x86 hardware debugger registers and facilities. + 'x86_debugger', + + # limited i440FX PCI support + 'support_pci', + + # Experimental host PCI device mapping + 'support_pcidev', + + # CLGD54XX emulation + 'support_clgd54xx', + + # Experimental 3dfx Voodoo (SST-1/2) emulation + 'support_voodoo', + + # USB host controllers + 'support_usb_uhci', 'support_usb_ohci', 'support_usb_ehci', 'support_usb_xhci', + + # MS bus mouse support + 'support_busmouse', + + # CDROM + 'support_cdrom', + + # NE2K network emulation + 'support_ne2k', + + # Pseudo PCI NIC + 'support_pcipnic', + + # Intel(R) Gigabit Ethernet + 'support_e1000', + + #SFM stuff + 'use_cpu_smf', 'use_mem_smf', 'use_hd_smf', 'use_bios_smf', 'use_cmos_smf', 'use_dma_smf', 'use_fd_smf', 'use_key_smf', 'use_par_smf', 'use_pic_smf', 'use_pit_smf', + 'use_ser_smf', 'use_um_smf', 'use_vga_smf', 'use_sb16_smf', 'use_es1370_smf', 'use_dev_smf', 'use_pci_smf', 'use_p2i_smf', 'use_pide_smf', 'use_pcidev_smf', 'use_usb_uhci_smf', + 'use_usb_ohci_smf', 'use_usb_ehci_smf', 'use_usb_xhci_smf', 'use_pcipnic_smf', 'use_efi_smf', 'use_gameport_smf', 'use_cirrus_smf', 'use_busm_smf', 'use_acpi_smf' +] + +foreach opt : options + conf_data.set10('BX_' + opt.to_upper(), get_option(opt)) +endforeach + +configure_file(input : 'config.h.meson.in', output : 'config.h', configuration : conf_data) + +conf_data = configuration_data() +conf_data.set('VERSION', meson.project_version()) +conf_data.set('VER_SVN', 1) +configure_file(input : 'bxversion.h.in', output : 'bxversion.h', configuration : conf_data) + +top_include = include_directories('.', 'instrument/stubs') + +bx_deps = [] +if get_option('debugger') or get_option('debugger_gui') + subdir('bx_debug') +endif + +if get_option('support_pcidev') + # FIX ME https://github.com/mesonbuild/meson/issues/9084 + # subdir('host/linux/pcidev') +endif + +subdir('instrument/stubs') +subdir('cpu') +subdir('gui') +subdir('memory') +subdir('iodev') + +common_sources = [ + 'bxthread.cc', + 'crc.cc', + 'logio.cc', + 'osdep.cc', + 'pc_system.cc', + 'plugin.cc' +] + +if get_option('gdbstub') + common_sources += 'gdbstub.cc' +endif + +executable('bochs', [common_sources, 'main.cc', 'config.cc'], + dependencies: [x11_dep, xrandr_dep, xpm_dep, readline_dep, sdl1_dep, sdl2_dep, term_dep, vncsrv_dep, wx_dep], + link_with: bx_deps, + cpp_args: ['-DBX_SHARE_PATH="' + join_paths(get_option('prefix'), get_option('datadir'), 'bochs') + '"'], + include_directories: [top_include]) + +#executable('bxdisasm', [common_sources, 'bxdisasm.cc'], dependencies: [x11_dep, xrandr_dep, sdl1_dep, sdl2_dep, term_dep, vncsrv_dep, wx_dep], link_with: bx_deps, include_directories: [top_include]) diff --git a/bochs/meson.options b/bochs/meson.options new file mode 100644 index 0000000000..72e15ba29a --- /dev/null +++ b/bochs/meson.options @@ -0,0 +1,153 @@ +option('with_x11', type : 'feature', value : 'auto') +option('with_sdl1', type : 'feature', value : 'disabled') +option('with_sdl2', type : 'feature', value : 'auto') +option('with_nogui', type : 'feature', value : 'disabled') +option('with_term', type : 'feature', value : 'auto') +option('with_rfb', type : 'feature', value : 'auto') +option('with_vncsrv', type : 'feature', value : 'auto') +option('with_wx', type : 'feature', value : 'auto') +option('with_carbon', type : 'feature', value : 'auto') + +option('debug_linux', type : 'boolean', value : false, description : 'if simulating Linux, this provides a few more debugging options such as tracing all system calls') +option('support_a20', type : 'boolean', value : false, description : 'Settable A20 line') +option('dma_floppy_io', type : 'boolean', value : true, description : 'Compile in support for DMA & FLOPPY IO') +option('support_x86_64', type : 'boolean', value : false, description : 'Emulate x86-64 instruction set?') +option('phy_address_long', type : 'boolean', value : false, description : 'Emulate long physical address (>32 bit)') +option('use_idle_hack', type : 'boolean', value : false, description : 'Roland Mainz\'s idle hack') +option('cpu_level', type : 'integer', min : 3, value : 3) +option('cpuid_vendor_len', type : 'integer', value: 12) +option('cpuid_brand_len', type : 'integer', value: 48) + +option('support_smp', type : 'boolean', value : false) +option('bootstrap_processor', type : 'integer', value: 0) +option('max_smp_threads_supported', type : 'integer', value: 254) + +option('plugins', type : 'boolean', value : false, description : 'Enable plugins') +option('use_raw_serial', type : 'boolean', value : false, description : 'Use raw serial') +option('large_ramfile', type : 'boolean', value : false, description : 'This option enables RAM file backing for large guest memory with a smaller amount host memory, without causing a panic when host memory is exhausted.') +option('dbg_extensions', type : 'boolean', value : false, description : 'Make a call to command line debugger extensions') + +option('default_config_interface', type : 'string', value: 'defined_by_configure') +option('default_display_library', type : 'string', value: 'defined_by_configure') + +option('networking', type : 'boolean', value : false) + +# optional networking modules +option('netmod_tap', type : 'boolean', value : false) +option('netmod_tuntap', type : 'boolean', value : false) + +# Soundcard and gameport support +option('support_sb16', type : 'boolean', value : false) +option('support_es1370', type : 'boolean', value : false) +option('support_gameport', type : 'boolean', value : false) +option('support_soundlow', type : 'boolean', value : false) + +# Support x86 hardware debugger registers and facilities. +# These are the debug facilities offered by the x86 architecture, +# not the optional built-in debugger. +option('x86_debugger', type : 'boolean', value : false) + +# limited i440FX PCI support +option('support_pci', type : 'boolean', value : false) + +# Experimental host PCI device mapping +option('support_pcidev', type : 'boolean', value : false) + +# CLGD54XX emulation +option('support_clgd54xx', type : 'boolean', value : false) + +# Experimental 3dfx Voodoo (SST-1/2) emulation +option('support_voodoo', type : 'boolean', value : false) + +# USB host controllers +option('support_usb_uhci', type : 'boolean', value : false) +option('support_usb_ohci', type : 'boolean', value : false) +option('support_usb_ehci', type : 'boolean', value : false) +option('support_usb_xhci', type : 'boolean', value : false) + +# MS bus mouse support +option('support_busmouse', type : 'boolean', value : false) + +option('support_cdrom', type : 'boolean', value : false) + + +# NE2K network emulation +option('support_ne2k', type : 'boolean', value : false) + +# Pseudo PCI NIC +option('support_pcipnic', type : 'boolean', value : false) + + +# Intel(R) Gigabit Ethernet +option('support_e1000', type : 'boolean', value : false) + +option('gdbstub', type : 'boolean', value : false) +option('debugger', type : 'boolean', value : false) +option('debugger_gui', type : 'boolean', value : false) + +option('instrumentation', type : 'boolean', value : false) + +# enable BX_DEBUG/BX_ERROR/BX_INFO messages +option('no_logging', type : 'boolean', value : false) + +# enable BX_ASSERT checks +option('assert_enable', type : 'boolean', value : false) + +# enable statistics collection +option('enable_statistics', type : 'boolean', value : false) + +option('support_iodebug', type : 'boolean', value : false) + +option('support_alignment_check', type : 'boolean', value : false) +option('support_fpu', type : 'boolean', value : false) +option('support_3dnow', type : 'boolean', value : false) +option('support_pkeys', type : 'boolean', value : false) +option('support_cet', type : 'boolean', value : false) +option('support_monitor_mwait', type : 'boolean', value : false) +option('support_perfmon', type : 'boolean', value : false) +option('support_memtype', type : 'boolean', value : false) +option('support_svm', type : 'boolean', value : false) +option('support_vmx', type : 'boolean', value : false) +option('support_avx', type : 'boolean', value : false) +option('support_evex', type : 'boolean', value : false) + +option('support_repeat_speedups', type : 'boolean', value : false) +option('support_handlers_chaining_speedups', type : 'boolean', value : false) +option('enable_trace_linking', type : 'boolean', value : false) + +option('configure_msrs', type : 'boolean', value : false) + + + +#SFM stuff +option('use_cpu_smf', type : 'boolean', value : true, description : 'CPU SMF') +option('use_mem_smf', type : 'boolean', value : true, description : 'Memory SMF') +option('use_hd_smf', type : 'boolean', value : true, description : 'Hard drive SMF') +option('use_bios_smf', type : 'boolean', value : true, description : 'BIOS SMF') +option('use_cmos_smf', type : 'boolean', value : true, description : 'CMOS SMF') +option('use_dma_smf', type : 'boolean', value : true, description : 'DMA SMF') +option('use_fd_smf', type : 'boolean', value : true, description : 'Floppy SMF') +option('use_key_smf', type : 'boolean', value : true, description : 'Keyboard SMF') +option('use_par_smf', type : 'boolean', value : true, description : 'Parallel SMF') +option('use_pic_smf', type : 'boolean', value : true, description : 'PIC SMF') +option('use_pit_smf', type : 'boolean', value : true, description : 'PIT SMF') +option('use_ser_smf', type : 'boolean', value : true, description : 'Serial SMF') +option('use_um_smf', type : 'boolean', value : true, description : 'Unmapped SMF') +option('use_vga_smf', type : 'boolean', value : true, description : 'VGA SMF') +option('use_sb16_smf', type : 'boolean', value : true, description : 'SB 16 soundcard SMF') +option('use_es1370_smf', type : 'boolean', value : true, description : 'ES1370 soundcard SMF') +option('use_dev_smf', type : 'boolean', value : true, description : 'System Devices (port92) SMF') +option('use_pci_smf', type : 'boolean', value : true, description : 'PCI SMF') +option('use_p2i_smf', type : 'boolean', value : true, description : 'PCI-to-ISA bridge SMF') +option('use_pide_smf', type : 'boolean', value : true, description : 'PCI-IDE SMF') +option('use_pcidev_smf', type : 'boolean', value : true, description : 'PCI-DEV SMF') +option('use_usb_uhci_smf', type : 'boolean', value : true, description : 'USB UHCI hub SMF') +option('use_usb_ohci_smf', type : 'boolean', value : true, description : 'USB OHCI hub SMF') +option('use_usb_ehci_smf', type : 'boolean', value : true, description : 'USB EHCI hub SMF') +option('use_usb_xhci_smf', type : 'boolean', value : true, description : 'USB xHCI hub SMF') +option('use_pcipnic_smf', type : 'boolean', value : true, description : 'PCI pseudo NIC SMF') +option('use_efi_smf', type : 'boolean', value : true, description : 'External FPU IRQ SMF') +option('use_gameport_smf', type : 'boolean', value : true, description : 'Gameport SMF') +option('use_cirrus_smf', type : 'boolean', value : true, description : 'SVGA Cirrus SMF') +option('use_busm_smf', type : 'boolean', value : true, description : 'Bus Mouse SMF') +option('use_acpi_smf', type : 'boolean', value : true, description : 'ACPI SMF')