fix: increase heap size
Change [1] breaks one TF-A CI test with an out of memory error while
allocating page tables for accessing high address ranges. Provided
hypervisor memory pools are no longer defragmented this issue can now
happen more often and number of heap pages must be increased.
Change [2] is an out of tree change extending the static number of heap
pages for running Trusty on top of Hafnium. This is an opportunity to
incorporate this requirement.
Change [3] requires increasing heap size for each config to accomodate
the change where vCPUs are allocated from the heap as opposed to
statically during build time.
[1] https://review.trustedfirmware.org/c/hafnium/hafnium/+/16649
[2] https://gitlab.arm.com/arm-reference-solutions/build-scripts/-/blob/TC2-2022.08.12/files/hafnium/tc2/project/reference/0001-feat-tc-increase-secure_tc-heap-page-size.patch
[3] https://review.trustedfirmware.org/c/hafnium/hafnium/+/16778
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ida2b1172e8e6a17de6b854646a27d51da1616165
diff --git a/BUILD.gn b/BUILD.gn
index 6b9b383..afd784e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -70,7 +70,7 @@
gicd_base_address = "0x2f000000"
gicr_base_address = "0x2f100000"
gicr_frames = 8
- heap_pages = 60
+ heap_pages = 180
max_cpus = 8
max_vms = 16
branch_protection = "standard"
@@ -97,7 +97,7 @@
gicd_base_address = "0x2f000000"
gicr_base_address = "0x2f100000"
gicr_frames = 8
- heap_pages = 60
+ heap_pages = 180
max_cpus = 8
max_vms = 16
branch_protection = "standard"
@@ -125,7 +125,7 @@
gicd_base_address = "0x2f000000"
gicr_base_address = "0x2f100000"
gicr_frames = 8
- heap_pages = 60
+ heap_pages = 180
max_cpus = 8
max_vms = 16
toolchain_args = {
@@ -146,7 +146,7 @@
gicd_base_address = "0x2f000000"
gicr_base_address = "0x2f100000"
gicr_frames = 8
- heap_pages = 60
+ heap_pages = 180
max_cpus = 8
max_vms = 16
branch_protection = "standard"
@@ -169,7 +169,7 @@
gicd_base_address = "0x08000000"
gicr_base_address = "0x080A0000"
gicr_frames = 8
- heap_pages = 60
+ heap_pages = 180
max_cpus = 8
max_vms = 16
toolchain_args = {
@@ -188,7 +188,7 @@
gicd_base_address = "0x08000000"
gicr_base_address = "0x080A0000"
gicr_frames = 8
- heap_pages = 60
+ heap_pages = 180
max_cpus = 8
max_vms = 16
toolchain_args = {
@@ -205,7 +205,7 @@
console = "//project/reference/rpi:mini_uart"
iommu = "//src/iommu:absent"
gic_version = 2
- heap_pages = 60
+ heap_pages = 180
max_cpus = 4
max_vms = 16
toolchain_args = {
@@ -235,7 +235,7 @@
gicd_base_address = "0x30000000"
gicr_base_address = "0x30080000"
gicr_frames = 8
- heap_pages = 60
+ heap_pages = 180
max_cpus = 8
max_vms = 16
branch_protection = "standard"