# Xen hypervisor device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm_

> Device-tree binding reference for Xen hypervisor device tree bindings.

Xen ARM virtual platforms shall have a top-level "hypervisor" node with
the following properties:

```text
- 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 the regions in memory
  where the special resources should be mapped to, using an HYPERVISOR\_memory\_op
  hypercall.
  Region 0 is reserved for mapping grant table, it must be always present.
  The memory region is large enough to map the whole grant table (it is larger
  or equal to gnttab\_max\_grant\_frames()).
  Regions 1...N are extended regions (unused address space) for mapping foreign
  GFNs and grants, they might be absent if there is nothing to expose.

- interrupts: the interrupt used by Xen to inject event notifications.
  A GIC node is also required.

To support UEFI on Xen ARM virtual platforms, Xen populates the FDT "uefi" node
under /hypervisor with following parameters:

---

## Name                      | Size   | Description

```text
xen,uefi-system-table     | 64-bit | Guest physical address of the UEFI System
```

## |	   | Table.

```text
xen,uefi-mmap-start       | 64-bit | Guest physical address of the UEFI memory
```

## |	   | map.

```text
xen,uefi-mmap-size        | 32-bit | Size in bytes of the UEFI memory map
```

## |        | pointed to in previous entry.

```text
xen,uefi-mmap-desc-size   | 32-bit | Size in bytes of each entry in the UEFI
```

## |        | memory map.

## xen,uefi-mmap-desc-ver    | 32-bit | Version of the mmap descriptor format.

Example (assuming #address-cells = &lt;2&gt; and #size-cells = &lt;2&gt;):

```dts
hypervisor {
	compatible = "xen,xen-4.3", "xen,xen";
	reg = <0 0xb0000000 0 0x20000>;
	interrupts = <1 15 0xf08>;
	uefi {
		xen,uefi-system-table = <0xXXXXXXXX>;
		xen,uefi-mmap-start = <0xXXXXXXXX>;
		xen,uefi-mmap-size = <0xXXXXXXXX>;
		xen,uefi-mmap-desc-size = <0xXXXXXXXX>;
		xen,uefi-mmap-desc-ver = <0xXXXXXXXX>;
        };
};
```

The format and meaning of the "xen,uefi-\*" parameters are similar to those in
[Documentation/arch/arm/uefi.rst](</kernel/hardware/arch/arm/uefi.md>), which are provided by the regular UEFI stub. However
they differ because they are provided by the Xen hypervisor, together with a set
of UEFI runtime services implemented via hypercalls, see
http://xenbits.xen.org/docs/unstable/hypercall/x86\_64/include,public,platform.h.html.
