X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fbochs_debug.c;h=a240988b95de2ce245b227a12b480ddc4ceb3f40;hb=0956466aad020813d1e470df366d552fdabab2a9;hp=12f22c9d8ca8afe906c91da6c480d65b0f84e263;hpb=37c18b2c2335a41c68c2f0b779fd2b7d51ab216d;p=palacios.git diff --git a/palacios/src/devices/bochs_debug.c b/palacios/src/devices/bochs_debug.c index 12f22c9..a240988 100644 --- a/palacios/src/devices/bochs_debug.c +++ b/palacios/src/devices/bochs_debug.c @@ -43,7 +43,7 @@ struct debug_state { uint_t cons_offset; }; -static int handle_info_write(ushort_t port, void * src, uint_t length, struct vm_device * dev) { +static int handle_info_write(struct guest_info * core, ushort_t port, void * src, uint_t length, struct vm_device * dev) { struct debug_state * state = (struct debug_state *)dev->private_data; state->info_buf[state->info_offset++] = *(char*)src; @@ -58,7 +58,7 @@ static int handle_info_write(ushort_t port, void * src, uint_t length, struct vm } -static int handle_debug_write(ushort_t port, void * src, uint_t length, struct vm_device * dev) { +static int handle_debug_write(struct guest_info * core, ushort_t port, void * src, uint_t length, struct vm_device * dev) { struct debug_state * state = (struct debug_state *)dev->private_data; state->debug_buf[state->debug_offset++] = *(char*)src; @@ -73,7 +73,7 @@ static int handle_debug_write(ushort_t port, void * src, uint_t length, struct v } -static int handle_console_write(ushort_t port, void * src, uint_t length, struct vm_device * dev) { +static int handle_console_write(struct guest_info * core, ushort_t port, void * src, uint_t length, struct vm_device * dev) { struct debug_state * state = (struct debug_state *)dev->private_data; state->cons_buf[state->cons_offset++] = *(char*)src; @@ -88,7 +88,7 @@ static int handle_console_write(ushort_t port, void * src, uint_t length, struct } -static int handle_gen_write(ushort_t port, void * src, uint_t length, struct vm_device * dev) { +static int handle_gen_write(struct guest_info * core, ushort_t port, void * src, uint_t length, struct vm_device * dev) { switch (length) { case 1: @@ -134,18 +134,19 @@ static struct v3_device_ops dev_ops = { -static int debug_init(struct guest_info * vm, void * cfg_data) { - struct debug_state * state = NULL; +static int debug_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { + struct debug_state * state = NULL; + char * dev_id = v3_cfg_val(cfg, "ID"); state = (struct debug_state *)V3_Malloc(sizeof(struct debug_state)); V3_ASSERT(state != NULL); PrintDebug("Creating Bochs Debug Device\n"); - struct vm_device * dev = v3_allocate_device("BOCHS_DEBUG", &dev_ops, state); + struct vm_device * dev = v3_allocate_device(dev_id, &dev_ops, state); if (v3_attach_device(vm, dev) == -1) { - PrintError("Could not attach device %s\n", "BOCHS_DEBUG"); + PrintError("Could not attach device %s\n", dev_id); return -1; }