Page 1 of 1

Bochs 2.6 is released

Posted: Wed Aug 22, 2012 12:35 am
by stlw
Bochs 2.6pre1 pre-release was issued. Please help testing!

Code: Select all

Changes since 2.5.1 release:

- CPU
  - Implemented EPT A/D extensions support.
    Bochs is fully aligned with the latest published revision of
    Intel Architecture Manual (revision 043) now.
  - Implemented ADX (ADCX/ADOX) instructions support, the feature can
    be enabled using .bochsrc CPUID option.
  - More than 10% CPU emulation speedup with even more optimal lazy flags
    handling, stack access optimizations and cross branch trace linking.
  - Support for AMD's SVM hardware emulation in Bochs CPU, to enable
    configure with --enable-svm option
  - Implemented AMD Extended XAPIC support, to enable set .bochsrc CPU
    APIC option to 'xapic_ext'
  ! Added Corei5 750 (Lynnfield) configuration to the CPUDB
  ! Added Turion64 (Tyler) configuration to the CPUDB
  ! Added AMD Phenom X3 8650 (Toliman) configuration to the CPUDB
  ! Added Corei7 3770K (Ivy Bridge) configuration to the CPUDB
  - Bugfixes for CPU emulation correctness and stability
    (critical fixes in APIC/X2APIC, VMX and AVX/XOP emulation)

- Bochs Debugger and Instrumentation
  - Implemented new debugger command 'info device [string]' that shows the
    state of the device specified in 'string'
  - Improved debug dump for ne2k, pci, pic and vga/cirrus devices. Added
    debug dump for pci2isa, i/o apic, cmos, pit, floppy and dma devices.
  - Added TLB to CPU param tree - now it can be browsed from Bochs internal
    debugger and Bochs debugger GUI through param tree interfaces
  - Implemented 'writemem' debugger command to dump virtual memory block
    starting from selected linear address into a file
  - Updated definition of instrumentation callbacks, see description in
    instrumentation.txt / Fixed instrumentation examples

- Configure and compile
  - Moved disk imaging, networking, sound and USB devices to subdirectories
    in the iodev folder.
  - pcidev: enable support for Linux kernel 3.x (Debian patch by Guillem Jover)
  - debugger: generate parser / lexer files only if all required tools are present

- Config interface
  - Added support for direct device plugin loading with bochsrc directive for
    devices which have the same name for the plugin and config option.
  - The bochsrc option 'plugin_ctrl' can now be used to load/unload optional
    plugins directly when parsing the config file or command line. See the bochsrc
    sample for supported devices.
  - Moved bochsrc parsing / writing and config parameter handling for networking,
    sound and USB devices to the plugin device code. The options are only
    available when the corresponding plugin device is loaded.
  - Added ability to set log action per device from .bochsrc.
  - Added new command line option '-noconsole' to disable the console
    window on Windows host.
  - Renamed PCI Pseudo NIC option to "pcipnic" (for direct plugin loading)
  - Moved several related options to the new "keyboard" bochsrc option.
  - Added new parameter 'rtc_sync' for the 'clock' option. If this option
    is enabled together with the realtime synchronization, the RTC runs
    at realtime speed.
  - Moved MWAIT_IS_NOP bochsrc option from CPUID to CPU so it can be set
    even if cpu was configured using pre-defined CPUDB profile.
  - Allow larger CPU 'quantum' values when emulating SMP systems for speed
    (quantum values up to 32 are allowed now).

- I/O Devices
  - Networking
    - Ported Intel(R) 82540EM Gigabit Ethernet adapter emulation from Qemu,
      to enable configure with option --enable-e1000
    - Added PCI network boot ROM support to all network adapters
    - Added TFTP support to the 'slirp' networking module
  - PCI
    - added "auto-assign to PCI slot" feature for PCI-only devices
  - DMA
    - Added the capability to transfer more then one byte / word per ISA DMA cycle
  - VGA
    - Major rewrite of the vga / cirrus code:
      - vgacore (shared standard VGA emulation code)
      - vga (Bochs VBE and PCI VGA)
      - cirrus (CL-GD 5430 ISA / CL-GD 5446 PCI)
    - Added VGA graphics blinking support
    - More accurate vertical and horizontal retrace emulation
      (based on the DOSBox implementation)
  - hard drive / hdimage
    - added new disk image mode 'vpc' for VirtualPC images
    - undoable mode: added coherency check (flat image size and timestamp)
    - sparse mode: fixed read support
  - Sound
    - implemented PC speaker beep using the lowlevel sound interface
    - added SDL audio output support

- ROM BIOS
  - improved PCI boot ROM support (for VGA and other devices)
  - added MADT entry for Interrupt Source Override to ACPI tables

- GUI and display libraries
  - implemented "auto-off" timer for status LEDs indicating a data transfer
  - Implemented "hideIPS" option in sdl and wx libraries
  - Added support for sending absolute mouse position values from the gui if an
    absolute pointing device (USB tablet) is active (rfb, sdl, win32, wx, x).
  - Gui debugger now supported when using sdl gui on Windows

- Tools
  - bxcommit: added support for converting growing to flat mode images
  - bxcommit: support command line options and non-interactive (quiet) mode
  - bximage: increased maximum disk size to 8 TB

- SF patches applied
  [3540389] Patch 5 : Change memory reference functions argument order by Yeong-uk Jo
  [3539254] Patch 4 : Memory reference optimization 2 by Yeong-uk Jo
  [3539251] Patch 3 : Memory reference optimization by Yeong-uk Jo
  [3539237] Patch 2 : Some optimization by Yeong-uk Jo
  [3539228] Patch 1 : ROM BIOS Compatibility patch by Yeong-uk Jo
  [3505209] Fixed combo box size by Konrad Grochowski
  [2864391] Gui debugger default regs by Thomas Nilsen
  [3486555] Fix critical stack leak in Win32 GUI by Carlo Bramini

- these S.F. bugs were closed/fixed
  [3534063] Configure does not check for flex presence
  [3555237] NE2000 doesn't compile on OS/X
  [3553168] X doesn't build in latest code on OS/X
  [3550175] Crash when saving snapshot to directory instead of file
  [3548109] VMX State Not Restored After Entering SMM on 32-bit Systems
  [3548108] VMEXIT Instruction Length Not Always Getting Updated
  [3545941] Typo in preprocessor symbol
  [3538731] Missing CR8 register
  [3538574] Missing XD flag ( Execute Disable ) when showing PTEs
  [3537556] Missing initializations
  [3537309] Unable to use the debug GUI with SDL and plugins
  [3537473] GUI debugger only shows 32-bit CRx registers in x86-64 mode
  [3533426] UHCI PCI interrupts
  [3459359] svga cirrus initialization
  [3535228] info gdt does not show long mode segments
  [3531806] Bochs crashes (SIGSEGV) when starting via ssh console
  [3531807] Various missing initialization values reported by Valgrind
   [635789] mapping mode 0 not supported
  [3307201] BOCHS panics when execute HBIOS.COM
  [3528809] IO APIC index register width
  [3528516] Missing #if in soundmod.h
  [3526069] MADT:Interrupt Source Override missed
  [3518753] update dump after manual chages to memory contents
  [3516859] bug in svn e1000 module
  [3516029] stepping not working in debugger GUI in case of smp vm
  [3510403] closing config dialog box closes entire simulator
  [3459998] Bochs cannot be compiled outside the source tree
  [2905969] can't use --enable-gdb-stub on vs2008
  [3294001] Bochs GUI doesn't appear properly for 2nd Bochs copy
  [3493315] Changing VGA 9/8 dot mode causes screen corruption

- these S.F. feature requests were closed/implemented
  [3540441] automatically enable devices in plugin control
  [1251456] command line method to query bochs for features
  [3409396] sdl sound
  [3519794] debugger's ability to save physical/linear memory dumps
  [1429612] Idea how to speedup simulation - stack direct access
  [1703452] Other Network Devices?
  [2919376] Disable show the console window
   [534271] can't set log action by device (bochsrc)
Source code and also binary packages for Windows and Linux available to download from Bochs website http://bochs.sf.net.

For people intersting in source packages I suggest to download latest SVN snapshot - it has another optimization implemented which speedups emulation in another 5% over 2.6pre1 snapshot.

Thanks,
Stanislav

Re: Bochs 2.6pre1 pre-release was issued. Please help testin

Posted: Wed Aug 22, 2012 2:40 am
by xenos
I just downloaded and compiled the newest version and I can only say: Well done! This is absolutely great work!

A few early comments before I start thorough testing:

Code: Select all

  - Implemented new debugger command 'info device [string]' that shows the
    state of the device specified in 'string'
This confused me a bit when I entered info device vga and got an error, until I realized that it should be quoted like info device "vga". Nice feature, it will make debugging hardware drivers much easier.

Code: Select all

  - Added TLB to CPU param tree - now it can be browsed from Bochs internal
    debugger and Bochs debugger GUI through param tree interfaces
Very nice! I didn't even know such an interface exists. I got it working in the debugger GUI, but how do I display the param tree (or parts of it) using the CLI?

Code: Select all

  - Implemented 'writemem' debugger command to dump virtual memory block
    starting from selected linear address into a file
Nice feature! Maybe I missed it, but is there a similar way to dump physical memory instead?

Code: Select all

  - debugger: generate parser / lexer files only if all required tools are present
This has always annoyed me - nice to see it has been changed.

Code: Select all

  - Added ability to set log action per device from .bochsrc.
Great! I've been waiting for this for a long time and I'm happy it's finally implemented! No more fiddling around with the config interface to set individual log options at runtime. In my opinion this is one of the best new features!

Re: Bochs 2.6pre1 pre-release was issued. Please help testin

Posted: Wed Aug 22, 2012 5:04 am
by stlw
XenOS wrote:

Code: Select all

  - Added TLB to CPU param tree - now it can be browsed from Bochs internal
    debugger and Bochs debugger GUI through param tree interfaces
Very nice! I didn't even know such an interface exists. I got it working in the debugger GUI, but how do I display the param tree (or parts of it) using the CLI?
You have 'show [string]' command in the command line debugger.
it searches for param name as is in the param tree first then tries to add prefix 'cpu' with current CPU number and searches again.
So for showing CPU details you don't need to add explicitly cpu0 prefix.
For example:
show "CS" -> will show you cpu0.CS param tree

Stanislav

Re: Bochs 2.6pre1 pre-release was issued. Please help testin

Posted: Wed Aug 22, 2012 5:27 am
by xenos
stlw wrote:show "CS" -> will show you cpu0.CS param tree
...and show "TLB" does indeed show the TLB contents. Very nice! It's a whole bunch of output, but since I mainly dump the debugger output into a log file, this is perfectly fine. And I just figured out that show "TLB.entry0", show "TLB.entry0.lpf" etc. does what one would expect.

Re: Bochs 2.6pre1 pre-release was issued. Please help testin

Posted: Thu Aug 23, 2012 7:30 am
by IanSeyler
While running FreeBSD 9.0 with the Bochs Enhanced Debugger I get the following message repeated in the console:

Code: Select all

01510954833i[APIC0] set timer divide factor to 2
01510994829i[APIC0] set timer divide factor to 2
01511034821i[APIC0] set timer divide factor to 2
01511074855i[APIC0] set timer divide factor to 2
01511108630i[APIC0] set timer divide factor to 2
01511114618i[APIC0] set timer divide factor to 2
01511154850i[APIC0] set timer divide factor to 2
01511195148i[APIC0] set timer divide factor to 2
I also receive some panic messages:

Code: Select all

failed assertion "0" at proc_ctrl.cc:408
Both of these are minor issues as the emulation continues on.

My major issue is with the debugger itself with doing a dump of memory. During execution of a program I can see RSI is set to 0x801BE208A and RDI is set to 0x801B11658. Both of these addresses are valid as the program is reading from them. However, if I try to do a physical dump I get the message: "Address range was not legal memory". Not very helpful when I want to see what the program is working on.

-Ian

Re: Bochs 2.6pre1 pre-release was issued. Please help testin

Posted: Thu Aug 23, 2012 7:52 am
by stlw
ReturnInfinity wrote:While running FreeBSD 9.0 with the Bochs Enhanced Debugger I get the following message repeated in the console:

Code: Select all

01510954833i[APIC0] set timer divide factor to 2
01510994829i[APIC0] set timer divide factor to 2
01511034821i[APIC0] set timer divide factor to 2
01511074855i[APIC0] set timer divide factor to 2
01511108630i[APIC0] set timer divide factor to 2
01511114618i[APIC0] set timer divide factor to 2
01511154850i[APIC0] set timer divide factor to 2
01511195148i[APIC0] set timer divide factor to 2
I also receive some panic messages:

Code: Select all

failed assertion "0" at proc_ctrl.cc:408
Both of these are minor issues as the emulation continues on.

My major issue is with the debugger itself with doing a dump of memory. During execution of a program I can see RSI is set to 0x801BE208A and RDI is set to 0x801B11658. Both of these addresses are valid as the program is reading from them. However, if I try to do a physical dump I get the message: "Address range was not legal memory". Not very helpful when I want to see what the program is working on.

-Ian
Can you give me a pointer to the FreeBSD 9.0 ?
I don't think that assertion in proc_ctrl.cc is so minor issue -> this means that Bochs went to the place it was not expected to go.
I would like to investigate the issue on my own system.

About the physical dump - I guess you doing smth wrong. The RSI and RDI values are just values. Which physical dump you trying to do ?
I don't think you trying to dump physical memory between 0x801BE208A and 0x801B11658 - don't think you emulate more than 16GB of RAM.
Are these linear addresses ? So it is not physical dump ...

Stanislav

P.S. You can disable APIC messages though .bochsrc individually and don't both for "set timer divide factor" anymore.

Re: Bochs 2.6pre1 pre-release was issued. Please help testin

Posted: Fri Aug 24, 2012 1:32 pm
by Nable
> failed assertion "0" at proc_ctrl.cc:408

I think that it's the issue that i discovered some months ago (http://forum.osdev.org/viewtopic.php?p=209964#p209964), it was hided by some changes but it's still alive.

It's really difficult to find the reason but recently i've learnt about reverse-debugging. Also, internet says that gdb supports it since 2009. So, time to learn this tech and finally catch the bug. I still hope that it's neither compiler nor CPU issue.

Re: Bochs 2.6pre1 pre-release was issued. Please help testin

Posted: Sat Aug 25, 2012 3:32 am
by stlw
Nable wrote:> failed assertion "0" at proc_ctrl.cc:408

I think that it's the issue that i discovered some months ago (http://forum.osdev.org/viewtopic.php?p=209964#p209964), it was hided by some changes but it's still alive.

It's really difficult to find the reason but recently i've learnt about reverse-debugging. Also, internet says that gdb supports it since 2009. So, time to learn this tech and finally catch the bug. I still hope that it's neither compiler nor CPU issue.
I would like to reproduce it again in controlled environment first.
If you have the disk image - please mail me.

Thanks,
Stanislav

Re: Bochs 2.6pre1 pre-release was issued. Please help testin

Posted: Thu Aug 30, 2012 5:29 am
by Kevin
stlw wrote:- added new disk image mode 'vpc' for VirtualPC images
Why not call it 'vhd' while you still have the choice? I would have renamed it long ago in qemu if renaming didn't break command line compatibility...
For people intersting in source packages I suggest to download latest SVN snapshot - it has another optimization implemented which speedups emulation in another 5% over 2.6pre1 snapshot.
By the way, is there a git mirror somewhere that is kept up to date? bochs is probably large enough that I suspect doing the git-svn myself would require some patience.