X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fserial.c;h=71222517d9ae534b1c8a3366b3925adc4a4a9dc9;hb=19380bd81ad18d160a6c30804f91c531b87ac69d;hp=e6adf3c8c6bc8d32146b2512c345e646df6e0e87;hpb=72420d58d18ec71d4777d029daaf0c6a1c820b32;p=palacios.git diff --git a/palacios/src/devices/serial.c b/palacios/src/devices/serial.c index e6adf3c..7122251 100644 --- a/palacios/src/devices/serial.c +++ b/palacios/src/devices/serial.c @@ -700,12 +700,12 @@ static int read_ctrl_port(struct guest_info * core, uint16_t port, void * dst, break; } - case COM1_FIFO_CTRL_PORT: - case COM2_FIFO_CTRL_PORT: - case COM3_FIFO_CTRL_PORT: - case COM4_FIFO_CTRL_PORT: - PrintDebug("UART:read from FCR"); - *val = com_port->fcr.val; + case COM1_IIR_PORT: + case COM2_IIR_PORT: + case COM3_IIR_PORT: + case COM4_IIR_PORT: + PrintDebug("UART:read from IIR"); + *val = com_port->iir.val; break; case COM1_LINE_CTRL_PORT: @@ -834,7 +834,9 @@ static int read_status_port(struct guest_info * core, uint16_t port, void * dst, return length; } -static int serial_free(struct vm_device * dev) { +static int serial_free(struct serial_state * state) { + + V3_Free(state); return 0; } @@ -842,7 +844,7 @@ static int serial_free(struct vm_device * dev) { static struct v3_device_ops dev_ops = { - .free = serial_free, + .free = (int (*)(void *))serial_free, };