On 03/08/2017 07:55 AM, Jan Kiszka wrote:
> On 2017-03-08 15:57, Claudio Scordino wrote:
>> This patch fixes a regression introduced by commit
>> 2a7c8733b6a3d47fb507eca4de5a33433199424c
>> which by default does not initialize the UART divider to 0x1
>> on the x86 platform.
Isn't this intended behaviour? I remember that we had discussions on
that on the list, and according to the commit message,

...
If the divider is zero, the hypervisor will skip UART initialisation and
assume that the UART was already initialised by Linux.
...

All we do on x86 is to skip those four instructions if the divider is zero:
uart_reg_out(UART_LCR, UART_LCR_DLAB);
uart_reg_out(UART_DLL, divider & 0xff);
uart_reg_out(UART_DLM, (divider >> 8) & 0xff);
uart_reg_out(UART_LCR, UART_LCR_8N1);

which should in deed be done by Linux before, if this is what we define
default behaviour.
>>
>> Signed-off-by: Claudio Scordino <[email protected]>
>> Signed-off-by: Michele Pes <[email protected]>
>> ---
>>  tools/root-cell-config.c.tmpl | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/tools/root-cell-config.c.tmpl b/tools/root-cell-config.c.tmpl
>> index 11956b7..a971f56 100644
>> --- a/tools/root-cell-config.c.tmpl
>> +++ b/tools/root-cell-config.c.tmpl
>> @@ -62,6 +62,7 @@ struct {
>>              },
>>              .debug_console = {
>>                      .address = 0x3f8,
>> +                    .divider = 0x1,
I'd rather insert this as a comment.
>>                      .flags = JAILHOUSE_CON1_TYPE_UART_X86 |
>>                               JAILHOUSE_CON1_FLAG_PIO |
>>                               JAILHOUSE_CON2_TYPE_ROOTPAGE,
>>
> 
> We probably want this fixed for the in-tree x86 configs as well, namely
> 
> configs/f2a88xm-hd3.c
> configs/imb-a180.c
> configs/qemu-vm.c
Just tested qemu, on my VM everything works fine.

  Ralf
> 
> Ralf, am I right?
> 
> Jan
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to