xen/arm: introduce domain on Static Allocation
authorPenny Zheng <penny.zheng@arm.com>
Fri, 10 Sep 2021 02:52:10 +0000 (02:52 +0000)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Mon, 13 Sep 2021 21:10:14 +0000 (14:10 -0700)
commit41c031ff437b66cfac4b120bd7698ca039850690
treeed5d6fb3a6136888bb26ca831e8494351b137cd2
parent904ba3ce2e46e59080dc09676cede5df63b59f20
xen/arm: introduce domain on Static Allocation

Static Allocation refers to system or sub-system(domains) for which memory
areas are pre-defined by configuration using physical address ranges.

Those pre-defined memory, -- Static Memory, as parts of RAM reserved in the
beginning, shall never go to heap allocator or boot allocator for any use.

Memory can be statically allocated to a domain using the property "xen,static-
mem" defined in the domain configuration. The number of cells for the address
and the size must be defined using respectively the properties
"#xen,static-mem-address-cells" and "#xen,static-mem-size-cells".

The property 'memory' is still needed and should match the amount of memory
given to the guest. Currently, it either comes from static memory or lets Xen
allocate from heap. *Mixing* is not supported.

The static memory will be mapped in the guest at the usual guest memory
addresses (GUEST_RAM0_BASE, GUEST_RAM1_BASE) defined by
xen/include/public/arch-arm.h.

This patch introduces this new `xen,static-mem` feature, and also documents
and parses this new attribute at boot time.

This patch also introduces a new field "bool xen_domain" in "struct membank"
to tell whether the memory bank is reserved as the whole hardware resource,
or bind to a xen domain node, through "xen,static-mem"

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
docs/misc/arm/device-tree/booting.txt
xen/arch/arm/bootfdt.c
xen/include/asm-arm/setup.h