Hi Ralf,

sorry, I didn't recall the discussion on list.

Using the config currently generated by "jailhouse config create", our
i7 prints junk on the console, unless we manually add such divider.
If this is the intended behavior and we are supposed to add it, then I'm fine.
However, I'm afraid that several newbies could flood the list
complaining that their serial "doesn't work" if we don't properly
document such information.

Many thanks and best regards,

           Claudio

2017-03-08 20:03 GMT+01:00 Ralf Ramsauer <[email protected]>:
> 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
>>



-- 
Claudio Scordino, Ph.D.
Project Manager - Funded research projects

Evidence Srl
Via Carducci 56
56010 S.Giuliano Terme - Pisa - Italy
Phone:  +39 050 99 11 224
Mobile: + 39 393 811 7491
Fax:   +39 050 99 10 812
http://www.evidence.eu.com

VISIT US AT EMBEDDED WORLD 2017 --- Hall 4 Stand 545

-- 
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