config.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. "use strict";
  2. /*
  3. * Compile time configuration, some only relevant for debug mode
  4. */
  5. /**
  6. * @define {boolean}
  7. * Overridden for production by closure compiler
  8. */
  9. var DEBUG = true;
  10. /** @const
  11. * Also needs to be set in cargo.toml
  12. */
  13. var ENABLE_PROFILER = false;
  14. /** @const */
  15. var LOG_TO_FILE = false;
  16. /**
  17. * @const
  18. * Enables logging all IO port reads and writes. Very verbose
  19. */
  20. var LOG_ALL_IO = false;
  21. /**
  22. * @const
  23. */
  24. var DUMP_GENERATED_WASM = false;
  25. /**
  26. * @const
  27. * Note: Needs to be enabled here and in const.h
  28. */
  29. var DUMP_UNCOMPILED_ASSEMBLY = false;
  30. /**
  31. * @const
  32. * More accurate filenames in 9p debug messages at the cost of performance.
  33. */
  34. var TRACK_FILENAMES = false;
  35. var LOG_LEVEL = LOG_ALL & ~LOG_PS2 & ~LOG_PIT & ~LOG_VIRTIO & ~LOG_9P & ~LOG_PIC &
  36. ~LOG_DMA & ~LOG_SERIAL & ~LOG_NET & ~LOG_FLOPPY & ~LOG_DISK & ~LOG_VGA;
  37. /** @const */
  38. var ENABLE_HPET = DEBUG && false;
  39. /** @const */
  40. var ENABLE_ACPI = false;
  41. /**
  42. * @const
  43. * How often, in milliseconds, to yield to the browser for rendering and
  44. * running events
  45. */
  46. var TIME_PER_FRAME = 1;
  47. /**
  48. * @const
  49. * How many ticks the TSC does per millisecond
  50. */
  51. var TSC_RATE = 50 * 1000;
  52. /** @const */
  53. var APIC_TIMER_FREQ = TSC_RATE;
  54. /** @const */
  55. var VMWARE_HYPERVISOR_PORT = true;