On 24.06.19 22:55, Wayne wrote:
Hi Jan,

I have a couple more questions on serial device (UART) allocation.  If I have two serial devices, ttyS0 (IRQ4 w/address 0x3f8) and ttyS1(IRQ3 w/address 0x2f8).  Is the setup below the correct way to allocate ttyS0 to the root linux and the ttyS1 to a non-root linux guest?

// .irq chips array in the root config
.irqchips = {
{
.address = 0xfec00000,
.id = 0x1f0ff,
.pin_bitmap = {
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
},
},

//.irq chips array in the guest config
.irqchips = {
{
.address = 0xfec00000,
.id = 0x1f0ff,
.pin_bitmap = { 0x00008 }, /*remap ttyS1 to the linux guest, root keeps ttyS0 */
},

These look good.


//.pio_bitmap root (keep ttyS0, lose ttyS1)
.pio_bitmap = {
[ 0x2f8/8 ...  0x2ff/8] = -1, /* serial2 */
[ 0x3f8/8 ...  0x3ff/8] = 0, /* serial1 */
},

//.pio_bitmap guest (keep ttyS1, lost ttyS0)
.pio_bitmap = {
[ 0x2f8/8 ...  0x2ff/8] = -1, /* serial2 */
[ 0x3f8/8 ...  0x3ff/8] = 0, /* serial1 */
},

These look identical, thus something is wrong.


Also, is there any way to prevent the non-root from trying to probe against ttyS0 at startup and causing a memory access violation?  I'm aware of the 8250.nr_uarts=1, but it seems to default to enumerating ttyS0.

I don't recall details, but the x86 platform is way less flexible in configuring resources. I would recommend configuring the root cell to step away from port 0 (setserial) and use that with the non-root cell.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

--
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/d61ddf73-8872-23f5-23e2-06a3401aa490%40siemens.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to