X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Fmain.c;h=ea432912b61d078ce6bfed71a817142f1b1a26d5;hp=9877cd76247a53e2252886cabfe8c9767eb5ad7c;hb=8c38488bc7d510a85ad23222ddd228924d14be8a;hpb=4c17fb67c38120c141fa36bca9d7faa418b3c8e5 diff --git a/palacios/src/geekos/main.c b/palacios/src/geekos/main.c index 9877cd7..ea43291 100644 --- a/palacios/src/geekos/main.c +++ b/palacios/src/geekos/main.c @@ -3,7 +3,7 @@ * Copyright (c) 2001,2003,2004 David H. Hovemeyer * Copyright (c) 2003, Jeffrey K. Hollingsworth * Copyright (c) 2004, Iulian Neamtiu - * $Revision: 1.29 $ + * $Revision: 1.30 $ * * This is free software. You are permitted to use, * redistribute, and modify it as specified in the file "COPYING". @@ -88,7 +88,7 @@ inline uchar_t MyIn_Byte(ushort_t port) -int IO_Read(ushort_t port, void * dst, uint_t length, uint_t io_width) { +int IO_Read(ushort_t port, void * dst, uint_t length) { uchar_t * iter = dst; uint_t i; @@ -102,7 +102,7 @@ int IO_Read(ushort_t port, void * dst, uint_t length, uint_t io_width) { -int IO_Write(ushort_t port, void * src, uint_t length, uint_t io_width) { +int IO_Write(ushort_t port, void * src, uint_t length) { uchar_t * iter = src; uint_t i; @@ -117,9 +117,24 @@ int IO_Write(ushort_t port, void * src, uint_t length, uint_t io_width) { -int IO_Write_to_Serial(ushort_t port, void * src, uint_t length, uint_t io_width) { - SerialPrint("Output from Guest on port %d (0x%x) Length=%d\n", port, port, length); - SerialMemDump(src, length); +int IO_Write_to_Serial(ushort_t port, void * src, uint_t length) { + PrintBoth("Output from Guest on port %d (0x%x) Length=%d\n", port, port, length); + switch (length) { + + case 1: + PrintBoth(">0x%.2x\n", *(char*)src); + break; + case 2: + PrintBoth(">0x%.4x\n", *(ushort_t*)src); + break; + case 4: + PrintBoth(">0x%.8x\n", *(uint_t*)src); + break; + default: + break; + } + + // SerialMemDump(src, length); return length; }