On 7/23/19 5:35 PM, Jan Kiszka wrote:
> On 23.07.19 17:19, Jan Kiszka wrote:
>> On 23.07.19 16:50, Ralf Ramsauer wrote:
>>> Two bad news: Linux's 8250 driver needs patching. At least we need some
>>> parameter like 8250.platform=disable to disable the probing for platform
>>> uarts. Why?
>>>
>>> ATM, we must specify 8250.nr_uarts. Otherwise the kernel will touch
>>> restricted ports. It does touch those ports, as it lacks ACPI platform
>>> information and assumes 'any' platform UART is present.
>>
>> Yes, nr_uarts is the patch-free approach for now. I once had a hack that
>> propagated the information "this is Jailhouse, you may not find platform 
>> UARTs"
>> to the driver. But that was a hack, so I didn't propose that upstream along 
>> with
>> the other x86 changes. Plus, there are cases where we do want to use a 
>> platform
>> uart in the non-root cell.
>>
>>>
>>> I.e.:
>>>   8250.nr_uarts=1 only touches 0x3f8
>>>   8250.nr_uarts=2 touches 0x3f8 and 0x2f8
>>>   8250.nr_uarts=3 touches 0x3f8, 0x2f8, 0x3e9 (?)
>>>
>>> In addition to that I have a PCI device. And Linux won't probe it until
>>> it probed all other PIO ports. If I specify 8250.nr_uarts=1 (as I do
>>> want to restrict access to 0x2f8), it will never probe the PCI device.
>>>
>>> So at the moment, the hack is to set 8250.nr_uarts=4 and permit access
>>> to all ports. Yikes. At least I now know that the PCI device basically
>>> works, but still, this needs to be patched.
>>>
>>
>> OK, that was probably not yet addressed. We once had a setup with UARTs on a 
>> PCI
>> card, but that machine also had no platform UARTs IIRC.
>>
>> If there no other way to tell Linux the number of platform UARTs, we will 
>> have
>> to introduce one, for the sake of this use case already.
>>
> 
> Maybe we can do something like arch/x86/platform/ce4100/ce4100.c to "tune" the

Thanks for the pointer.

> platform UARTs (ce4100_serial_fixup). But it still takes an extension of the
> boot protocol to provide Linux with the information about available platform 
> UARTs.

Hm. We do have the comm region... It will hold the config's struct
jailhouse_console. We could use this in combination with
serial8250_set_isa_configurator.

This won't enable all platform uarts, but with this we could
automatically enable at least one platform uart + hypervisor debug
output. This should be sufficient for most cases.

  Ralf

> 
> 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/11ec656b-e07f-f6cc-12b4-87e20085924f%40oth-regensburg.de.

Reply via email to