qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 2/2] 8250: Customized base baudrate


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH 2/2] 8250: Customized base baudrate
Date: Mon, 14 Apr 2008 23:34:56 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080226)

andrzej zaborowski wrote:
> On 14/04/2008, Jan Kiszka <address@hidden> wrote:
>> andrzej zaborowski wrote:
>>  > On 13/04/2008, Jan Kiszka <address@hidden> wrote:
>>
>>>>  --- a/hw/omap1.c
>>  >>  +++ b/hw/omap1.c
>>  >>  @@ -1734,7 +1734,8 @@ struct omap_uart_s *omap_uart_init(targe
>>  >>      struct omap_uart_s *s = (struct omap_uart_s *)
>>  >>              qemu_mallocz(sizeof(struct omap_uart_s));
>>  >>      if (chr)
>>  >>  -        s->serial = serial_mm_init(base, 2, irq, chr, 1);
>>  >>  +        s->serial =
>>  >>  +            serial_mm_init(base, 2, irq, omap_clk_getrate(clk)/16, 
>> chr, 1);
>>  >
>>  > Yes, this should be correct.
>>
>> While typing those line I wondered if it is possible and reasonable that
>>  a guest changes this clock rate during runtime? In that case, the
>>  perfect, but probably much more complex solution would be to track those
>>  changes also with the serial emulation...
> 
> Yes, UART1 and UART3 (I think) can switch between 48MHz (dpll) and
> 16MHz clock domains on OMAP1 and the guest has control over this (and
> the characters flow indeed slows down three times when you switch to
> 16MHz on the real hw).  omap_clk.c allows a peripheral to register for
> notifications of rate change for a particular clock. I don't think
> it's worth bothering too much because anything that depends on the
> timing of QEMU will likely have problems anyway.

Well, depends. The baudrate set by the guest is also propagated to the
host tty which is attached to that virtual channel. If that tty bothers
about baudrate, you will have real impact. Besides this, my patch 1/2
makes use of the baudrate to emulate more realistic output (IRQ) rates.

Jan


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]