xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"linaro-dev@lists.linaro.org" <linaro-dev@lists.linaro.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Tim (Xen.org)" <tim@xen.org>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	David Vrabel <david.vrabel@citrix.com>,
	Dave Martin <dave.martin@linaro.org>
Subject: Re: [PATCH v4 06/24] docs: Xen ARM DT bindings
Date: Mon, 17 Sep 2012 08:33:06 -0500	[thread overview]
Message-ID: <50572692.1090805@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1209141514590.29232@kaball.uk.xensource.com>

On 09/14/2012 09:26 AM, Stefano Stabellini wrote:
> On Fri, 14 Sep 2012, Konrad Rzeszutek Wilk wrote:
>> On Fri, Sep 14, 2012 at 12:13:08PM +0100, Stefano Stabellini wrote:
>>> Add a doc to describe the Xen ARM device tree bindings
>>>
>>>
>>> Changes in v4:
>>>
>>> - "xen,xen" should be last as it is less specific;
>>> - update reg property using 2 address-cells and 2 size-cells.
>>>
>>>
>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>> CC: devicetree-discuss@lists.ozlabs.org
>>> CC: David Vrabel <david.vrabel@citrix.com>
>>> CC: Rob Herring <robherring2@gmail.com>
>>> CC: Dave Martin <dave.martin@linaro.org>
>>> ---
>>>  Documentation/devicetree/bindings/arm/xen.txt |   22 ++++++++++++++++++++++
>>>  1 files changed, 22 insertions(+), 0 deletions(-)
>>>  create mode 100644 Documentation/devicetree/bindings/arm/xen.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/arm/xen.txt b/Documentation/devicetree/bindings/arm/xen.txt
>>> new file mode 100644
>>> index 0000000..1f8f7d4
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/arm/xen.txt
>>> @@ -0,0 +1,22 @@
>>> +* Xen hypervisor device tree bindings
>>> +
>>> +Xen ARM virtual platforms shall have the following properties:
>>> +

State that they are part of top-level "hypervisor" node.

>>> +- compatible:
>>> +	compatible = "xen,xen-<version>", "xen,xen";
>>> +  where <version> is the version of the Xen ABI of the platform.
>>> +
>>> +- reg: specifies the base physical address and size of a region in
>>> +  memory where the grant table should be mapped to, using an
>>> +  HYPERVISOR_memory_op hypercall. 
>>> +
>>> +- interrupts: the interrupt used by Xen to inject event notifications.
>>
>> Its singular here.. but in the example its plurar. What if you use
>> multiple of the same number ("16 0xf")?
> 
> The "interrupts" property in the example below is a standard property to
> describe interrupts. We just happen to declare only one interrupt.
> 
> From the device tree point of view it would be possible to declare more
> than one interrupt here, but Xen only supports one really.
> 
> Regarding the three cells used in the example (<1 15 0xf08>), they have
> a specific meaning in the GIC context:
> 
> """
>   The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI
>   interrupts.
> 
>   The 2nd cell contains the interrupt number for the interrupt type.
>   SPI interrupts are in the range [0-987].  PPI interrupts are in the
>   range [0-15].
> 
>   The 3rd cell is the flags, encoded as follows:
> 	bits[3:0] trigger type and level flags.
> 		1 = low-to-high edge triggered
> 		2 = high-to-low edge triggered
> 		4 = active high level-sensitive
> 		8 = active low level-sensitive
> 	bits[15:8] PPI interrupt cpu mask.  Each bit corresponds to each of
> 	the 8 possible cpus attached to the GIC.  A bit set to '1' indicated
> 	the interrupt is wired to that CPU.  Only valid for PPI interrupts.
> """
> 
> So <1 15 0xf08> means the last PPI.

Since it is a PPI, it is handled differently than a normal interrupt.
That is fine, but you should somehow state that a GIC node is also required.

> 
>>> +
>>> +
>>> +Example:
>>> +
>>> +hypervisor {
>>> +	compatible = "xen,xen-4.3", "xen,xen";
>>> +	reg = <0 0xb0000000 0 0x20000>;
>>
>> So two grant tables?
>>
>> Hm, physical address is zero, and the size is 0xbignumber?
>> Or is the '0' denotating a seperator of arguments, so it is
>> 0xb000.. for physical address and 0x20000 for size?
> 
> from http://devicetree.org/Device_Tree_Usage:
> 
> "Each addressable device gets a reg which is a list of tuples in the
> form reg = <address1 length1 [address2 length2] [address3 length3] ...
> Each tuple represents an address range used by the device. Each address
> value is a list of one or more 32 bit integers called cells. Similarly,
> the length value can either be a list of cells, or empty."
> 
> In this case the address is: [0 0xb0000000], that means
> 0x00000000b0000000, and the length is [0 0x20000], that means
> 0x0000000000020000.

But the size depends on #size-cells and #address-cells. I would expect
those to be 1 for a 32-bit guest.

Rob

  reply	other threads:[~2012-09-17 13:33 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 11:12 [PATCH v4 00/24] Introduce Xen support on ARM (based on 3.6-rc5) Stefano Stabellini
2012-09-14 11:13 ` [PATCH v4 11/24] xen: do not compile manage, balloon, pci, acpi, pcpu and cpu_hotplug on ARM Stefano Stabellini
     [not found] ` <alpine.DEB.2.02.1209141145150.29232-7Z66fg9igcxYtxbxJUhB2Dgeux46jI+i@public.gmane.org>
2012-09-14 11:13   ` [PATCH v4 01/24] arm: initial Xen support Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 02/24] xen/arm: hypercalls Stefano Stabellini
     [not found]     ` <1347621207-11294-2-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 12:57       ` Konrad Rzeszutek Wilk
2012-09-14 13:45       ` Marc Zyngier
     [not found]         ` <50533500.2020606-5wv7dgnIgG8@public.gmane.org>
2012-09-14 14:02           ` Stefano Stabellini
     [not found]             ` <alpine.DEB.2.02.1209141458340.29232-7Z66fg9igcxYtxbxJUhB2Dgeux46jI+i@public.gmane.org>
2012-09-14 14:05               ` Marc Zyngier
2012-09-14 11:13   ` [PATCH v4 03/24] xen/arm: page.h definitions Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 04/24] xen/arm: sync_bitops Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 05/24] xen/arm: empty implementation of grant_table arch specific functions Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 06/24] docs: Xen ARM DT bindings Stefano Stabellini
     [not found]     ` <1347621207-11294-6-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 13:01       ` Konrad Rzeszutek Wilk
     [not found]         ` <20120914130151.GH25249-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2012-09-14 14:26           ` Stefano Stabellini
2012-09-17 13:33             ` Rob Herring [this message]
     [not found]               ` <50572692.1090805-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-09-17 14:12                 ` Stefano Stabellini
2012-09-18 14:50                   ` Dave Martin
2012-09-14 11:13   ` [PATCH v4 07/24] xen/arm: Xen detection and shared_info page mapping Stefano Stabellini
     [not found]     ` <1347621207-11294-7-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 13:08       ` Konrad Rzeszutek Wilk
2012-09-14 14:44         ` Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 08/24] xen/arm: Introduce xen_pfn_t for pfn and mfn types Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 09/24] xen/arm: Introduce xen_ulong_t for unsigned long Stefano Stabellini
2012-09-14 13:04     ` Konrad Rzeszutek Wilk
2012-09-14 11:13   ` [PATCH v4 10/24] xen/arm: compile and run xenbus Stefano Stabellini
     [not found]     ` <1347621207-11294-10-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 13:03       ` Konrad Rzeszutek Wilk
2012-09-17 11:05         ` Stefano Stabellini
2012-09-17 13:56           ` Konrad Rzeszutek Wilk
2012-09-17 13:29       ` Konrad Rzeszutek Wilk
2012-09-17 13:45         ` Stefano Stabellini
     [not found]           ` <alpine.DEB.2.02.1209171444060.29232-7Z66fg9igcxYtxbxJUhB2Dgeux46jI+i@public.gmane.org>
2012-09-17 14:06             ` Konrad Rzeszutek Wilk
2012-09-14 11:13   ` [PATCH v4 12/24] xen/arm: introduce CONFIG_XEN on ARM Stefano Stabellini
2012-09-14 18:18     ` Sergei Shtylyov
2012-09-17 10:57       ` Stefano Stabellini
2012-09-17 12:07         ` Sergei Shtylyov
     [not found]           ` <50571289.3040509-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2012-09-17 14:02             ` Konrad Rzeszutek Wilk
     [not found]               ` <20120917140232.GA11996-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2012-09-17 14:16                 ` Stefano Stabellini
2012-09-17 14:05           ` Stefano Stabellini
2012-09-17 14:30             ` Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 13/24] xen/arm: get privilege status Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 14/24] xen/arm: initialize grant_table on ARM Stefano Stabellini
     [not found]     ` <1347621207-11294-14-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 13:10       ` Konrad Rzeszutek Wilk
     [not found]         ` <20120914131033.GM25249-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2012-09-14 14:56           ` Stefano Stabellini
2012-09-14 15:08             ` Ian Campbell
     [not found]               ` <1347635324.24226.229.camel-o4Be2W7LfRlXesXXhkcM7miJhflN2719@public.gmane.org>
2012-09-14 15:29                 ` Stefano Stabellini
     [not found]                   ` <alpine.DEB.2.02.1209141624570.29232-7Z66fg9igcxYtxbxJUhB2Dgeux46jI+i@public.gmane.org>
2012-09-14 15:34                     ` Ian Campbell
2012-09-14 11:13   ` [PATCH v4 15/24] xen/arm: receive Xen events " Stefano Stabellini
     [not found]     ` <1347621207-11294-15-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 13:14       ` Konrad Rzeszutek Wilk
2012-09-14 11:13   ` [PATCH v4 16/24] xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST Stefano Stabellini
     [not found]     ` <1347621207-11294-16-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 14:02       ` Marc Zyngier
2012-09-14 14:13         ` Stefano Stabellini
     [not found]           ` <alpine.DEB.2.02.1209141508130.29232-7Z66fg9igcxYtxbxJUhB2Dgeux46jI+i@public.gmane.org>
2012-09-14 14:20             ` Marc Zyngier
2012-09-14 14:28               ` Stefano Stabellini
     [not found]                 ` <alpine.DEB.2.02.1209141527030.29232-7Z66fg9igcxYtxbxJUhB2Dgeux46jI+i@public.gmane.org>
2012-09-14 14:31                   ` Marc Zyngier
2012-09-14 11:13   ` [PATCH v4 17/24] xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 18/24] xen: allow privcmd for HVM guests Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 19/24] xen/arm: compile blkfront and blkback Stefano Stabellini
     [not found]     ` <1347621207-11294-19-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 13:12       ` Konrad Rzeszutek Wilk
2012-09-14 11:13   ` [PATCH v4 20/24] xen/arm: compile netback Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 21/24] arm/v2m: initialize arch_timers even if v2m_timer is not present Stefano Stabellini
     [not found]     ` <1347621207-11294-21-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 12:27       ` Pawel Moll
2012-09-14 12:48         ` Stefano Stabellini
2012-09-14 13:03           ` Pawel Moll
2013-01-07 17:21           ` Stefano Stabellini
     [not found]             ` <alpine.DEB.2.02.1301071719180.4981-7Z66fg9igcxYtxbxJUhB2Dgeux46jI+i@public.gmane.org>
2013-01-07 17:32               ` Marc Zyngier
2013-01-07 19:21                 ` Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 22/24] xen: missing includes Stefano Stabellini
2012-09-14 11:13   ` [PATCH v4 23/24] xen: update xen_add_to_physmap interface Stefano Stabellini
     [not found]     ` <1347621207-11294-23-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 13:13       ` Konrad Rzeszutek Wilk
2012-09-14 13:21   ` [PATCH v4 00/24] Introduce Xen support on ARM (based on 3.6-rc5) Konrad Rzeszutek Wilk
2012-09-14 13:56     ` Stefano Stabellini
2012-09-14 11:13 ` [PATCH v4 24/24] MAINTAINERS: add myself as Xen ARM maintainer Stefano Stabellini
     [not found]   ` <1347621207-11294-24-git-send-email-stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>
2012-09-14 13:09     ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50572692.1090805@gmail.com \
    --to=robherring2@gmail.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=dave.martin@linaro.org \
    --cc=david.vrabel@citrix.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).