Re: VGA emulation in BOCHS

Xin Tong <[email protected]>
Newsgroups gmane.comp.emulators.bochs.devel
Message-ID <CALKntY2v0nBN75D8FFAbo14-gi9hst4++pwEs+Ct9gVO-R5-3g@mail.gmail.com>
I am now running BOCHS emulated CPUs in parallel ( i.e. on separate
host os threads). only the  BX_CPU(0) is decrementing the
countDownEvent. However, i get an assertion in libx11.so shared
library when i run many CPUs ( i.e. 8 CPUs). i suspect it is due to
the fact that the libx11 is not thread safe and more than 1 CPUs are
working in the x.cc code.   If only BX_CPU(0)  is decrementing the
countDownEvent. can other thread also have access to anything in the
GUI ?


Thank you,
Xin


On Thu, Oct 18, 2012 at 3:42 PM, Volker Ruppert
<[email protected]> wrote:
> Hi!
>
>
>> I am looking at how BOCHS emulates VGA. it seems to be that VGA memory
>> is within a fixed memory range and different processors can write to
>> the memory using PIO or MMIO.  when the countDownEvent is called. The
>> current states in the VGA buffer is updated to the X window through
>> xcblib APIs. I have 2 questions.
>> 1. what sets up the fixed memory region for VGA ? The BIOS ?
>
>
> The VGA memory regions are defined in the PC standard and the VGA init code
> registers the memory handlers for it. That's all in the ISA case and with no
> extension enabled. In the PCI case and with Bochs VBE or Cirrus extension
> the PCI BIOS initializes the bases address regions for RAM and ROM. In this
> case these PC standard compatible regions are also present:
>
> A0000 - AFFFF  EGA/VGA graphics window
> B0000 - B7FFF  Monochrome text mode
> B8000 - BFFFF  CGA graphics and color text mode
> C0000          Start address of the VGA BIOS ROM
>
>
>> 2. Is the update to x windows only invoked from the vga update
>> function which is called by countDownEvent ?
>
>
> The display adapter code registers a virtual timer und the timer function
> executes the update code for the display library (gui). In earlier versions
> of Bochs there was a parameter 'vga_update_interval' and a standard timer
> (in pc_system.cc) was initialized with it's value.
> Now we are using the bochsrc option 'vga: update_freq' to set up the screen
> update timing and the timer value is calculated internally. In addition to
> this we are using a virtual timer that calls the screen updates with
> realtime frequency if the option 'clock: sync=realtime' is used. I'd like to
> use always realtime for the VGA screen updates, but I haven't managed to
> rewrite the virtual timer code yet.
>
> --
> Volker
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.