debuggers.hg

view tools/ioemu/include/config.h @ 3626:abddf91bdfa8

bitkeeper revision 1.1159.212.56 (41faca1d8ReaIESo4E0ltuhh1uQMSg)

Enable ne2k driver in ioemu tools.
Signed-off-by: Xin B Li <xin..b.li@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@intel.com>
author kaf24@scramble.cl.cam.ac.uk
date Fri Jan 28 23:26:21 2005 +0000 (2005-01-28)
parents 2c56c6b39a48
children bbe8541361dd 396d0cbdc29b
line source
1 /* config.h. Generated by configure. */
2 // Copyright (C) 2001 MandrakeSoft S.A.
3 //
4 // MandrakeSoft S.A.
5 // 43, rue d'Aboukir
6 // 75002 Paris - France
7 // http://www.linux-mandrake.com/
8 // http://www.mandrakesoft.com/
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 //
25 // config.h.in is distributed in the source TAR file. When you run
26 // the configure script, it generates config.h with some changes
27 // according to your build environment. For example, in config.h.in,
28 // SIZEOF_UNSIGNED_CHAR is set to 0. When configure produces config.h
29 // it will change "0" to the detected value for your system.
30 //
31 // config.h contains ONLY preprocessor #defines and a few typedefs.
32 // It must be included by both C and C++ files, so it must not
33 // contain anything language dependent such as a class declaration.
34 //
36 #ifdef _BX_CONFIG_H_
37 #else
38 #define _BX_CONFIG_H_ 1
40 ///////////////////////////////////////////////////////////////////
41 // USER CONFIGURABLE OPTIONS : EDIT ONLY OPTIONS IN THIS SECTION //
42 ///////////////////////////////////////////////////////////////////
45 #if 1
46 // quit_sim is defined in gui/siminterface.h
47 #define BX_EXIT(x) SIM->quit_sim (x)
48 #else
49 // provide the real main and the usual exit.
50 #define BX_EXIT(x) ::exit(x)
51 #endif
53 #define BX_USE_CONFIG_INTERFACE 0
54 #define BX_USE_VMX 1
56 // I have tested the following combinations:
57 // * processors=1, bootstrap=0, ioapic_id=1 (uniprocessor system)
58 // * processors=2, bootstrap=0, ioapic_id=2
59 // * processors=4, bootstrap=2, ioapic_id=4
60 #define BX_SMP_PROCESSORS 1
61 #define BX_BOOTSTRAP_PROCESSOR 0
62 // choose IOAPIC id to be equal to the number of processors. This leaves
63 // one space for each processor to have an ID, starting with 0.
64 #define BX_IOAPIC_DEFAULT_ID 1
66 #define BX_ADDRESS_SPACES 1
67 // controls how many instances of BX_MEM_C are created. For
68 // SMP, use several processors with one shared memory space.
69 // For cosimulation, you could use two processors and two address
70 // spaces.
72 #define BX_SUPPORT_APIC 0
73 // include in APIC models, required for a multiprocessor system.
75 #if (BX_SMP_PROCESSORS>1 && !BX_SUPPORT_APIC)
76 #error For multiprocessor simulation, BX_SUPPORT_APIC is required.
77 #endif
79 #define BX_DEBUG_LINUX 0
80 // if simulating Linux, this provides a few more debugging options
81 // such as tracing all system calls.
83 #define HAVE_LIBREADLINE 0
84 #define HAVE_READLINE_HISTORY_H 1
85 // adds support for the GNU readline library in the debugger command
86 // prompt.
88 #define HAVE_LOCALE_H 0
89 // Define to 1 if you have <locale.h>
91 // I rebuilt the code which provides timers to IO devices.
92 // Setting this to 1 will introduce a little code which
93 // will panic out if cases which shouldn't happen occur.
94 // Set this to 0 for optimal performance.
95 #define BX_TIMER_DEBUG 1
97 // Settable A20 line. For efficiency, you can disable
98 // having a settable A20 line, eliminating conditional
99 // code for every physical memory access. You'll have
100 // to tell your software not to mess with the A20 line,
101 // and accept it as always being on if you change this.
102 // 1 = use settable A20 line. (normal)
103 // 0 = A20 is like the rest of the address lines
105 #define BX_SUPPORT_A20 1
107 // Processor Instructions Per Second
108 // To find out what value to use for the 'ips' directive
109 // in your '.bochsrc' file, set BX_SHOW_IPS to 1, and
110 // run the software in bochs you plan to use most. Bochs
111 // will print out periodic IPS ratings. This will change
112 // based on the processor mode at the time, and various
113 // other factors. You'll get a reasonable estimate though.
114 // When you're done, reset BX_SHOW_IPS to 0, do a
115 // 'make all-clean', then 'make' again.
117 #define BX_SHOW_IPS 0
120 #if (BX_SHOW_IPS) && defined(__MINGW32__)
121 #define SIGALRM 14
122 #endif
124 // Paging Options:
125 // ---------------
126 // Support Paging mechanism.
127 // 0 = don't support paging at all (DOS & Minix don't require it)
128 // 1 = support paging. (Most other OS's require paging)
129 // Use Translation Lookaside Buffer (TLB) for caching
130 // paging translations. This will make paging mode
131 // more efficient. If you're OS doesn't use paging,
132 // then you won't need either.
133 // 1 = Use a TLB for effiency
134 // 0 = don't use a TLB, walk the page tables for every access
135 // BX_TLB_SIZE: Number of entries in TLB
136 // BX_TLB_INDEX_OF(lpf): This macro is passed the linear page frame
137 // (top 20 bits of the linear address. It must map these bits to
138 // one of the TLB cache slots, given the size of BX_TLB_SIZE.
139 // There will be a many-to-one mapping to each TLB cache slot.
140 // When there are collisions, the old entry is overwritten with
141 // one for the newest access.
143 #define BX_SUPPORT_PAGING 1
144 #define BX_USE_TLB 1
146 #define BX_TLB_SIZE 1024
147 #define BX_TLB_INDEX_OF(lpf) (((lpf) & 0x003ff000) >> 12)
149 #define BX_USE_QUICK_TLB_INVALIDATE 0
151 // Compile in support for DMA & FLOPPY IO. You'll need this
152 // if you plan to use the floppy drive emulation. But if
153 // you're environment doesn't require it, you can change
154 // it to 0.
156 #define BX_DMA_FLOPPY_IO 1
159 // Default number of Megs of memory to emulate. The
160 // 'megs:' directive in the '.bochsrc' file overrides this,
161 // allowing per-run settings.
163 #define BX_DEFAULT_MEM_MEGS 4
166 // CPU level emulation. Default level is set in
167 // the configure script. BX_CPU_LEVEL defines the CPU level
168 // to emulate. BX_CPU_LEVEL_HACKED is a hack to define the
169 // level of some integer instructions, so they can be tested
170 // before the rest of the emulation is up to that level.
172 #define BX_CPU_LEVEL 5
173 #define BX_CPU_LEVEL_HACKED 5
175 // emulate x86-64 instruction set?
176 #define BX_SUPPORT_X86_64 0
178 // Virtual 8086 mode emulation.
179 // 1 = compile in support for v8086 mode.
180 // 0 = don't compile in support for v8086 mode.
181 #define BX_SUPPORT_V8086_MODE 1
183 // Defines if the simulation should reset on triple fault
184 // if set to 0, the simulation will panic.
185 #define BX_RESET_ON_TRIPLE_FAULT 1
187 // Support shadowing of ROM from C0000 to FFFFF.
188 // This allows that region to be written to.
189 #define BX_SHADOW_RAM 0
191 // Number of CMOS registers
192 #define BX_NUM_CMOS_REGS 64
193 //#define BX_NUM_CMOS_REGS 128
195 // Use Greg Alexander's new PIT model (summer 2001) instead of the original.
196 #define BX_USE_NEW_PIT 1
198 #define BX_USE_SLOWDOWN_TIMER 0
199 #define BX_HAVE_SLEEP 1
200 #define BX_HAVE_MSLEEP 0
201 #define BX_HAVE_USLEEP 1
202 #define BX_HAVE_NANOSLEEP 1
203 #define BX_HAVE_ABORT 1
204 #define BX_HAVE_SOCKLEN_T 1
205 #define BX_HAVE_SOCKADDR_IN_SIN_LEN 0
206 #define BX_HAVE_GETTIMEOFDAY 1
207 #if defined(WIN32)
208 #define BX_HAVE_REALTIME_USEC 1
209 #else
210 #define BX_HAVE_REALTIME_USEC (BX_HAVE_GETTIMEOFDAY)
211 #endif
212 #define BX_HAVE_MKSTEMP 1
213 #define BX_HAVE_SYS_MMAN_H 1
214 #define BX_HAVE_XPM_H 1
215 #define BX_HAVE_TIMELOCAL 1
216 #define BX_HAVE_GMTIME 1
217 #define BX_HAVE_MKTIME 1
219 // This turns on Roland Mainz's idle hack. Presently it is specific to the X11
220 // gui. If people try to enable it elsewhere, give a compile error after the
221 // gui definition so that they don't waste their time trying.
222 #define BX_USE_IDLE_HACK 0
224 // Minimum Emulated IPS.
225 // This is used in the realtime PIT as well as for checking the
226 // IPS value set in the config file.
227 #define BX_MIN_IPS 200000
229 // Use Static Member Funtions to eliminate 'this' pointer passing
230 // If you want the efficiency of 'C', you can make all the
231 // members of the C++ CPU class to be static.
232 // This defaults to 1 since it should improve performance, but when
233 // SMP mode is enabled, it will be turned off by configure.
235 #define BX_USE_CPU_SMF 1
237 // Use static member functions in IO DEVice emulation modules.
238 // For efficiency, use C like functions for IO handling,
239 // and declare a device instance at compile time,
240 // instead of using 'new' and storing the pointer. This
241 // eliminates some overhead, especially for high-use IO
242 // devices like the disk drive.
243 // 1 = Use static member efficiency (normal)
244 // 0 = Use nonstatic member functions (use only if you need
245 // multiple instances of a device class
247 #define BX_USE_HD_SMF 1 // Hard drive
248 #define BX_USE_BIOS_SMF 1 // BIOS
249 #define BX_USE_CMOS_SMF 1 // CMOS
250 #define BX_USE_DMA_SMF 1 // DMA
251 #define BX_USE_FD_SMF 1 // Floppy
252 #define BX_USE_KEY_SMF 1 // Keyboard
253 #define BX_USE_PAR_SMF 1 // Parallel
254 #define BX_USE_PIC_SMF 1 // PIC
255 #define BX_USE_PIT_SMF 1 // PIT
256 #define BX_USE_SER_SMF 1 // Serial
257 #define BX_USE_UM_SMF 1 // Unmapped
258 #define BX_USE_VGA_SMF 1 // VGA
259 #define BX_USE_SB16_SMF 1 // Sound (SB 16)
260 #define BX_USE_DEV_SMF 1 // System Devices (port92)
261 #define BX_USE_PCI_SMF 1 // PCI
262 #define BX_USE_P2I_SMF 1 // PCI-to-ISA bridge
263 #define BX_USE_PCIVGA_SMF 1 // PCI-VGA
264 #define BX_USE_PCIUSB_SMF 1 // USB hub
265 #define BX_USE_NE2K_SMF 1 // NE2K
266 #define BX_USE_EFI_SMF 1 // External FPU IRQ
267 #define BX_USE_GAME_SMF 1 // Gameport
269 #define BX_PLUGINS 0
270 #define BX_HAVE_DLFCN_H 1
272 #if BX_PLUGINS && \
273 ( !BX_USE_HD_SMF || !BX_USE_BIOS_SMF || !BX_USE_CMOS_SMF \
274 || !BX_USE_DMA_SMF || !BX_USE_FD_SMF || !BX_USE_KEY_SMF \
275 || !BX_USE_PAR_SMF || !BX_USE_PIC_SMF || !BX_USE_PIT_SMF \
276 || !BX_USE_SER_SMF || !BX_USE_UM_SMF || !BX_USE_VGA_SMF \
277 || !BX_USE_SB16_SMF || !BX_USE_DEV_SMF || !BX_USE_PCI_SMF \
278 || !BX_USE_P2I_SMF || !BX_USE_PCIVGA_SMF || !BX_USE_PCIUSB_SMF \
279 || !BX_USE_NE2K_SMF || !BX_USE_EFI_SMF || !BX_USE_GAME_SMF)
280 #error You must use SMF to have plugins
281 #endif
283 #define BX_SUPPORT_SB16 0
284 #define BX_SUPPORT_GAME 0
286 #if BX_SUPPORT_SB16
287 // Use virtual methods for the sound output functions
288 #define BX_USE_SOUND_VIRTUAL 1
289 // Determines which sound output class is to be used.
290 // Currently the following are available:
291 // bx_sound_linux_c Output for Linux, to /dev/dsp and /dev/midi00
292 // bx_sound_windows_c Output for Windows midi and wave mappers
293 // bx_sound_output_c Dummy functions, no output
294 #define BX_SOUND_OUTPUT_C bx_sound_output_c
295 #endif
297 #define USE_RAW_SERIAL 0
299 #define BX_USE_SPECIFIED_TIME0 0
301 // This enables writing to port 0xe9 and the output
302 // is sent to the console. Reading from port 0xe9
303 // will return 0xe9 to let you know this is available.
304 // Leave this 0 unless you have a reason to use it.
305 #define BX_PORT_E9_HACK 1
307 #define BX_GDBSTUB 0
309 // This option enables compressed (zlib) hd support
310 #define BX_COMPRESSED_HD_SUPPORT 0
311 #define BX_HAVE_ZLIB 1
313 #if BX_COMPRESSED_HD_SUPPORT && !BX_HAVE_ZLIB
314 #error You must have zlib to enable compressed hd support
315 #endif
317 // This option defines the number of supported ATA channels.
318 // There are up to two drives per ATA channel.
319 #define BX_MAX_ATA_CHANNEL 4
321 #if (BX_MAX_ATA_CHANNEL>4 || BX_MAX_ATA_CHANNEL<1)
322 # error "BX_MAX_ATA_CHANNEL should be between 1 and 4"
323 #endif
325 // =================================================================
326 // BEGIN: OPTIONAL DEBUGGER SECTION
327 //
328 // These options are only used if you compile in support for the
329 // native command line debugging environment. Typically, the debugger
330 // is not used, and this section can be ignored.
331 // =================================================================
333 #define BX_MAX_DIRTY_PAGE_TABLE_MEGS 1024
335 // Compile in support for virtual/linear/physical breakpoints.
336 // Set to 1, only those you need. Recommend using only linear
337 // breakpoints, unless you need others. Less supported means
338 // slightly faster execution time.
339 #define BX_DBG_SUPPORT_VIR_BPOINT 1
340 #define BX_DBG_SUPPORT_LIN_BPOINT 1
341 #define BX_DBG_SUPPORT_PHY_BPOINT 1
343 // You need only define one initial breakpoint into each
344 // cpu simulator (emulator) here. Each simulator sets callbacks
345 // and variables which the debugger uses from then on.
346 #define BX_SIM1_INIT bx_dbg_init_cpu_mem_env0
347 #ifndef BX_SIM2_INIT
348 #define BX_SIM2_INIT bx_dbg_init_cpu_mem_env1
349 #endif
350 //#define BX_SIM2_INIT sim2_init
352 // max number of virtual/linear/physical breakpoints handled
353 #define BX_DBG_MAX_VIR_BPOINTS 10
354 #define BX_DBG_MAX_LIN_BPOINTS 10
355 #define BX_DBG_MAX_PHY_BPOINTS 10
357 // max file pathname size for debugger commands
358 #define BX_MAX_PATH 256
359 // max nesting level for debug scripts including other scripts
360 #define BX_INFILE_DEPTH 10
361 // use this command to include (nest) debug scripts
362 #define BX_INCLUDE_CMD "source"
364 // Use either 32 or 64 bit instruction counter for
365 // debugger purposes. Uncomment one of these.
366 //#define BX_DBG_ICOUNT_SIZE 32
367 #define BX_DBG_ICOUNT_SIZE 64
369 // Make a call to command line debugger extensions. If set to 1,
370 // a call is made. An external routine has a chance to process
371 // the command. If it does, than the debugger ignores the command.
372 #define BX_DBG_EXTENSIONS 0
374 // =================================================================
375 // END: OPTIONAL DEBUGGER SECTION
376 // =================================================================
379 //////////////////////////////////////////////////////////////////////
380 // END OF USER CONFIGURABLE OPTIONS : DON'T EDIT ANYTHING BELOW !!! //
381 // THIS IS GENERATED BY THE ./configure SCRIPT //
382 //////////////////////////////////////////////////////////////////////
385 #define BX_WITH_X11 1
386 #define BX_WITH_BEOS 0
387 #define BX_WITH_WIN32 0
388 #define BX_WITH_MACOS 0
389 #define BX_WITH_CARBON 0
390 #define BX_WITH_NOGUI 0
391 #define BX_WITH_TERM 0
392 #define BX_WITH_RFB 0
393 #define BX_WITH_AMIGAOS 0
394 #define BX_WITH_SDL 0
395 #define BX_WITH_SVGA 0
396 #define BX_WITH_WX 0
398 // add special export symbols for win32 DLL building. The main code must
399 // have __declspec(dllexport) on variables, functions, or classes that the
400 // plugins can access. The plugins should #define PLUGGABLE which will
401 // activate the __declspec(dllimport) instead.
402 #if defined(WIN32) || defined(__CYGWIN__)
403 # if BX_PLUGINS && defined(BX_PLUGGABLE)
404 // #warning I will import DLL symbols from Bochs main program.
405 # define BOCHSAPI __declspec(dllimport)
406 # else
407 // #warning I will export DLL symbols.
408 # define BOCHSAPI __declspec(dllexport)
409 # endif
410 #endif
411 #ifndef BOCHSAPI
412 # define BOCHSAPI
413 #endif
415 #if defined(__CYGWIN__)
416 // Make BOCHSAPI_CYGONLY exactly the same as BOCHSAPI. This symbol
417 // will be used for any cases where Cygwin requires a special tag
418 // but VC++ does not.
419 #define BOCHSAPI_CYGONLY BOCHSAPI
420 #else
421 // define the symbol to be empty
422 #define BOCHSAPI_CYGONLY /*empty*/
423 #endif
425 #define BX_DEFAULT_CONFIG_INTERFACE "defined_by_configure"
426 #define BX_DEFAULT_DISPLAY_LIBRARY "defined_by_configure"
428 // Roland Mainz's idle hack is presently specific to X11. If people try to
429 // enable it elsewhere, give a compile error so that they don't waste their
430 // time trying.
431 #if (BX_USE_IDLE_HACK && !BX_WITH_X11)
432 # error IDLE_HACK will only work with the X11 gui. Correct configure args and retry.
433 #endif
435 #define WORDS_BIGENDIAN 0
437 #define SIZEOF_UNSIGNED_CHAR 1
438 #define SIZEOF_UNSIGNED_SHORT 2
439 #define SIZEOF_UNSIGNED_INT 4
440 #define SIZEOF_UNSIGNED_LONG 4
441 #define SIZEOF_UNSIGNED_LONG_LONG 8
442 #define SIZEOF_INT_P 4
444 #define BX_64BIT_CONSTANTS_USE_LL 1
445 #if BX_64BIT_CONSTANTS_USE_LL
446 // doesn't work on Microsoft Visual C++, maybe others
447 #define BX_CONST64(x) (x##LL)
448 #else
449 #define BX_CONST64(x) (x)
450 #endif
452 #if defined(WIN32)
453 typedef unsigned char Bit8u;
454 typedef signed char Bit8s;
455 typedef unsigned short Bit16u;
456 typedef signed short Bit16s;
457 typedef unsigned int Bit32u;
458 typedef signed int Bit32s;
459 #ifdef __MINGW32__
460 typedef unsigned long long Bit64u;
461 typedef signed long long Bit64s;
462 #include <sys/types.h>
463 #else
464 typedef unsigned __int64 Bit64u;
465 typedef signed __int64 Bit64s;
466 #endif
467 #elif BX_WITH_MACOS
468 typedef unsigned char Bit8u;
469 typedef signed char Bit8s;
470 typedef unsigned short Bit16u;
471 typedef signed short Bit16s;
472 typedef unsigned int Bit32u;
473 typedef signed int Bit32s;
474 typedef unsigned long long Bit64u;
475 typedef signed long long Bit64s;
476 #else
478 // Unix like platforms
480 #if SIZEOF_UNSIGNED_CHAR != 1
481 # error "sizeof (unsigned char) != 1"
482 #else
483 typedef unsigned char Bit8u;
484 typedef signed char Bit8s;
485 #endif
487 #if SIZEOF_UNSIGNED_SHORT != 2
488 # error "sizeof (unsigned short) != 2"
489 #else
490 typedef unsigned short Bit16u;
491 typedef signed short Bit16s;
492 #endif
494 #if SIZEOF_UNSIGNED_INT == 4
495 typedef unsigned int Bit32u;
496 typedef signed int Bit32s;
497 #elif SIZEOF_UNSIGNED_LONG == 4
498 typedef unsigned long Bit32u;
499 typedef signed long Bit32s;
500 #else
501 # error "can't find sizeof(type) of 4 bytes!"
502 #endif
504 #if SIZEOF_UNSIGNED_LONG == 8
505 typedef unsigned long Bit64u;
506 typedef signed long Bit64s;
507 #elif SIZEOF_UNSIGNED_LONG_LONG == 8
508 typedef unsigned long long Bit64u;
509 typedef signed long long Bit64s;
510 #else
511 # error "can't find data type of 8 bytes"
512 #endif
514 #endif
516 // now that Bit32u and Bit64u exist, defined bx_address
517 #if BX_SUPPORT_X86_64
518 typedef Bit64u bx_address;
519 #else
520 typedef Bit32u bx_address;
521 #endif
524 // technically, in an 8 bit signed the real minimum is -128, not -127.
525 // But if you decide to negate -128 you tend to get -128 again, so it's
526 // better not to use the absolute maximum in the signed range.
527 #define BX_MAX_BIT64U ( (Bit64u) -1 )
528 #define BX_MIN_BIT64U ( 0 )
529 #define BX_MAX_BIT64S ( ((Bit64u) -1) >> 1 )
530 #define BX_MIN_BIT64S ( -(((Bit64u) -1) >> 1) )
531 #define BX_MAX_BIT32U ( (Bit32u) -1 )
532 #define BX_MIN_BIT32U ( 0 )
533 #define BX_MAX_BIT32S ( ((Bit32u) -1) >> 1 )
534 #define BX_MIN_BIT32S ( -(((Bit32u) -1) >> 1) )
535 #define BX_MAX_BIT16U ( (Bit16u) -1 )
536 #define BX_MIN_BIT16U ( 0 )
537 #define BX_MAX_BIT16S ( ((Bit16u) -1) >> 1 )
538 #define BX_MIN_BIT16S ( -(((Bit16u) -1) >> 1) )
539 #define BX_MAX_BIT8U ( (Bit8u) -1 )
540 #define BX_MIN_BIT8U ( 0 )
541 #define BX_MAX_BIT8S ( ((Bit8u) -1) >> 1 )
542 #define BX_MIN_BIT8S ( -(((Bit8u) -1) >> 1) )
545 // create an unsigned integer type that is the same size as a pointer.
546 // You can typecast a pointer to a bx_pr_equiv_t without losing any
547 // bits (and without getting the compiler excited). This is used in
548 // the FPU emulation code, where pointers and integers are often
549 // used interchangeably.
550 #if SIZEOF_INT_P == 4
551 typedef Bit32u bx_ptr_equiv_t;
552 #elif SIZEOF_INT_P == 8
553 typedef Bit64u bx_ptr_equiv_t;
554 #else
555 # error "could not define bx_ptr_equiv_t to size of int*"
556 #endif
558 // Use a boolean type that will not conflict with the builtin type
559 // on any system.
560 typedef Bit32u bx_bool;
562 #if BX_WITH_MACOS
563 # define bx_ptr_t char *
564 #else
565 # define bx_ptr_t void *
566 #endif
568 #if defined(WIN32)
569 # define BX_LITTLE_ENDIAN
570 #elif BX_WITH_MACOS
571 # define BX_BIG_ENDIAN
572 #else
573 #if WORDS_BIGENDIAN
574 # define BX_BIG_ENDIAN
575 #else
576 # define BX_LITTLE_ENDIAN
577 #endif
578 #endif // defined(WIN32)
581 #if BX_SUPPORT_X86_64
582 #ifdef BX_LITTLE_ENDIAN
583 typedef
584 struct {
585 Bit64u lo;
586 Bit64u hi;
587 } Bit128u;
588 typedef
589 struct {
590 Bit64u lo;
591 Bit64s hi;
592 } Bit128s;
593 #else // must be Big Endian
594 typedef
595 struct {
596 Bit64u hi;
597 Bit64u lo;
598 } Bit128u;
599 typedef
600 struct {
601 Bit64s hi;
602 Bit64u lo;
603 } Bit128s;
604 #endif
605 #endif // #if BX_SUPPORT_X86_64
608 // for now only term.cc requires a GUI sighandler.
609 #define BX_GUI_SIGHANDLER (BX_WITH_TERM)
611 #define HAVE_SIGACTION 1
613 // configure will change the definition of "inline" to the value
614 // that the C compiler allows. It tests the following keywords to
615 // see if any is permitted: inline, __inline__, __inline. If none
616 // is permitted, it defines inline to be empty.
617 #define inline inline
619 // inline functions in headers that are compiled with C compiler
620 // (e.g. fpu code) are declared with BX_C_INLINE macro. Note that
621 // the word "inline" itself may now be redefined by the above #define.
622 // Many compilers are known to work with "static inline". If the
623 // compiler can put the function inline, it does so and never creates
624 // a symbol for the function. If optimization is off, or inline is
625 // defined to be empty, the static keyword causes the function to create
626 // a symbol that's visible only to that .c file. Each .c file that
627 // includes the header will produde another local version of the
628 // BX_C_INLINE function (not ideal). However without "static" you can
629 // duplicate symbol problems which are even worse.
630 #define BX_C_INLINE static inline
632 // Use BX_CPP_INLINE for all C++ inline functions. Note that the
633 // word "inline" itself may now be redefined by the above #define.
634 #define BX_CPP_INLINE inline
636 #ifdef __GNUC__
638 // Some helpful compiler hints for compilers that allow them; GCC for now.
639 //
640 // BX_CPP_AlignN(n):
641 // Align a construct on an n-byte boundary.
642 //
643 // BX_CPP_AttrPrintf(formatArg, firstArg):
644 // This function takes printf-like arguments, so the compiler can check
645 // the consistency of the format string and the matching arguments.
646 // 'formatArg' is the parameter number (starting from 1) of the format
647 // string argument. 'firstArg' is the parameter number of the 1st argument
648 // to check against the string argument. NOTE: For non-static member
649 // functions, the this-ptr is argument number 1 but is invisible on
650 // the function prototype declaration - but you still have to count it.
651 //
652 // BX_CPP_AttrNoReturn():
653 // This function never returns. The compiler can optimize-out following
654 // code accordingly.
656 #define BX_CPP_AlignN(n) __attribute__ ((aligned (n)))
657 #define BX_CPP_AttrPrintf(formatArg, firstArg) \
658 __attribute__ ((format (printf, formatArg, firstArg)))
659 #define BX_CPP_AttrNoReturn() __attribute__ ((noreturn))
661 #else
663 #define BX_CPP_AlignN(n) /* Not supported. */
664 #define BX_CPP_AttrPrintf(formatArg, firstArg) /* Not supported. */
665 #define BX_CPP_AttrNoReturn() /* Not supported. */
667 #endif
669 #define BX_DEBUGGER 0
670 #define BX_DISASM 0
672 #define BX_PROVIDE_CPU_MEMORY 1
673 #define BX_PROVIDE_DEVICE_MODELS 1
675 #define BX_SUPPORT_VBE 0
677 #define BX_PROVIDE_MAIN 1
679 #define BX_INSTRUMENTATION 0
681 #define BX_USE_LOADER 0
683 // for debugger, CPU simulator handle ID
684 // 0 is the default, for using only one CPU simulator
685 // 1 is for the 2nd CPU simulator
686 #define BX_SIM_ID 0
687 #define BX_NUM_SIMULATORS 1
689 // limited i440FX PCI support
690 #define BX_PCI_SUPPORT 0
692 // Experimental VGA on PCI
693 #define BX_PCI_VGA_SUPPORT 1
695 // limited USB on PCI
696 #define BX_PCI_USB_SUPPORT 0
698 #if (BX_PCI_USB_SUPPORT && !BX_PCI_SUPPORT)
699 #error To enable USB, you must also enable PCI
700 #endif
702 // Promise VLBIDE DC2300 Support
703 #define BX_PDC20230C_VLBIDE_SUPPORT 0
705 #define BX_SUPPORT_FPU 1
706 #define BX_SUPPORT_MMX 1
707 #define BX_SUPPORT_3DNOW 0
708 #define BX_SUPPORT_SSE 0
709 #define BX_SUPPORT_DAZ 0
710 #define BX_SUPPORT_PNI 0
711 #define BX_SUPPORT_SEP 0
712 #define BX_SUPPORT_4MEG_PAGES 0
714 #define BX_SupportGuest2HostTLB 0
715 #define BX_SupportRepeatSpeedups 0
716 #define BX_SupportGlobalPages 0
717 #define BX_SupportPAE 0
718 #define BX_SupportICache 0
719 #define BX_SupportHostAsms 1
722 // if 1, don't do gpf on MSRs that we don't implement
723 #define BX_IGNORE_BAD_MSR 0
725 // ========================================================
726 // These are some very temporary hacks I made to the 64-bit
727 // support to help Peter with debugging etc. They will be removed
728 // soon and there is no configure option for them (on purpose).
729 // By default, they are not compiled in.
731 // I set this to 1 to bail in instructions which may not be honoring
732 // the 64-bit widths of RIP/RSP. If I trip a panic, then I clean
733 // the function up and remove the panic. You don't have to use
734 // these.
735 #if 0
736 #define BailBigRSP(s) \
737 if ( (RIP > 0xffffffff) || \
738 (RSP > 0xffffffff) ) \
739 BX_PANIC((s ": bailing due to big RSP value, mode==%u", \
740 BX_CPU_THIS_PTR cpu_mode))
741 #else
742 #define BailBigRSP(s)
743 #endif
744 // ========================================================
747 #if (BX_SUPPORT_MMX && BX_CPU_LEVEL < 5)
748 #error With CPU level < 5, you must disable MMX support.
749 #endif
751 #if (!BX_SUPPORT_FPU && BX_CPU_LEVEL >= 5)
752 #error With CPU level >= 5, you must enable FPU support.
753 #endif
755 #if (BX_SUPPORT_MMX && !BX_SUPPORT_FPU)
756 #error "MMX cannot be compiled without FPU support"
757 #endif
759 #if (BX_SUPPORT_3DNOW && !BX_SUPPORT_MMX)
760 #error "3DNow! cannot be compiled without MMX support"
761 #endif
763 #if (BX_SUPPORT_SSE && !BX_SUPPORT_MMX)
764 #error "SSE cannot be compiled without FPU+MMX support"
765 #endif
767 #if (BX_CPU_LEVEL<6 && BX_SUPPORT_SSE)
768 #error SSE is only supported with CPU_LEVEL >= 6
769 #endif
771 #if (BX_SUPPORT_PNI && BX_SUPPORT_SSE <= 1)
772 #error "PNI cannot be compiled without SSE/SSE2 support"
773 #endif
775 #if (BX_CPU_LEVEL<6 && BX_SUPPORT_SEP)
776 #error SYSENTER/SYSEXIT only supported with CPU_LEVEL >= 6
777 #endif
779 #if BX_SUPPORT_X86_64
780 // Sanity checks to ensure that you cannot accidently use conflicting options.
782 #if BX_CPU_LEVEL < 5
783 #error X86-64 requires cpu level 6 or greater
784 #endif
785 #if (BX_SUPPORT_SSE<2)
786 #error X86-64 requires SSE2
787 #endif
788 #if !BX_SupportPAE
789 #error X86-64 requires Physical Address Extensions (PAE)
790 #endif
791 #if !BX_SupportGlobalPages
792 #error X86-64 requires Page Global Extension (PGE)
793 #endif
794 #if !BX_SUPPORT_4MEG_PAGES
795 #error X86-64 requires Page Size Extension (PSE)
796 #endif
798 #if BX_SUPPORT_SEP
799 #error SYSENTER/SYSEXIT not implemented for X86-64
800 #endif
802 #endif
804 #define BX_HAVE_GETENV 1
805 #define BX_HAVE_SETENV 1
806 #define BX_HAVE_SELECT 1
807 #define BX_HAVE_SNPRINTF 1
808 #define BX_HAVE_STRTOULL 1
809 #define BX_HAVE_STRTOUQ 1
810 #define BX_HAVE_STRDUP 1
811 #define BX_HAVE_STRREV 0
812 #define BX_HAVE_STRUCT_TIMEVAL 1
814 // used in term gui
815 #define BX_HAVE_COLOR_SET 0
816 #define BX_HAVE_MVHLINE 0
817 #define BX_HAVE_MVVLINE 0
820 // set if your compiler does not permit an empty struct
821 #define BX_NO_EMPTY_STRUCTS 0
823 // set if your compiler does not understand __attribute__ after a struct
824 #define BX_NO_ATTRIBUTES 0
825 #if BX_NO_ATTRIBUTES
826 #define GCC_ATTRIBUTE(x) /* attribute not supported */
827 #else
828 #define GCC_ATTRIBUTE __attribute__
829 #endif
831 // set to use fast function calls
832 #define BX_FAST_FUNC_CALL 0
834 // On gcc2.95+ x86 only
835 #if BX_FAST_FUNC_CALL && defined(__i386__) && defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
836 # define BX_CPP_AttrRegparmN(X) __attribute__((regparm(X)))
837 #else
838 # define BX_CPP_AttrRegparmN(X) /* Not defined */
839 #endif
841 // set if your compiler does not allow label at the end of a {} block
842 #define BX_NO_BLANK_LABELS 0
844 // set if you do have <hash_map>, used in bx_debug/dbg_main.c
845 #define BX_HAVE_HASH_MAP 0
847 // set if you do have <hash_map.h>, used in bx_debug/dbg_main.c
848 #define BX_HAVE_HASH_MAP_H 1
850 // set if you do have <set>, used in bx_debug/dbg_main.c
851 #define BX_HAVE_SET 1
853 // set if you do have <set.h>, used in bx_debug/dbg_main.c
854 #define BX_HAVE_SET_H 1
856 // Support x86 hardware debugger registers and facilites.
857 // These are the debug facilites offered by the x86 architecture,
858 // not the optional built-in debugger.
859 #define BX_X86_DEBUGGER 0
861 #define BX_SUPPORT_CDROM 1
863 #if BX_SUPPORT_CDROM
864 // This is the C++ class name to use if we are supporting
865 // low-level CDROM.
866 # define LOWLEVEL_CDROM cdrom_interface
867 #endif
869 // NE2K network emulation
870 #define BX_NE2K_SUPPORT 1
871 #define BX_ETH_NULL_LOGGING 1
872 #define BX_ETH_FBSD_LOGGING 1
874 // determine which NE2K packet mover modules will be enabled
875 // (this was moved from iodev/eth.h)
876 #define ETH_NULL 1
877 #ifdef BX_USE_ETH_ARPBACK
878 # define ETH_ARPBACK 1
879 #endif
880 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
881 #define ETH_FBSD 1
882 #endif
883 #if defined(linux)
884 #define ETH_LINUX 1
885 #endif
886 #if defined(WIN32)
887 #define ETH_WIN32 1
888 #endif
890 // this enables Ethertap packet mover; determined by configure script
891 #define HAVE_ETHERTAP 0
893 // this enables TUN/TAP packet mover; determined by configure script
894 #define HAVE_TUNTAP 1
897 // I/O Interface to debug
898 #define BX_IODEBUG_SUPPORT 0
900 // External Debugger
901 #define BX_EXTERNAL_DEBUGGER 0
902 #define BX_OVERRIDE_ASK 0
904 #ifdef WIN32
905 #define BX_FLOPPY0_NAME "Floppy Disk A:"
906 #define BX_FLOPPY1_NAME "Floppy Disk B:"
907 #else
908 #define BX_FLOPPY0_NAME "Floppy Disk 0"
909 #define BX_FLOPPY1_NAME "Floppy Disk 1"
910 #endif
912 // This is handy for certain performance testing purposes, but otherwise
913 // totally useless. If you define BX_SCHEDULED_DIE_TIME then it enables code
914 // in bx_pit_c::periodic that will cause Bochs to exit() after a certain number
915 // of instructions.
916 //#define BX_SCHEDULED_DIE_TIME 1162230000 // end of redhat6.0 boot
919 #endif // _BX_CONFIG_H