mbox series

[v6,0/4] Introduce static heap

Message ID 20220908110910.17108-1-Henry.Wang@arm.com (mailing list archive)
Headers show
Series Introduce static heap | expand

Message

Henry Wang Sept. 8, 2022, 11:09 a.m. UTC
The static heap, or statically configured heap, refers to parts
of RAM reserved in the beginning for heap. Like the static memory
allocation, such static heap regions are reserved by configuration
in the device tree using physical address ranges.

This feature is useful to run Xen on Arm MPU systems, where only a
finite number of memory protection regions are available. The limited
number of protection regions places requirement on planning the use
of MPU protection regions and one or more MPU protection regions needs
to be reserved only for heap.

The first patch enhances the error handling in processing the dts
chosen node. The second patch introduces the static heap and the
device tree parsing code. The third patch renames xenheap_* to
directmap_* for better readablity. The fourth patch adds the
implementation of the static heap pages handling in boot and heap
allocator for Arm.

Changes from v5 to v6:
- Refine doc.
- Drop duplicated code.
- Add Julien's Reviewed-by.

Henry Wang (4):
  xen/arm: bootfdt: Make process_chosen_node() return int
  docs, xen/arm: Introduce static heap memory
  xen/arm: mm: Rename xenheap_* variable to directmap_*
  xen/arm: Handle static heap pages in boot and heap allocator

 SUPPORT.md                            |   7 ++
 docs/misc/arm/device-tree/booting.txt |  44 ++++++++
 xen/arch/arm/bootfdt.c                |  47 +++++---
 xen/arch/arm/domain_build.c           |   8 +-
 xen/arch/arm/include/asm/config.h     |   2 +-
 xen/arch/arm/include/asm/mm.h         |  31 ++---
 xen/arch/arm/include/asm/setup.h      |  23 +++-
 xen/arch/arm/mm.c                     |  50 +++++----
 xen/arch/arm/setup.c                  | 156 ++++++++++++++++++++------
 9 files changed, 279 insertions(+), 89 deletions(-)

Comments

Julien Grall Sept. 8, 2022, 11:33 a.m. UTC | #1
Hi Henry,

On 08/09/2022 12:09, Henry Wang wrote:
> The static heap, or statically configured heap, refers to parts
> of RAM reserved in the beginning for heap. Like the static memory
> allocation, such static heap regions are reserved by configuration
> in the device tree using physical address ranges.
> 
> This feature is useful to run Xen on Arm MPU systems, where only a
> finite number of memory protection regions are available. The limited
> number of protection regions places requirement on planning the use
> of MPU protection regions and one or more MPU protection regions needs
> to be reserved only for heap.
> 
> The first patch enhances the error handling in processing the dts
> chosen node. The second patch introduces the static heap and the
> device tree parsing code. The third patch renames xenheap_* to
> directmap_* for better readablity. The fourth patch adds the
> implementation of the static heap pages handling in boot and heap
> allocator for Arm.
> 
> Changes from v5 to v6:
> - Refine doc.
> - Drop duplicated code.
> - Add Julien's Reviewed-by.
> 
> Henry Wang (4):
>    xen/arm: bootfdt: Make process_chosen_node() return int
>    docs, xen/arm: Introduce static heap memory
>    xen/arm: mm: Rename xenheap_* variable to directmap_*
>    xen/arm: Handle static heap pages in boot and heap allocator

I have now committed the series. This required a small tweak in 
booting.txt because I merged it after Rahul event channel's series which 
also modifies booting.txt.

Cheers,