X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2F8259a.c;h=69707b901522115e36efdf0c84d8ac80a8c3719a;hb=d962f2be029772be3f21d9bd206ddf2a9f6a1d20;hp=9bbef1e4ce4689dee24b94fe1af1e8b5c648ee39;hpb=72420d58d18ec71d4777d029daaf0c6a1c820b32;p=palacios-OLD.git diff --git a/palacios/src/devices/8259a.c b/palacios/src/devices/8259a.c index 9bbef1e..69707b9 100644 --- a/palacios/src/devices/8259a.c +++ b/palacios/src/devices/8259a.c @@ -721,8 +721,13 @@ static int write_elcr_port(struct guest_info * core, ushort_t port, void * src, -static int pic_free(struct vm_device * dev) { +static int pic_free(struct pic_internal * state) { + + // unregister intr_controller + // unregister intr router + + V3_Free(state); return 0; } @@ -733,7 +738,7 @@ static int pic_free(struct vm_device * dev) { static struct v3_device_ops dev_ops = { - .free = pic_free, + .free = (int (*)(void *))pic_free, }; @@ -749,11 +754,10 @@ static int pic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { // PIC is only usable in non-multicore environments // just hardcode the core context struct guest_info * core = &(vm->cores[0]); + + state = (struct pic_internal *)V3_Malloc(sizeof(struct pic_internal)); V3_ASSERT(state != NULL); - - state = (struct pic_internal *)V3_Malloc(sizeof(struct pic_internal)); - struct vm_device * dev = v3_add_device(vm, dev_id, &dev_ops, state);