diff mbox

vga: Respect isa_mem_base when registering chain4 alias

Message ID 4E71C4E0.9000007@siemens.com
State New
Headers show

Commit Message

Jan Kiszka Sept. 15, 2011, 9:26 a.m. UTC
This does not yet unbreak PPC (which has its own problems) but
potentially other non-x86 systems where isa_mem_base is != 0.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vga.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Anthony Liguori Sept. 16, 2011, 2:09 p.m. UTC | #1
On 09/15/2011 04:26 AM, Jan Kiszka wrote:
> This does not yet unbreak PPC (which has its own problems) but
> potentially other non-x86 systems where isa_mem_base is != 0.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   hw/vga.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/hw/vga.c b/hw/vga.c
> index 125fb29..0a0c5a6 100644
> --- a/hw/vga.c
> +++ b/hw/vga.c
> @@ -181,6 +181,7 @@ static void vga_update_memory_access(VGACommonState *s)
>               size = 0x8000;
>               break;
>           }
> +        base += isa_mem_base;
>           region = g_malloc(sizeof(*region));
>           memory_region_init_alias(region, "vga.chain4",&s->vram, offset, size);
>           memory_region_add_subregion_overlap(s->legacy_address_space, base,
diff mbox

Patch

diff --git a/hw/vga.c b/hw/vga.c
index 125fb29..0a0c5a6 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -181,6 +181,7 @@  static void vga_update_memory_access(VGACommonState *s)
             size = 0x8000;
             break;
         }
+        base += isa_mem_base;
         region = g_malloc(sizeof(*region));
         memory_region_init_alias(region, "vga.chain4", &s->vram, offset, size);
         memory_region_add_subregion_overlap(s->legacy_address_space, base,