# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1211537059 -3600
# Node ID 75e018812e6cc1813cb0942521245c578380be53
# Parent 0016f5a1dd5a1622bcc66b82d2ef9bf4d36e88e3
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-unstable changeset: 17651:3a5750f4a7387cd635328449a03bdc0eb4ae9ce6
xen-unstable date: Mon May 19 09:40:53 2008 +0100
---
xen/arch/x86/hvm/stdvga.c | 36 +++++++++++++++++++++++++++++-------
1 files changed, 29 insertions(+), 7 deletions(-)
diff -r 0016f5a1dd5a -r 75e018812e6c xen/arch/x86/hvm/stdvga.c
--- a/xen/arch/x86/hvm/stdvga.c Thu May 15 15:11:29 2008 +0100
+++ b/xen/arch/x86/hvm/stdvga.c Fri May 23 11:04:19 2008 +0100
@@ -270,9 +270,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 )
{
@@ -292,8 +292,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;
}
@@ -408,7 +419,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 )
@@ -429,8 +440,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;
}
}
@@ -446,7 +468,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
|