From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzZpF-0003Zq-MH for qemu-devel@nongnu.org; Mon, 10 Nov 2008 11:41:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzZpB-0003YS-0f for qemu-devel@nongnu.org; Mon, 10 Nov 2008 11:41:17 -0500 Received: from [199.232.76.173] (port=54504 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzZpA-0003YP-ON for qemu-devel@nongnu.org; Mon, 10 Nov 2008 11:41:12 -0500 Received: from mx2.redhat.com ([66.187.237.31]:54717) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KzZpA-0001Sm-5Y for qemu-devel@nongnu.org; Mon, 10 Nov 2008 11:41:12 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mAAGfAxD004051 for ; Mon, 10 Nov 2008 11:41:11 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mAAGf9xo001043 for ; Mon, 10 Nov 2008 11:41:09 -0500 Received: from localhost.localdomain (vpn-14-56.rdu.redhat.com [10.11.14.56]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mAAGf7Js030654 for ; Mon, 10 Nov 2008 11:41:08 -0500 From: Glauber Costa Date: Mon, 10 Nov 2008 16:37:30 -0200 Message-Id: <1226342253-8887-2-git-send-email-glommer@redhat.com> In-Reply-To: <1226342253-8887-1-git-send-email-glommer@redhat.com> References: <1226342253-8887-1-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH] move vga_io_address to VGA State Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org It'll be reused later by the vga optimization. Signed-off-by: Glauber Costa --- hw/cirrus_vga.c | 6 +++--- hw/vga_int.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 55f3ced..6b407ef 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -3118,7 +3118,7 @@ static int cirrus_vga_load(QEMUFile *f, void *opaque, int version_id) static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) { - int vga_io_memory, i; + int i; static int inited; if (!inited) { @@ -3157,10 +3157,10 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) register_ioport_read(0x3ba, 1, 1, vga_ioport_read, s); register_ioport_read(0x3da, 1, 1, vga_ioport_read, s); - vga_io_memory = cpu_register_io_memory(0, cirrus_vga_mem_read, + s->vga_io_memory = cpu_register_io_memory(0, cirrus_vga_mem_read, cirrus_vga_mem_write, s); cpu_register_physical_memory(isa_mem_base + 0x000a0000, 0x20000, - vga_io_memory); + s->vga_io_memory); s->sr[0x06] = 0x0f; if (device_id == CIRRUS_ID_CLGD5446) { diff --git a/hw/vga_int.h b/hw/vga_int.h index 82a755e..fbe5d64 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -129,6 +129,7 @@ typedef void (* vga_update_retrace_info_fn)(struct VGAState *s); int dac_8bit; \ uint8_t palette[768]; \ int32_t bank_offset; \ + int vga_io_memory; \ int (*get_bpp)(struct VGAState *s); \ void (*get_offsets)(struct VGAState *s, \ uint32_t *pline_offset, \ -- 1.5.6.5