WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] stdvga: handle 64bit io operations

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] stdvga: handle 64bit io operations
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 19 May 2008 04:40:07 -0700
Delivery-date: Mon, 19 May 2008 04:40:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1211186453 -3600
# Node ID 3a5750f4a7387cd635328449a03bdc0eb4ae9ce6
# Parent  d0817f08599afe3f2d7ffa2e3fd88e6a65f5e85d
stdvga: handle 64bit io operations

Handle 64bit operations in stdvga instead of throwing away the
upper 32bits.

This fixes some noisy xen messages like "invalid io size: 8".

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 xen/arch/x86/hvm/stdvga.c |   36 +++++++++++++++++++++++++++++-------
 1 files changed, 29 insertions(+), 7 deletions(-)

diff -r d0817f08599a -r 3a5750f4a738 xen/arch/x86/hvm/stdvga.c
--- a/xen/arch/x86/hvm/stdvga.c Fri May 16 09:37:19 2008 +0100
+++ b/xen/arch/x86/hvm/stdvga.c Mon May 19 09:40:53 2008 +0100
@@ -271,9 +271,9 @@ static uint8_t stdvga_mem_readb(uint64_t
     return ret;
 }
 
-static uint32_t stdvga_mem_read(uint32_t addr, uint32_t size)
-{
-    uint32_t data = 0;
+static uint64_t stdvga_mem_read(uint64_t addr, uint64_t size)
+{
+    uint64_t data = 0;
 
     switch ( size )
     {
@@ -293,8 +293,19 @@ static uint32_t stdvga_mem_read(uint32_t
         data |= stdvga_mem_readb(addr + 3) << 24;
         break;
 
+    case 8:
+        data =  (uint64_t)(stdvga_mem_readb(addr));
+        data |= (uint64_t)(stdvga_mem_readb(addr + 1)) << 8;
+        data |= (uint64_t)(stdvga_mem_readb(addr + 2)) << 16;
+        data |= (uint64_t)(stdvga_mem_readb(addr + 3)) << 24;
+        data |= (uint64_t)(stdvga_mem_readb(addr + 4)) << 32;
+        data |= (uint64_t)(stdvga_mem_readb(addr + 5)) << 40;
+        data |= (uint64_t)(stdvga_mem_readb(addr + 6)) << 48;
+        data |= (uint64_t)(stdvga_mem_readb(addr + 7)) << 56;
+        break;
+
     default:
-        gdprintk(XENLOG_WARNING, "invalid io size:%d\n", size);
+        gdprintk(XENLOG_WARNING, "invalid io size: %"PRId64"\n", size);
         break;
     }
 
@@ -409,7 +420,7 @@ static void stdvga_mem_writeb(uint64_t a
     }
 }
 
-static void stdvga_mem_write(uint32_t addr, uint32_t data, uint32_t size)
+static void stdvga_mem_write(uint64_t addr, uint64_t data, uint64_t size)
 {
     /* Intercept mmio write */
     switch ( size )
@@ -430,8 +441,19 @@ static void stdvga_mem_write(uint32_t ad
         stdvga_mem_writeb(addr+3, (data >> 24) & 0xff);
         break;
 
+    case 8:
+        stdvga_mem_writeb(addr+0, (data >>  0) & 0xff);
+        stdvga_mem_writeb(addr+1, (data >>  8) & 0xff);
+        stdvga_mem_writeb(addr+2, (data >> 16) & 0xff);
+        stdvga_mem_writeb(addr+3, (data >> 24) & 0xff);
+        stdvga_mem_writeb(addr+4, (data >> 32) & 0xff);
+        stdvga_mem_writeb(addr+5, (data >> 40) & 0xff);
+        stdvga_mem_writeb(addr+6, (data >> 48) & 0xff);
+        stdvga_mem_writeb(addr+7, (data >> 56) & 0xff);
+        break;
+
     default:
-        gdprintk(XENLOG_WARNING, "invalid io size:%d\n", size);
+        gdprintk(XENLOG_WARNING, "invalid io size: %"PRId64"\n", size);
         break;
     }
 }
@@ -447,7 +469,7 @@ static int mmio_move(struct hvm_hw_stdvg
     {
         if ( p->dir == IOREQ_READ )
         {
-            uint32_t addr = p->addr, data = p->data, tmp;
+            uint64_t addr = p->addr, data = p->data, tmp;
             for ( i = 0; i < p->count; i++ ) 
             {
                 tmp = stdvga_mem_read(addr, p->size);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] stdvga: handle 64bit io operations, Xen patchbot-unstable <=