OpenCores
URL https://opencores.org/ocsvn/ao486/ao486/trunk

Subversion Repositories ao486

[/] [ao486/] [trunk/] [bochs486/] [config.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
/* config.h.  Generated from config.h.in by configure.  */
2
//
3
//  Copyright (C) 2001-2012  The Bochs Project
4
//
5
//  This library is free software; you can redistribute it and/or
6
//  modify it under the terms of the GNU Lesser General Public
7
//  License as published by the Free Software Foundation; either
8
//  version 2 of the License, or (at your option) any later version.
9
//
10
//  This library is distributed in the hope that it will be useful,
11
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
//  Lesser General Public License for more details.
14
//
15
//  You should have received a copy of the GNU Lesser General Public
16
//  License along with this library; if not, write to the Free Software
17
//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
18
//
19
 
20
//
21
// config.h.in is distributed in the source TAR file.  When you run
22
// the configure script, it generates config.h with some changes
23
// according to your build environment.  For example, in config.h.in,
24
// SIZEOF_UNSIGNED_CHAR is set to 0.  When configure produces config.h
25
// it will change "0" to the detected value for your system.
26
//
27
// config.h contains ONLY preprocessor #defines and a few typedefs.
28
// It must be included by both C and C++ files, so it must not
29
// contain anything language dependent such as a class declaration.
30
//
31
 
32
#ifndef _BX_CONFIG_H_
33
#define _BX_CONFIG_H_ 1
34
 
35
///////////////////////////////////////////////////////////////////
36
// USER CONFIGURABLE OPTIONS : EDIT ONLY OPTIONS IN THIS SECTION //
37
///////////////////////////////////////////////////////////////////
38
 
39
 
40
#if 1
41
// quit_sim is defined in gui/siminterface.h
42
#define BX_EXIT(x)  SIM->quit_sim (x)
43
#else
44
// provide the real main and the usual exit.
45
#define BX_EXIT(x)  ::exit(x)
46
#endif
47
 
48
// if simulating Linux, this provides a few more debugging options
49
// such as tracing all system calls.
50
#define BX_DEBUG_LINUX 0
51
 
52
// adds support for the GNU readline library in the debugger command
53
// prompt.
54
#define HAVE_LIBREADLINE 0
55
#define HAVE_READLINE_HISTORY_H 1
56
 
57
// Define to 1 if you have <locale.h>
58
#define HAVE_LOCALE_H 0
59
 
60
// I rebuilt the code which provides timers to IO devices.
61
// Setting this to 1 will introduce a little code which
62
// will panic out if cases which shouldn't happen occur.
63
// Set this to 0 for optimal performance.
64
#define BX_TIMER_DEBUG 0
65
 
66
// Settable A20 line.  For efficiency, you can disable
67
// having a settable A20 line, eliminating conditional
68
// code for every physical memory access.  You'll have
69
// to tell your software not to mess with the A20 line,
70
// and accept it as always being on if you change this.
71
//   1 = use settable A20 line. (normal)
72
//   0 = A20 is like the rest of the address lines
73
 
74
#define BX_SUPPORT_A20 1
75
 
76
// Processor Instructions Per Second
77
// To find out what value to use for the 'ips' directive
78
// in your '.bochsrc' file, set BX_SHOW_IPS to 1, and
79
// run the software in bochs you plan to use most.  Bochs
80
// will print out periodic IPS ratings.  This will change
81
// based on the processor mode at the time, and various
82
// other factors.  You'll get a reasonable estimate though.
83
// When you're done, reset BX_SHOW_IPS to 0, do a
84
// 'make all-clean', then 'make' again.
85
 
86
#define BX_SHOW_IPS 1
87
 
88
 
89
#if (BX_SHOW_IPS) && (defined(__MINGW32__) || defined(_MSC_VER))
90
#define        SIGALRM         14
91
#endif
92
 
93
// Compile in support for DMA & FLOPPY IO.  You'll need this
94
// if you plan to use the floppy drive emulation.  But if
95
// you're environment doesn't require it, you can change
96
// it to 0.
97
 
98
#define BX_DMA_FLOPPY_IO 1
99
 
100
// Default number of Megs of memory to emulate.  The
101
// 'megs:' directive in the '.bochsrc' file overrides this,
102
// allowing per-run settings.
103
 
104
#define BX_DEFAULT_MEM_MEGS 32
105
 
106
// CPU level emulation. Default level is set in the configure script.
107
// BX_CPU_LEVEL defines the CPU level to emulate.
108
#define BX_CPU_LEVEL 4
109
 
110
// emulate x86-64 instruction set?
111
#define BX_SUPPORT_X86_64 0
112
 
113
// emulate long physical address (>32 bit)
114
#define BX_PHY_ADDRESS_LONG 0
115
 
116
#define BX_HAVE_SLEEP 1
117
#define BX_HAVE_MSLEEP 0
118
#define BX_HAVE_USLEEP 1
119
#define BX_HAVE_NANOSLEEP 1
120
#define BX_HAVE_ABORT 1
121
#define BX_HAVE_SOCKLEN_T 1
122
#define BX_HAVE_SOCKADDR_IN_SIN_LEN 0
123
#define BX_HAVE_GETTIMEOFDAY 1
124
#if defined(WIN32)
125
#define BX_HAVE_REALTIME_USEC 1
126
#else
127
#define BX_HAVE_REALTIME_USEC (BX_HAVE_GETTIMEOFDAY)
128
#endif
129
#define BX_HAVE_MKSTEMP 1
130
#define BX_HAVE_SYS_MMAN_H 1
131
#define BX_HAVE_XPM_H 1
132
#define BX_HAVE_TIMELOCAL 1
133
#define BX_HAVE_GMTIME 1
134
#define BX_HAVE_MKTIME 1
135
#define BX_HAVE_TMPFILE64 1
136
#define BX_HAVE_FSEEK64 0
137
#define BX_HAVE_FSEEKO64 1
138
#define BX_HAVE_NET_IF_H 0
139
#define BX_HAVE___BUILTIN_BSWAP32 1
140
#define BX_HAVE___BUILTIN_BSWAP64 1
141
 
142
// This turns on Roland Mainz's idle hack.  Presently it is specific to the X11
143
// and term gui. If people try to enable it elsewhere, give a compile error
144
// after the gui definition so that they don't waste their time trying.
145
#define BX_USE_IDLE_HACK 0
146
 
147
// Minimum Emulated IPS.
148
// This is used in the realtime PIT as well as for checking the
149
// IPS value set in the config file.
150
#define BX_MIN_IPS 1000000
151
 
152
// Minimum and maximum values for SMP quantum variable. Defines
153
// how many instructions each CPU could execute in one
154
// shot (one cpu_loop call)
155
#define BX_SMP_QUANTUM_MIN  1
156
#define BX_SMP_QUANTUM_MAX 32
157
 
158
// Use Static Member Funtions to eliminate 'this' pointer passing
159
// If you want the efficiency of 'C', you can make all the
160
// members of the C++ CPU class to be static.
161
// This defaults to 1 since it should improve performance, but when
162
// SMP mode is enabled, it will be turned off by configure.
163
#define BX_USE_CPU_SMF 1
164
 
165
#define BX_USE_MEM_SMF 1
166
 
167
// Use static member functions in IO DEVice emulation modules.
168
// For efficiency, use C like functions for IO handling,
169
// and declare a device instance at compile time,
170
// instead of using 'new' and storing the pointer.  This
171
// eliminates some overhead, especially for high-use IO
172
// devices like the disk drive.
173
//   1 = Use static member efficiency (normal)
174
//   0 = Use nonstatic member functions (use only if you need
175
//       multiple instances of a device class
176
 
177
#define BX_USE_HD_SMF       1  // Hard drive
178
#define BX_USE_BIOS_SMF     1  // BIOS
179
#define BX_USE_CMOS_SMF     1  // CMOS
180
#define BX_USE_DMA_SMF      1  // DMA
181
#define BX_USE_FD_SMF       1  // Floppy
182
#define BX_USE_KEY_SMF      1  // Keyboard
183
#define BX_USE_PAR_SMF      1  // Parallel
184
#define BX_USE_PIC_SMF      1  // PIC
185
#define BX_USE_PIT_SMF      1  // PIT
186
#define BX_USE_SER_SMF      1  // Serial
187
#define BX_USE_UM_SMF       1  // Unmapped
188
#define BX_USE_VGA_SMF      1  // VGA
189
#define BX_USE_SB16_SMF     1  // SB 16 soundcard
190
#define BX_USE_ES1370_SMF   1  // ES1370 soundcard
191
#define BX_USE_DEV_SMF      1  // System Devices (port92)
192
#define BX_USE_PCI_SMF      1  // PCI
193
#define BX_USE_P2I_SMF      1  // PCI-to-ISA bridge
194
#define BX_USE_PIDE_SMF     1  // PCI-IDE
195
#define BX_USE_PCIDEV_SMF   1  // PCI-DEV
196
#define BX_USE_USB_UHCI_SMF 1  // USB UHCI hub
197
#define BX_USE_USB_OHCI_SMF 1  // USB OHCI hub
198
#define BX_USE_USB_XHCI_SMF 1  // USB xHCI hub
199
#define BX_USE_PCIPNIC_SMF  1  // PCI pseudo NIC
200
#define BX_USE_E1000_SMF    1  // Intel(R) Gigabit Ethernet
201
#define BX_USE_NE2K_SMF     1  // NE2K
202
#define BX_USE_EFI_SMF      1  // External FPU IRQ
203
#define BX_USE_GAMEPORT_SMF 1  // Gameport
204
#define BX_USE_CIRRUS_SMF   1  // SVGA Cirrus
205
#define BX_USE_BUSM_SMF     1  // Bus Mouse
206
#define BX_USE_ACPI_SMF     1  // ACPI
207
 
208
#define BX_PLUGINS 0
209
#define BX_HAVE_LTDL 0
210
#define BX_HAVE_DLFCN_H 1
211
 
212
#if BX_PLUGINS && \
213
  (   !BX_USE_HD_SMF || !BX_USE_BIOS_SMF || !BX_USE_CMOS_SMF \
214
   || !BX_USE_DMA_SMF || !BX_USE_FD_SMF || !BX_USE_KEY_SMF \
215
   || !BX_USE_PAR_SMF || !BX_USE_PIC_SMF || !BX_USE_PIT_SMF \
216
   || !BX_USE_SER_SMF || !BX_USE_UM_SMF || !BX_USE_VGA_SMF \
217
   || !BX_USE_SB16_SMF || !BX_USE_ES1370_SMF || !BX_USE_DEV_SMF \
218
   || !BX_USE_PCI_SMF || !BX_USE_P2I_SMF \
219
   || !BX_USE_USB_UHCI_SMF || !BX_USE_USB_OHCI_SMF || !BX_USE_USB_XHCI_SMF \
220
   || !BX_USE_PCIPNIC_SMF || !BX_USE_PIDE_SMF || !BX_USE_ACPI_SMF \
221
   || !BX_USE_NE2K_SMF || !BX_USE_EFI_SMF || !BX_USE_GAMEPORT_SMF \
222
   || !BX_USE_E1000_SMF || !BX_USE_PCIDEV_SMF || !BX_USE_CIRRUS_SMF)
223
#error You must use SMF to have plugins
224
#endif
225
 
226
#define USE_RAW_SERIAL 0
227
 
228
// This option enables RAM file backing for large guest memory with a smaller
229
// amount host memory, without causing a panic when host memory is exhausted.
230
#define BX_LARGE_RAMFILE 1
231
 
232
// This option defines the number of supported ATA channels.
233
// There are up to two drives per ATA channel.
234
#define BX_MAX_ATA_CHANNEL 4
235
 
236
#if (BX_MAX_ATA_CHANNEL>4 || BX_MAX_ATA_CHANNEL<1)
237
  #error "BX_MAX_ATA_CHANNEL should be between 1 and 4"
238
#endif
239
 
240
// =================================================================
241
// BEGIN: OPTIONAL DEBUGGER SECTION
242
//
243
// These options are only used if you compile in support for the
244
// native command line debugging environment.  Typically, the debugger
245
// is not used, and this section can be ignored.
246
// =================================================================
247
 
248
// Compile in support for virtual/linear/physical breakpoints.
249
// Enable only those you need. Recommend using only linear
250
// breakpoints, unless you need others. Less supported means
251
// slightly faster execution time.
252
#define BX_DBG_MAX_VIR_BPOINTS 16
253
#define BX_DBG_MAX_LIN_BPOINTS 16
254
#define BX_DBG_MAX_PHY_BPOINTS 16
255
 
256
#define BX_DBG_MAX_WATCHPONTS  16
257
 
258
// max file pathname size for debugger commands
259
#define BX_MAX_PATH     256
260
// max nesting level for debug scripts including other scripts
261
#define BX_INFILE_DEPTH  10
262
// use this command to include (nest) debug scripts
263
#define BX_INCLUDE_CMD   "source"
264
 
265
// Make a call to command line debugger extensions.  If set to 1,
266
// a call is made.  An external routine has a chance to process
267
// the command.  If it does, than the debugger ignores the command.
268
#define BX_DBG_EXTENSIONS 0
269
 
270
// =================================================================
271
// END: OPTIONAL DEBUGGER SECTION
272
// =================================================================
273
 
274
//////////////////////////////////////////////////////////////////////
275
// END OF USER CONFIGURABLE OPTIONS : DON'T EDIT ANYTHING BELOW !!! //
276
// THIS IS GENERATED BY THE ./configure SCRIPT                      //
277
//////////////////////////////////////////////////////////////////////
278
 
279
 
280
#define BX_WITH_X11 1
281
#define BX_WITH_WIN32 0
282
#define BX_WITH_MACOS 0
283
#define BX_WITH_CARBON 0
284
#define BX_WITH_NOGUI 0
285
#define BX_WITH_TERM 0
286
#define BX_WITH_RFB 0
287
#define BX_WITH_AMIGAOS 0
288
#define BX_WITH_SDL 0
289
#define BX_WITH_SVGA 0
290
#define BX_WITH_WX 0
291
 
292
// BX_USE_TEXTCONFIG should be set to 1 unless Bochs is compiled
293
// for wxWidgets only.
294
#define BX_USE_TEXTCONFIG 1
295
 
296
// A certain functions must NOT be fastcall even if compiled with fastcall
297
// option, and those are callbacks from Windows which are defined either 
298
// as cdecl or stdcall. The entry point main() also has to remain cdecl.
299
#ifndef CDECL
300
#if defined(_MSC_VER)
301
  #define CDECL __cdecl
302
#else
303
  #define CDECL
304
#endif
305
#endif
306
 
307
// add special export symbols for win32 DLL building.  The main code must
308
// have __declspec(dllexport) on variables, functions, or classes that the
309
// plugins can access.  The plugins should #define PLUGGABLE which will
310
// activate the __declspec(dllimport) instead.
311
#if defined(WIN32) || defined(__CYGWIN__)
312
#  if BX_PLUGINS && defined(BX_PLUGGABLE)
313
//   #warning I will import DLL symbols from Bochs main program.
314
#    define BOCHSAPI __declspec(dllimport)
315
#  elif BX_PLUGINS
316
//   #warning I will export DLL symbols.
317
#    define BOCHSAPI __declspec(dllexport)
318
#  endif
319
#endif
320
#ifndef BOCHSAPI
321
#  define BOCHSAPI
322
#endif
323
 
324
#if defined(__CYGWIN__)
325
// Make BOCHSAPI_CYGONLY exactly the same as BOCHSAPI.  This symbol
326
// will be used for any cases where Cygwin requires a special tag
327
// but VC++ does not.
328
#define BOCHSAPI_CYGONLY BOCHSAPI
329
#else
330
// define the symbol to be empty
331
#define BOCHSAPI_CYGONLY /*empty*/
332
#endif
333
 
334
#if defined(_MSC_VER)
335
// Make BOCHSAPI_MSVCONLY exactly the same as BOCHSAPI.  This symbol
336
// will be used for any cases where VC++ requires a special tag
337
// but Cygwin does not.
338
#define BOCHSAPI_MSVCONLY BOCHSAPI
339
#else
340
// define the symbol to be empty
341
#define BOCHSAPI_MSVCONLY /*empty*/
342
#endif
343
 
344
#define BX_DEFAULT_CONFIG_INTERFACE "defined_by_configure"
345
#define BX_DEFAULT_DISPLAY_LIBRARY "defined_by_configure"
346
 
347
// Roland Mainz's idle hack is presently specific to X11. If people try to
348
// enable it elsewhere, give a compile error so that they don't waste their
349
// time trying.
350
#if (BX_USE_IDLE_HACK && !BX_WITH_X11 && !BX_WITH_TERM)
351
#  error IDLE_HACK will only work with the X11 or term gui. Correct configure args and retry.
352
#endif
353
 
354
#define WORDS_BIGENDIAN 0
355
 
356
#define SIZEOF_UNSIGNED_CHAR 1
357
#define SIZEOF_UNSIGNED_SHORT 2
358
#define SIZEOF_UNSIGNED_INT 4
359
#define SIZEOF_UNSIGNED_LONG 8
360
#define SIZEOF_UNSIGNED_LONG_LONG 8
361
#define SIZEOF_INT_P 8
362
 
363
#define BX_64BIT_CONSTANTS_USE_LL 1
364
#if BX_64BIT_CONSTANTS_USE_LL
365
// doesn't work on Microsoft Visual C++, maybe others
366
#define BX_CONST64(x)  (x##LL)
367
#elif defined(_MSC_VER)
368
#define BX_CONST64(x)  (x##I64)
369
#else
370
#define BX_CONST64(x)  (x)
371
#endif
372
 
373
#if defined(WIN32)
374
  typedef unsigned char      Bit8u;
375
  typedef   signed char      Bit8s;
376
  typedef unsigned short     Bit16u;
377
  typedef   signed short     Bit16s;
378
  typedef unsigned int       Bit32u;
379
  typedef   signed int       Bit32s;
380
#ifdef __GNUC__
381
  typedef unsigned long long Bit64u;
382
  typedef   signed long long Bit64s;
383
#include <sys/types.h>
384
#include <unistd.h>
385
#else
386
  typedef unsigned __int64   Bit64u;
387
  typedef   signed __int64   Bit64s;
388
#endif
389
#elif BX_WITH_MACOS
390
  typedef unsigned char      Bit8u;
391
  typedef   signed char      Bit8s;
392
  typedef unsigned short     Bit16u;
393
  typedef   signed short     Bit16s;
394
  typedef unsigned int       Bit32u;
395
  typedef   signed int       Bit32s;
396
  typedef unsigned long long Bit64u;
397
  typedef   signed long long Bit64s;
398
#else
399
 
400
// Unix like platforms
401
 
402
#if SIZEOF_UNSIGNED_CHAR != 1
403
#  error "sizeof (unsigned char) != 1"
404
#else
405
  typedef unsigned char Bit8u;
406
  typedef   signed char Bit8s;
407
#endif
408
 
409
#if SIZEOF_UNSIGNED_SHORT != 2
410
#  error "sizeof (unsigned short) != 2"
411
#else
412
  typedef unsigned short Bit16u;
413
  typedef   signed short Bit16s;
414
#endif
415
 
416
#if SIZEOF_UNSIGNED_INT == 4
417
  typedef unsigned int Bit32u;
418
  typedef   signed int Bit32s;
419
#elif SIZEOF_UNSIGNED_LONG == 4
420
  typedef unsigned long Bit32u;
421
  typedef   signed long Bit32s;
422
#else
423
#  error "can't find sizeof(type) of 4 bytes!"
424
#endif
425
 
426
#if SIZEOF_UNSIGNED_LONG == 8
427
  typedef unsigned long Bit64u;
428
  typedef   signed long Bit64s;
429
#elif SIZEOF_UNSIGNED_LONG_LONG == 8
430
  typedef unsigned long long Bit64u;
431
  typedef   signed long long Bit64s;
432
#else
433
#  error "can't find data type of 8 bytes"
434
#endif
435
 
436
#endif
437
 
438
#define GET32L(val64) ((Bit32u)(((Bit64u)(val64)) & 0xFFFFFFFF))
439
#define GET32H(val64) ((Bit32u)(((Bit64u)(val64)) >> 32))
440
 
441
// now that Bit32u and Bit64u exist, defined bx_address
442
#if BX_SUPPORT_X86_64
443
typedef Bit64u bx_address;
444
#else
445
typedef Bit32u bx_address;
446
#endif
447
 
448
// define physical and linear address types
449
typedef bx_address bx_lin_address;
450
 
451
#if BX_SUPPORT_X86_64
452
#define BX_LIN_ADDRESS_WIDTH 48
453
#else
454
#define BX_LIN_ADDRESS_WIDTH 32
455
#endif
456
 
457
#if BX_PHY_ADDRESS_LONG
458
typedef Bit64u bx_phy_address;
459
#if BX_CPU_LEVEL == 5
460
  #define BX_PHY_ADDRESS_WIDTH 36
461
#else
462
  #define BX_PHY_ADDRESS_WIDTH 40
463
#endif
464
#else
465
typedef Bit32u bx_phy_address;
466
#define BX_PHY_ADDRESS_WIDTH 32
467
#endif
468
 
469
// small sanity check
470
#if BX_PHY_ADDRESS_LONG
471
  #if (BX_PHY_ADDRESS_WIDTH <= 32)
472
    #error "BX_PHY_ADDRESS_LONG implies emulated physical address width > 32 bit"
473
  #endif
474
#endif
475
 
476
#define BX_PHY_ADDRESS_MASK ((((Bit64u)(1)) << BX_PHY_ADDRESS_WIDTH) - 1)
477
 
478
#define BX_PHY_ADDRESS_RESERVED_BITS (~BX_PHY_ADDRESS_MASK)
479
 
480
// technically, in an 8 bit signed the real minimum is -128, not -127.
481
// But if you decide to negate -128 you tend to get -128 again, so it's
482
// better not to use the absolute maximum in the signed range.
483
#define BX_MAX_BIT64U ( (Bit64u) -1           )
484
#define BX_MIN_BIT64U ( 0                     )
485
#define BX_MAX_BIT64S ( ((Bit64u) -1) >> 1    )
486
#define BX_MIN_BIT64S ( (Bit64s)-(((Bit64u) -1) >> 1) )
487
#define BX_MAX_BIT32U ( (Bit32u) -1           )
488
#define BX_MIN_BIT32U ( 0                     )
489
#define BX_MAX_BIT32S ( ((Bit32u) -1) >> 1    )
490
#define BX_MIN_BIT32S ( (Bit32s)-(((Bit32u) -1) >> 1) )
491
#define BX_MAX_BIT16U ( (Bit16u) -1           )
492
#define BX_MIN_BIT16U ( 0                     )
493
#define BX_MAX_BIT16S ( ((Bit16u) -1) >> 1    )
494
#define BX_MIN_BIT16S ( (Bit16s)-(((Bit16u) -1) >> 1) )
495
#define BX_MAX_BIT8U  ( (Bit8u) -1            )
496
#define BX_MIN_BIT8U  ( 0                     )
497
#define BX_MAX_BIT8S  ( ((Bit8u) -1) >> 1     )
498
#define BX_MIN_BIT8S  ( (Bit8s)-(((Bit8u) -1) >> 1)  )
499
 
500
 
501
// create an unsigned integer type that is the same size as a pointer.
502
// You can typecast a pointer to a bx_pr_equiv_t without losing any
503
// bits (and without getting the compiler excited).
504
#if SIZEOF_INT_P == 4
505
  typedef Bit32u bx_ptr_equiv_t;
506
#elif SIZEOF_INT_P == 8
507
  typedef Bit64u bx_ptr_equiv_t;
508
#else
509
#  error "could not define bx_ptr_equiv_t to size of int*"
510
#endif
511
 
512
// Use a boolean type that will not conflict with the builtin type
513
// on any system.
514
typedef Bit32u bx_bool;
515
 
516
#define BX_TRUE  (1)
517
#define BX_FALSE (0)
518
 
519
#if BX_WITH_MACOS
520
#  define bx_ptr_t char *
521
#else
522
#  define bx_ptr_t void *
523
#endif
524
 
525
#if defined(WIN32)
526
#  define BX_LITTLE_ENDIAN
527
#elif BX_WITH_MACOS
528
#  define BX_BIG_ENDIAN
529
#else
530
#if WORDS_BIGENDIAN
531
#  define BX_BIG_ENDIAN
532
#else
533
#  define BX_LITTLE_ENDIAN
534
#endif
535
#endif // defined(WIN32)
536
 
537
 
538
#if BX_SUPPORT_X86_64
539
#ifdef BX_LITTLE_ENDIAN
540
typedef
541
  struct {
542
         Bit64u lo;
543
         Bit64u hi;
544
         } Bit128u;
545
typedef
546
  struct {
547
         Bit64u lo;
548
         Bit64s hi;
549
         } Bit128s;
550
#else   // must be Big Endian
551
typedef
552
  struct {
553
         Bit64u hi;
554
         Bit64u lo;
555
         } Bit128u;
556
typedef
557
  struct {
558
         Bit64s hi;
559
         Bit64u lo;
560
         } Bit128s;
561
#endif
562
#endif  // #if BX_SUPPORT_X86_64
563
 
564
 
565
// for now only term.cc requires a GUI sighandler.
566
#define BX_GUI_SIGHANDLER (BX_WITH_TERM)
567
 
568
#define HAVE_SIGACTION 1
569
 
570
// configure will change the definition of "inline" to the value
571
// that the C compiler allows.  It tests the following keywords to
572
// see if any is permitted: inline, __inline__, __inline.  If none
573
// is permitted, it defines inline to be empty.
574
#define inline inline
575
 
576
// Use BX_CPP_INLINE for all C++ inline functions.  Note that the
577
// word "inline" itself may now be redefined by the above #define.
578
#define BX_CPP_INLINE inline
579
 
580
#ifdef __GNUC__
581
 
582
// Some helpful compiler hints for compilers that allow them; GCC for now.
583
//
584
// BX_CPP_AlignN(n):
585
//   Align a construct on an n-byte boundary.
586
//
587
// BX_CPP_AttrPrintf(formatArg, firstArg):
588
//   This function takes printf-like arguments, so the compiler can check
589
//   the consistency of the format string and the matching arguments.
590
//   'formatArg' is the parameter number (starting from 1) of the format
591
//   string argument.  'firstArg' is the parameter number of the 1st argument
592
//   to check against the string argument.  NOTE: For non-static member
593
//   functions, the this-ptr is argument number 1 but is invisible on
594
//   the function prototype declaration - but you still have to count it.
595
//
596
// BX_CPP_AttrNoReturn():
597
//   This function never returns.  The compiler can optimize-out following
598
//   code accordingly.
599
 
600
#define BX_CPP_AlignN(n) __attribute__ ((aligned (n)))
601
#define BX_CPP_AttrPrintf(formatArg, firstArg) \
602
                          __attribute__ ((format (printf, formatArg, firstArg)))
603
#define BX_CPP_AttrNoReturn() __attribute__ ((noreturn))
604
 
605
#else
606
 
607
#define BX_CPP_AlignN(n) /* Not supported. */
608
#define BX_CPP_AttrPrintf(formatArg, firstArg)  /* Not supported. */
609
#define BX_CPP_AttrNoReturn() /* Not supported. */
610
 
611
#endif
612
 
613
#define BX_GDBSTUB 0
614
#define BX_DEBUGGER 0
615
#define BX_DISASM 1
616
#define BX_DEBUGGER_GUI 0
617
 
618
#if (BX_DEBUGGER == 1) && (BX_DISASM == 0)
619
  #error Dissembler is required for BX_DEBUGGER !
620
#endif
621
 
622
#define BX_INSTRUMENTATION 1
623
 
624
// enable BX_DEBUG/BX_ERROR/BX_INFO messages
625
#define BX_NO_LOGGING 0
626
 
627
// enable BX_ASSERT checks
628
#define BX_ASSERT_ENABLE 0
629
 
630
// limited i440FX PCI support
631
#define BX_SUPPORT_PCI 0
632
 
633
// CLGD54XX emulation
634
#define BX_SUPPORT_CLGD54XX 0
635
 
636
// Experimental 3dfx Voodoo (SST-1/2) emulation
637
#define BX_SUPPORT_VOODOO 0
638
 
639
// Experimental host PCI device mapping
640
#define BX_SUPPORT_PCIDEV 0
641
 
642
#if (BX_SUPPORT_PCIDEV && !BX_SUPPORT_PCI)
643
  #error To enable PCI host device mapping, you must also enable PCI
644
#endif
645
 
646
// USB host controllers
647
#define BX_SUPPORT_USB_UHCI 0
648
#define BX_SUPPORT_USB_OHCI 0
649
#define BX_SUPPORT_USB_XHCI 0
650
#define BX_SUPPORT_PCIUSB (BX_SUPPORT_USB_UHCI || BX_SUPPORT_USB_OHCI || BX_SUPPORT_USB_XHCI)
651
 
652
#if (BX_SUPPORT_PCIUSB && !BX_SUPPORT_PCI)
653
  #error To enable USB, you must also enable PCI
654
#endif
655
 
656
// Experimental bus mouse support
657
#define BX_SUPPORT_BUSMOUSE 0
658
 
659
#define BX_SUPPORT_ALIGNMENT_CHECK 1
660
#define BX_SUPPORT_FPU 0
661
#define BX_SUPPORT_3DNOW 0
662
#define BX_SUPPORT_MONITOR_MWAIT 0
663
#define BX_SUPPORT_SVM 0
664
#define BX_SUPPORT_VMX 0
665
#define BX_SUPPORT_AVX 0
666
 
667
#if BX_SUPPORT_SVM && BX_SUPPORT_X86_64 == 0
668
  #error "SVM require x86-64 support"
669
#endif
670
 
671
#if BX_SUPPORT_VMX >= 2 && BX_SUPPORT_X86_64 == 0
672
  #error "VMXx2 require x86-64 support"
673
#endif
674
 
675
#if BX_SUPPORT_AVX && BX_SUPPORT_X86_64 == 0
676
  #error "AVX require x86-64 support"
677
#endif
678
 
679
#define BX_SUPPORT_REPEAT_SPEEDUPS 0
680
#define BX_SUPPORT_HANDLERS_CHAINING_SPEEDUPS 0
681
 
682
#if (BX_DEBUGGER || BX_GDBSTUB) && BX_SUPPORT_HANDLERS_CHAINING_SPEEDUPS
683
 #error "Handler-chaining-speedups are not supported together with internal debugger or gdb-stub!"
684
#endif
685
 
686
#if BX_SUPPORT_3DNOW
687
  #define BX_CPU_VENDOR_INTEL 0
688
#else
689
//AO  #define BX_CPU_VENDOR_INTEL 1
690
//AO new
691
#define BX_CPU_VENDOR_INTEL 0
692
//AO new
693
#endif
694
 
695
// Maximum CPUID vendor and brand string lengths
696
#define BX_CPUID_VENDOR_LEN 12
697
#define BX_CPUID_BRAND_LEN  48
698
 
699
#define BX_CONFIGURE_MSRS 0
700
 
701
#if (BX_SUPPORT_ALIGNMENT_CHECK && BX_CPU_LEVEL < 4)
702
  #error Alignment exception check is not supported in i386 !
703
#endif
704
 
705
#if (BX_CONFIGURE_MSRS && BX_CPU_LEVEL < 5)
706
  #error MSRs are supported only with CPU level >= 5 !
707
#endif
708
 
709
#if (!BX_SUPPORT_FPU && BX_CPU_LEVEL > 4)
710
  #error With CPU level > 4, you must enable FPU support !
711
#endif
712
 
713
#if (BX_SUPPORT_FPU && BX_CPU_LEVEL < 3)
714
  #error "FPU cannot be compiled without cpu level >= 3 !"
715
#endif
716
 
717
#if (BX_CPU_LEVEL<6 && BX_SUPPORT_VMX)
718
  #error "VMX only supported with CPU_LEVEL >= 6 !"
719
#endif
720
 
721
#if BX_SUPPORT_X86_64
722
// Sanity checks to ensure that you cannot accidently use conflicting options.
723
 
724
#if BX_CPU_LEVEL < 6
725
  #error "X86-64 requires cpu level 6 or greater !"
726
#endif
727
#endif
728
 
729
// We have tested the following combinations:
730
//  * processors=1, bootstrap=0, ioapic_id=1   (uniprocessor system)
731
//  * processors=2, bootstrap=0, ioapic_id=2
732
//  * processors=4, bootstrap=0, ioapic_id=4
733
//  * processors=8, bootstrap=0, ioapic_id=8
734
#define BX_SUPPORT_SMP 0
735
#define BX_BOOTSTRAP_PROCESSOR 0
736
 
737
// For P6 and Pentium family processors the local APIC ID feild is 4 bits
738
// APIC_MAX_ID indicate broadcast so it can't be used as valid APIC ID
739
#define BX_MAX_SMP_THREADS_SUPPORTED 0xfe /* leave APIC ID for I/O APIC */
740
 
741
// include in APIC models, required for a multiprocessor system.
742
#if BX_SUPPORT_SMP || BX_CPU_LEVEL >= 5
743
  #define BX_SUPPORT_APIC 1
744
#else
745
  #define BX_SUPPORT_APIC 0
746
#endif
747
 
748
#define BX_HAVE_GETENV 1
749
#define BX_HAVE_SETENV 1
750
#define BX_HAVE_SELECT 1
751
#define BX_HAVE_SNPRINTF 1
752
#define BX_HAVE_VSNPRINTF 1
753
#define BX_HAVE_STRTOULL 1
754
#define BX_HAVE_STRTOUQ 1
755
#define BX_HAVE_STRDUP 1
756
#define BX_HAVE_STRREV 0
757
#define BX_HAVE_STRICMP 0
758
#define BX_HAVE_STRCASECMP 1
759
 
760
// used in term gui
761
#define BX_HAVE_COLOR_SET 0
762
#define BX_HAVE_MVHLINE 0
763
#define BX_HAVE_MVVLINE 0
764
 
765
 
766
// set if your compiler does not understand __attribute__ after a struct
767
#define BX_NO_ATTRIBUTES 0
768
#if BX_NO_ATTRIBUTES
769
#define GCC_ATTRIBUTE(x) /* attribute not supported */
770
#else
771
#define GCC_ATTRIBUTE __attribute__
772
#endif
773
 
774
// set to use fast function calls
775
#define BX_FAST_FUNC_CALL 0
776
 
777
// On gcc2.95+ x86 only
778
#if BX_FAST_FUNC_CALL && defined(__i386__) && defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
779
#if BX_USE_CPU_SMF == 1
780
#  define BX_CPP_AttrRegparmN(X) __attribute__((regparm(X)))
781
#else
782
// FIXME: BX_FAST_FUNC_CALL doesn't work with BX_USE_CPU_SMF = 0
783
#  define BX_CPP_AttrRegparmN(X) /* Not defined */
784
#endif
785
#else
786
#  define BX_CPP_AttrRegparmN(X) /* Not defined */
787
#endif
788
 
789
// set if you do have <set>, used in bx_debug/dbg_main.c
790
#define BX_HAVE_SET 1
791
 
792
// set if you do have <set.h>, used in bx_debug/dbg_main.c
793
#define BX_HAVE_SET_H 0
794
 
795
// set if you do have <map>, used in bx_debug/dbg_main.c
796
#define BX_HAVE_MAP 1
797
 
798
// set if you do have <map.h>, used in bx_debug/dbg_main.c
799
#define BX_HAVE_MAP_H 0
800
 
801
// Support x86 hardware debugger registers and facilities.
802
// These are the debug facilities offered by the x86 architecture,
803
// not the optional built-in debugger.
804
#define BX_X86_DEBUGGER 1
805
 
806
#define BX_SUPPORT_CDROM 1
807
 
808
#if BX_SUPPORT_CDROM
809
   // This is the C++ class name to use if we are supporting
810
   // low-level CDROM.
811
#  define LOWLEVEL_CDROM cdrom_interface
812
#endif
813
 
814
// NE2K network emulation
815
#define BX_SUPPORT_NE2K 0
816
 
817
// Pseudo PCI NIC
818
#define BX_SUPPORT_PCIPNIC 0
819
 
820
#if (BX_SUPPORT_PCIPNIC && !BX_SUPPORT_PCI)
821
  #error To enable the PCI pseudo NIC, you must also enable PCI
822
#endif
823
 
824
// Intel(R) Gigabit Ethernet
825
#define BX_SUPPORT_E1000 0
826
 
827
#if (BX_SUPPORT_E1000 && !BX_SUPPORT_PCI)
828
  #error To enable the E1000 NIC, you must also enable PCI
829
#endif
830
 
831
// this enables the lowlevel stuff below if one of the NICs is present
832
#define BX_NETWORKING 0
833
 
834
// which networking modules will be enabled
835
// determined by configure script
836
#define BX_NETMOD_FBSD    0
837
#define BX_NETMOD_LINUX   0
838
#define BX_NETMOD_WIN32   0
839
#define BX_NETMOD_TAP     0
840
#define BX_NETMOD_TUNTAP  0
841
#define BX_NETMOD_VDE     0
842
#define BX_NETMOD_SLIRP   0
843
 
844
// Soundcard and gameport support
845
#define BX_SUPPORT_SB16 0
846
#define BX_SUPPORT_ES1370 0
847
#define BX_SUPPORT_GAMEPORT 0
848
#define BX_SUPPORT_SOUNDLOW 0
849
 
850
#if BX_SUPPORT_SOUNDLOW
851
// Determines which sound lowlevel class is to be used.
852
// Currently the following are available:
853
//    bx_sound_linux_c      Output for Linux, to /dev/dsp and /dev/midi00
854
//                          or ALSA PCM and sequencer interface
855
//    bx_sound_windows_c    Output for Windows midi and wave mappers
856
//    bx_sound_osx_c        Output for MacOSX midi and wave device
857
//    bx_sound_lowlevel_c   Dummy functions, no output
858
#define BX_SOUND_LOWLEVEL_C bx_sound_lowlevel_c
859
// Use ALSA sound interface on Linux
860
#define BX_HAVE_ALSASOUND  0
861
#endif
862
 
863
#if (BX_SUPPORT_ES1370 && !BX_SUPPORT_PCI)
864
  #error To enable the ES1370 soundcard, you must also enable PCI
865
#endif
866
 
867
// I/O Interface to debugger
868
#define BX_SUPPORT_IODEBUG 0
869
 
870
#ifdef WIN32
871
#define BX_FLOPPY0_NAME "Floppy Disk A:"
872
#define BX_FLOPPY1_NAME "Floppy Disk B:"
873
#else
874
#define BX_FLOPPY0_NAME "Floppy Disk 0"
875
#define BX_FLOPPY1_NAME "Floppy Disk 1"
876
#endif
877
 
878
#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 0)
879
#error "gcc 4.0.0 is known to produce incorrect code which breaks Bochs emulation"
880
#endif
881
 
882
#endif  // _BX_CONFIG_H

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.