Skip to contentSkip to conversation

Purpose of Cirrus VGA BIOS

Qemu-devel Bartosz Fabianowski 2 participants 2 messages Jun 7, 2004 – Jun 8, 2004

lore
Share & tools
lore
#0 lore raw

Hi all

I am trying to figure out how the new Cirrus emulation works. One thing I am still not sure about is the purpose of the Cirrus BIOS. The emulation coded inside QEMU seems to be trapping the graphics card interrupt as well as port and memory accesses. It also performs lots of operations and reacts to registers being changed or the interrupt being invoked. So, what exactly is the purpose of the graphics card BIOS in this scenario? What purpose does it serve? Obviously, a real Cirrus BIOS contains lots of code that would control a real Cirrus graphics card and that is totally unnecessary in QEMU. What other stuff does it contain that can't be done in native C code?

- Bartosz

#1 lore raw
Quoted 12 lines · Bartosz Fabianowski

Hi all

I am trying to figure out how the new Cirrus emulation works. One thing I am still not sure about is the purpose of the Cirrus BIOS. The emulation coded inside QEMU seems to be trapping the graphics card interrupt as well as port and memory accesses. It also performs lots of operations and reacts to registers being changed or the interrupt being invoked. So, what exactly is the purpose of the graphics card BIOS in this scenario? What purpose does it serve? Obviously, a real Cirrus BIOS contains lots of code that would control a real Cirrus graphics card and that is totally unnecessary in QEMU. What other stuff does it contain that can't be done in native C code?

For starters, the real Cirrus BIOS would initialize the reserved scratchpad registers (they do have specific uses even if it is not fully documented).

As an aside, looking at the ROP codes, I have worked out the relationship of what the bits mean...

ROP[0] for bit 0
ROP[1] for bit 1
etc

DST = ((ROP[0] & SRC) | ROP[1]) & ((ROP[2] & DST) | (ROP[3] & ~DST))
& ((ROP[4] & ~SRC) | ROP[5]) & ~((ROP[6] & ~DST) | (ROP[7] & DST));

Signature · 1 line
Antony T Curtis <[email protected]>