summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-28 18:58:02 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-28 18:58:02 +0000
commite9396bded98ae7e83129e9c1e9caa98afea7eaf5 (patch)
tree70006d238794bbae796b693db8cc4e28d59b1ef8
parent279e694bc7bae106dc1178e7fbb60dfb832396e7 (diff)
downloadqemu-e9396bded98ae7e83129e9c1e9caa98afea7eaf5.zip
vmware backdoor interface fix (Chris Lalancette)
VMWare backdoor interface should work with IN/OUT port ops, but currently only IN is supported. BOCHS bios uses OUT to query UUID. The patch adds OUT support. Signed-off-by: Chris Lalancette <clalance@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4957 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--hw/vmport.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/vmport.c b/hw/vmport.c
index 3655ad12d7..ebfa921439 100644
--- a/hw/vmport.c
+++ b/hw/vmport.c
@@ -72,6 +72,13 @@ static uint32_t vmport_ioport_read(void *opaque, uint32_t addr)
return s->func[command](s->opaque[command], addr);
}
+static void vmport_ioport_write(void *opaque, uint32_t addr, uint32_t val)
+{
+ CPUState *env = cpu_single_env;
+
+ env->regs[R_EAX] = vmport_ioport_read(opaque, addr);
+}
+
static uint32_t vmport_cmd_get_version(void *opaque, uint32_t addr)
{
CPUState *env = cpu_single_env;
@@ -89,6 +96,7 @@ static uint32_t vmport_cmd_ram_size(void *opaque, uint32_t addr)
void vmport_init(void)
{
register_ioport_read(0x5658, 1, 4, vmport_ioport_read, &port_state);
+ register_ioport_write(0x5658, 1, 4, vmport_ioport_write, &port_state);
/* Register some generic port commands */
vmport_register(VMPORT_CMD_GETVERSION, vmport_cmd_get_version, NULL);