xref: /openbmc/qemu/docs/specs/standard-vga.rst (revision ba7d12eb)
1
2QEMU Standard VGA
3=================
4
5Exists in two variants, for isa and pci.
6
7command line switches:
8
9``-vga std``
10   picks isa for -M isapc, otherwise pci
11``-device VGA``
12   pci variant
13``-device isa-vga``
14   isa variant
15``-device secondary-vga``
16   legacy-free pci variant
17
18
19PCI spec
20--------
21
22Applies to the pci variant only for obvious reasons.
23
24PCI ID
25   ``1234:1111``
26
27PCI Region 0
28   Framebuffer memory, 16 MB in size (by default).
29   Size is tunable via vga_mem_mb property.
30
31PCI Region 1
32   Reserved (so we have the option to make the framebuffer bar 64bit).
33
34PCI Region 2
35   MMIO bar, 4096 bytes in size (QEMU 1.3+)
36
37PCI ROM Region
38   Holds the vgabios (QEMU 0.14+).
39
40
41The legacy-free variant has no ROM and has ``PCI_CLASS_DISPLAY_OTHER``
42instead of ``PCI_CLASS_DISPLAY_VGA``.
43
44
45IO ports used
46-------------
47
48Doesn't apply to the legacy-free pci variant, use the MMIO bar instead.
49
50``03c0 - 03df``
51   standard vga ports
52``01ce``
53   bochs vbe interface index port
54``01cf``
55   bochs vbe interface data port (x86 only)
56``01d0``
57   bochs vbe interface data port
58
59
60Memory regions used
61-------------------
62
63``0xe0000000``
64  Framebuffer memory, isa variant only.
65
66The pci variant used to mirror the framebuffer bar here, QEMU 0.14+
67stops doing that (except when in ``-M pc-$old`` compat mode).
68
69
70MMIO area spec
71--------------
72
73Likewise applies to the pci variant only for obvious reasons.
74
75``0000 - 03ff``
76  edid data blob.
77``0400 - 041f``
78  vga ioports (``0x3c0`` to ``0x3df``), remapped 1:1. Word access
79  is supported, bytes are written in little endian order (aka index
80  port first),  so indexed registers can be updated with a single
81  mmio write (and thus only one vmexit).
82``0500 - 0515``
83  bochs dispi interface registers, mapped flat without index/data ports.
84  Use ``(index << 1)`` as offset for (16bit) register access.
85``0600 - 0607``
86  QEMU extended registers.  QEMU 2.2+ only.
87  The pci revision is 2 (or greater) when these registers are present.
88  The registers are 32bit.
89``0600``
90  QEMU extended register region size, in bytes.
91``0604``
92  framebuffer endianness register.
93  - ``0xbebebebe`` indicates big endian.
94  - ``0x1e1e1e1e`` indicates little endian.
95