X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fide.c;h=8ff8ef756c5038e7fb9af33b5b94b2c2b4ed0ba5;hb=b187d8db6f451cd5cea5452b284c3282dd5a4b67;hp=0af219821feb4daa7448b4236e05e2939b584df6;hpb=72420d58d18ec71d4777d029daaf0c6a1c820b32;p=palacios.releases.git diff --git a/palacios/src/devices/ide.c b/palacios/src/devices/ide.c index 0af2198..8ff8ef7 100644 --- a/palacios/src/devices/ide.c +++ b/palacios/src/devices/ide.c @@ -956,6 +956,17 @@ static int write_cmd_port(struct guest_info * core, ushort_t port, void * src, u break; } + + case 0x08: // Reset Device + drive_reset(drive); + channel->error_reg.val = 0x01; + channel->status.busy = 0; + channel->status.ready = 1; + channel->status.seek_complete = 1; + channel->status.write_fault = 0; + channel->status.error = 0; + break; + case 0xc4: // read multiple sectors drive->hd_state.cur_sector_num = drive->hd_state.mult_sector_num; default: @@ -1430,20 +1441,18 @@ static int init_ide_state(struct ide_internal * ide) { -static int ide_free(struct vm_device * dev) { - // unhook io ports.... - +static int ide_free(struct ide_internal * ide) { // deregister from PCI? - + V3_Free(ide); return 0; } static struct v3_device_ops dev_ops = { - .free = ide_free, + .free = (int (*)(void *))ide_free, };