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
This commit is contained in:
parent
279e694bc7
commit
e9396bded9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user