|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [ImageBuilder][PATCH v3 1/2] uboot-script-gen: Add XEN_STATIC_HEAP
From: jiamei Xie <jiamei.xie@xxxxxxx>
Add a new config parameter to configure Xen static heap.
XEN_STATIC_HEAP="baseaddr1 size1 ... baseaddrN sizeN"
if specified, indicates the host physical address regions
[baseaddr, baseaddr + size) to be reserved as Xen static heap.
For instance, XEN_STATIC_HEAP="0x50000000 0x30000000", if specified,
indicates the host memory region starting from paddr 0x50000000
with a size of 0x30000000 to be reserved as static heap.
Signed-off-by: jiamei Xie <jiamei.xie@xxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
Changes from v1 to v2:
- add Reviewed-by and Acked-by
Changes from v1:
- Rename STATIC_HEAP to XEN_STATIC_HEAP and move it right after
XEN_CMD documentation.
- Use split_value function instead of opencoding it.
---
README.md | 4 ++++
scripts/uboot-script-gen | 20 ++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/README.md b/README.md
index 814a004..78b83f1 100644
--- a/README.md
+++ b/README.md
@@ -97,6 +97,10 @@ Where:
- XEN_CMD specifies the command line arguments used for Xen. If not
set, the default one will be used.
+- XEN_STATIC_HEAP="baseaddr1 size1 ... baseaddrN sizeN"
+ if specified, indicates the host physical address regions
+ [baseaddr, baseaddr + size) to be reserved as Xen static heap.
+
- PASSTHROUGH_DTS_REPO specifies the git repository and/or the directory
which contains the partial device trees. This is optional. However, if
this is specified, then DOMU_PASSTHROUGH_PATHS[number] need to be specified.
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index f07e334..cca3e59 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -189,6 +189,21 @@ function add_device_tree_static_mem()
dt_set "$path" "xen,static-mem" "hex" "${cells[*]}"
}
+function add_device_tree_xen_static_heap()
+{
+ local path=$1
+ local regions=$2
+ local cells=()
+ local val
+
+ for val in ${regions[@]}
+ do
+ cells+=("$(split_value $val)")
+ done
+
+ dt_set "$path" "xen,static-heap" "hex" "${cells[*]}"
+}
+
function add_device_tree_cpupools()
{
local cpu
@@ -344,6 +359,11 @@ function xen_device_tree_editing()
then
add_device_tree_cpupools
fi
+
+ if test "${XEN_STATIC_HEAP}"
+ then
+ add_device_tree_xen_static_heap "/chosen" "${XEN_STATIC_HEAP}"
+ fi
}
function linux_device_tree_editing()
--
2.25.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |