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

Re: sbsa_uart domU baremetal driver





On 14/10/2020 23:28, Angelo Ruocco wrote:
Hi,

Hello,


I'm trying to write a baremetal domU application on arm64 and I'm
having some troubles making it print on the vpl011 serial.

The application works fine if I use the UART driver of the board I'm
using (XUARTPS on Xilinx ZCU104), but as soon as I try to use the
virtual console, then I get no output at all. I'm using a custom pl011
driver that works on other (real) consoles. I'm not trying to have it
read chars, just print them, so the driver is quite simple.

If I try to do something 'wrong' with the virtual UART, I have Xen
complaining of unaligned access to the vpl011 driver, so Xen is able
to see that I'm trying to use the console. But as soon as I correctly
(I think) write to the data output region of the driver, my
application writes exactly 369 characters before crashing or freezing.
Note that I don't see those bytes, I just know that the `putchar`
function gets called 369 times, even when I try to print more than 369
characters.

My understanding is that the under the hood vpl011 uses the ring
buffer, which by default should be emptied at max every time it gets
half-full, so I'm not sure why I'm allowed to write only 369 bytes.

The memory region mapped for the uart is uncached, so it shouldn't be
a problem of dirty cache.

I'm afraid I'm missing something stupid, so here's my setup:

Xen version 4.13
on the .cfg file I have `vuart = "sbsa_uart"`
I start the domU with `xl create -c baremetal.cfg`

There are multiple console available to the guest (e.g. PV, SBSA). The option -c will open the console



There I expect to see my output, but nothing. Also `xl dmesg` doesn't
show useful information.
Any ideas?

Thanks,
Angelo


--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.