[Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-03 Thread Denis Obrezkov
Hello, I am trying to run xen and I have a problem: https://pastebin.com/U0gch9us on line 190-193 So, it seems that Linux can't discover the irq domaing for crossbar interrupt controller when running in dom0, but it has no problem when running baremetal. Here is the DT log with xen: https://drive

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-05 Thread Iain Hunter
Hi Denis, That is about as far as I got The driver to handle crossbar is https://github.com/torvalds/linux/blob/master/drivers/irqchip/irq-crossbar.c The documentation is https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/arm/omap/crossbar.txt This is a TI specifi

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-05 Thread Denis Obrezkov
Hi Iain, On 7/5/19 10:31 AM, Iain Hunter wrote: > Hi Denis, > That is about as far as I got > > The driver to handle crossbar is > https://github.com/torvalds/linux/blob/master/drivers/irqchip/irq-crossbar.c > The documentation is > https://github.com/torvalds/linux/blob/master/Documentation/

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-05 Thread Denis Obrezkov
So, > I am going to try to expose the whole crossbar to the dom0 by mapping it > into dom0 and after that to unmap it and restrict the use of the control > register via register_mmio_handler. Don't know whether this will work. > I tried and write now now visible progress: --- a/xen/arch/arm/pla

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-06 Thread Denis Obrezkov
Hi, On 7/5/19 11:47 PM, Denis Obrezkov wrote: > So, > > >> I am going to try to expose the whole crossbar to the dom0 by mapping it >> into dom0 and after that to unmap it and restrict the use of the control >> register via register_mmio_handler. Don't know whether this will work. >> > > I trie

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-06 Thread Julien Grall
Hi Denis, On 7/6/19 11:19 AM, Denis Obrezkov wrote: On 7/5/19 11:47 PM, Denis Obrezkov wrote: So, I am going to try to expose the whole crossbar to the dom0 by mapping it into dom0 and after that to unmap it and restrict the use of the control register via register_mmio_handler. Don't know w

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-06 Thread Denis Obrezkov
Hi, On 7/6/19 12:56 PM, Julien Grall wrote: > Hi Denis, > > On 7/6/19 11:19 AM, Denis Obrezkov wrote: >> On 7/5/19 11:47 PM, Denis Obrezkov wrote: >>> So, >>> >>> I am going to try to expose the whole crossbar to the dom0 by mapping it into dom0 and after that to unmap it and restr

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-06 Thread Julien Grall
On 06/07/2019 13:20, Denis Obrezkov wrote: > sorry for confusing you, I share a bit outdated log but only to show the > output of xen about device tree. We already overcome that error about > omap specific mapping (applied one of Iain's patches). I actually misread the first e-mail and didn't no

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-06 Thread Denis Obrezkov
Hi, On 7/6/19 5:57 PM, Julien Grall wrote: > > > rc = unmap_mmio_regions(d, _gfn(pfn_start), > pfn_end + pfn_start + 1, > _mfn(pfn_start)); > > You are not computing correctly the number of pages. I think you want > "pfn_end - pfn

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-06 Thread Julien Grall
On 06/07/2019 17:31, Denis Obrezkov wrote: > Hi, Hi Denis, > > On 7/6/19 5:57 PM, Julien Grall wrote: >> > >> >> rc = unmap_mmio_regions(d, _gfn(pfn_start), >> pfn_end + pfn_start + 1, >> _mfn(pfn_start)); >> >> You are not com

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-06 Thread Denis Obrezkov
>> Ok, I changed it and was able to boot to the previous error. I think a >> logical next step would be to set up the uart somehow? > > Do you mean the UART used by Xen? Yes, to be able to switch between xen and dom0, to download a produced dt for dom0 for example. > >>> >>> But this feels weird

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-06 Thread Julien Grall
Hi Denis, On 7/6/19 5:50 PM, Denis Obrezkov wrote: Ok, I changed it and was able to boot to the previous error. I think a logical next step would be to set up the uart somehow? Do you mean the UART used by Xen? Yes, to be able to switch between xen and dom0, to download a produced dt for dom0

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-06 Thread Denis Obrezkov
Hi, On 7/6/19 7:37 PM, Julien Grall wrote: > > Yes it would be sensible to try to implement a crossbar driver in Xen > and test with the UART. Looking at the driver in Linux, this should not > be too difficult. I don't understand why xen doesn't react on triple Ctrl+a. It probably means that UAR

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-06 Thread Julien Grall
On 06/07/2019 18:55, Denis Obrezkov wrote: > Hi, > > On 7/6/19 7:37 PM, Julien Grall wrote: > >> >> Yes it would be sensible to try to implement a crossbar driver in Xen >> and test with the UART. Looking at the driver in Linux, this should not >> be too difficult. > I don't understand why xen

Re: [Xen-devel] [GSOC-2019] Problem with initializing crossbar on bb-x15 in dom0

2019-07-08 Thread Stefano Stabellini
On Sat, 6 Jul 2019, Julien Grall wrote: > On 06/07/2019 18:55, Denis Obrezkov wrote: > > Hi, > > > > On 7/6/19 7:37 PM, Julien Grall wrote: > > > >> > >> Yes it would be sensible to try to implement a crossbar driver in Xen > >> and test with the UART. Looking at the driver in Linux, this should