summaryrefslogtreecommitdiff
path: root/hw/display/vga-isa-mm.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-12-09 14:30:08 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2019-12-18 02:34:13 +0100
commite2328a11bda7a4d087200c524333adafb8beb7d7 (patch)
tree1a671e664c6c9f6cdc5aa0fa27b24fe2e76585f3 /hw/display/vga-isa-mm.c
parent97d8381543647887bc2997ecfeccc67831e47fdc (diff)
downloadqemu-e2328a11bda7a4d087200c524333adafb8beb7d7.zip
vga: cleanup mapping of VRAM for non-PCI VGA
vga_init_vbe is now used only from ISA VGA cards. Since the alias is not needed anymore, remove it (effectively reverting commit 8294a64d7f, "vga: fix vram double-mapping with -vga std and -M pc-0.12", 2012-05-29) and the now unused vbe_mapped field of VGACommonState. The function now consists of a single memory_region_add_subregion call, so we can inline it; this avoids incorrect usage from PCI cards. Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Based-on: <05af415a-5058-98b4-4a12-9d093a30b1e3@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/display/vga-isa-mm.c')
-rw-r--r--hw/display/vga-isa-mm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/display/vga-isa-mm.c b/hw/display/vga-isa-mm.c
index e9c43e5530..7321b7a06d 100644
--- a/hw/display/vga-isa-mm.c
+++ b/hw/display/vga-isa-mm.c
@@ -106,6 +106,9 @@ int isa_vga_mm_init(hwaddr vram_base,
s->vga.con = graphic_console_init(NULL, 0, s->vga.hw_ops, s);
- vga_init_vbe(&s->vga, NULL, address_space);
+ memory_region_add_subregion(address_space,
+ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+ &s->vga.vram);
+
return 0;
}