All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL for-1.3 0/2] vga bugfixes
@ 2012-11-16 13:47 Gerd Hoffmann
  2012-11-16 13:47 ` [Qemu-devel] [PATCH 1/2] vga: fix bochs alignment issue Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2012-11-16 13:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Two little fixes for the standard vga, sent to
the list for review earlier this week.

please pull,
  Gerd

The following changes since commit 6801038bc52d61f81ac8a25fbe392f1bad982887:

  target-mips: fix wrong microMIPS opcode encoding (2012-11-15 14:48:16 +0100)

are available in the git repository at:
  git://git.kraxel.org/qemu vga.1

Gerd Hoffmann (2):
      vga: fix bochs alignment issue
      vga: fix mmio vga register mapping

 docs/specs/standard-vga.txt |    3 ++-
 hw/vga-pci.c                |    7 ++++---
 hw/vga.c                    |    3 +--
 3 files changed, 7 insertions(+), 6 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 1/2] vga: fix bochs alignment issue
  2012-11-16 13:47 [Qemu-devel] [PULL for-1.3 0/2] vga bugfixes Gerd Hoffmann
@ 2012-11-16 13:47 ` Gerd Hoffmann
  2012-11-16 13:47 ` [Qemu-devel] [PATCH 2/2] vga: fix mmio vga register mapping Gerd Hoffmann
  2012-11-17 18:15 ` [Qemu-devel] [PULL for-1.3 0/2] vga bugfixes Blue Swirl
  2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2012-11-16 13:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

The bochs dispi interface traditionally uses port 0x1ce as 16bit index
register and port 0x1cf as 16bit data register.  The later is unaligned,
and probably for that reason the the data register was moved to 0x1d0
for non-x86 archs.

This patch makes the data register available at 0x1d0 on x86 too.  The
old x86 location is kept for compatibility reasons, so both 0x1cf and
0x1d0 can be used as data register on x86.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 docs/specs/standard-vga.txt |    3 ++-
 hw/vga.c                    |    3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/specs/standard-vga.txt b/docs/specs/standard-vga.txt
index 1cecccd..8a4c1e9 100644
--- a/docs/specs/standard-vga.txt
+++ b/docs/specs/standard-vga.txt
@@ -36,7 +36,8 @@ IO ports used
 
 03c0 - 03df : standard vga ports
 01ce        : bochs vbe interface index port
-01cf        : bochs vbe interface data port
+01cf        : bochs vbe interface data port (x86 only)
+01d0        : bochs vbe interface data port
 
 
 Memory regions used
diff --git a/hw/vga.c b/hw/vga.c
index 81aa76b..2b0200a 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2321,9 +2321,8 @@ static const MemoryRegionPortio vbe_portio_list[] = {
     { 0, 1, 2, .read = vbe_ioport_read_index, .write = vbe_ioport_write_index },
 # ifdef TARGET_I386
     { 1, 1, 2, .read = vbe_ioport_read_data, .write = vbe_ioport_write_data },
-# else
-    { 2, 1, 2, .read = vbe_ioport_read_data, .write = vbe_ioport_write_data },
 # endif
+    { 2, 1, 2, .read = vbe_ioport_read_data, .write = vbe_ioport_write_data },
     PORTIO_END_OF_LIST(),
 };
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 2/2] vga: fix mmio vga register mapping
  2012-11-16 13:47 [Qemu-devel] [PULL for-1.3 0/2] vga bugfixes Gerd Hoffmann
  2012-11-16 13:47 ` [Qemu-devel] [PATCH 1/2] vga: fix bochs alignment issue Gerd Hoffmann
@ 2012-11-16 13:47 ` Gerd Hoffmann
  2012-11-17 18:15 ` [Qemu-devel] [PULL for-1.3 0/2] vga bugfixes Blue Swirl
  2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2012-11-16 13:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

---
 hw/vga-pci.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index ec29cac..947e35c 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -84,9 +84,10 @@ static void pci_vga_ioport_write(void *ptr, hwaddr addr,
                                  uint64_t val, unsigned size)
 {
     PCIVGAState *d = ptr;
+
     switch (size) {
     case 1:
-        vga_ioport_write(&d->vga, addr, val);
+        vga_ioport_write(&d->vga, addr + 0x3c0, val);
         break;
     case 2:
         /*
@@ -94,8 +95,8 @@ static void pci_vga_ioport_write(void *ptr, hwaddr addr,
          * indexed registers with a single word write because the
          * index byte is updated first.
          */
-        vga_ioport_write(&d->vga, addr, val & 0xff);
-        vga_ioport_write(&d->vga, addr+1, (val >> 8) & 0xff);
+        vga_ioport_write(&d->vga, addr + 0x3c0, val & 0xff);
+        vga_ioport_write(&d->vga, addr + 0x3c1, (val >> 8) & 0xff);
         break;
     }
 }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PULL for-1.3 0/2] vga bugfixes
  2012-11-16 13:47 [Qemu-devel] [PULL for-1.3 0/2] vga bugfixes Gerd Hoffmann
  2012-11-16 13:47 ` [Qemu-devel] [PATCH 1/2] vga: fix bochs alignment issue Gerd Hoffmann
  2012-11-16 13:47 ` [Qemu-devel] [PATCH 2/2] vga: fix mmio vga register mapping Gerd Hoffmann
@ 2012-11-17 18:15 ` Blue Swirl
  2 siblings, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2012-11-17 18:15 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

On Fri, Nov 16, 2012 at 1:47 PM, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> Two little fixes for the standard vga, sent to
> the list for review earlier this week.
>
> please pull,

Thanks, pulled.

>   Gerd
>
> The following changes since commit 6801038bc52d61f81ac8a25fbe392f1bad982887:
>
>   target-mips: fix wrong microMIPS opcode encoding (2012-11-15 14:48:16 +0100)
>
> are available in the git repository at:
>   git://git.kraxel.org/qemu vga.1
>
> Gerd Hoffmann (2):
>       vga: fix bochs alignment issue
>       vga: fix mmio vga register mapping
>
>  docs/specs/standard-vga.txt |    3 ++-
>  hw/vga-pci.c                |    7 ++++---
>  hw/vga.c                    |    3 +--
>  3 files changed, 7 insertions(+), 6 deletions(-)
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-17 18:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16 13:47 [Qemu-devel] [PULL for-1.3 0/2] vga bugfixes Gerd Hoffmann
2012-11-16 13:47 ` [Qemu-devel] [PATCH 1/2] vga: fix bochs alignment issue Gerd Hoffmann
2012-11-16 13:47 ` [Qemu-devel] [PATCH 2/2] vga: fix mmio vga register mapping Gerd Hoffmann
2012-11-17 18:15 ` [Qemu-devel] [PULL for-1.3 0/2] vga bugfixes Blue Swirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.