refactor: build option for interrupt ids
Make HF_NUM_INTIDS a build option for platform with large number of
interrupts. For large systems with GIC extensions that allow > 4K
interrupts, 64 interrupts is inadequate. An example partition that may
require more than 64 interrupts is a RAS SP that handles many interrupts
from many sources on a large server type SoC.
Note that the limit of max number of interrupt IDs is set to 5120 based
on the latest GIC specs for extended SPI range (not using ITS).
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: Ic3b1741b61a4a796da36f505357af86949b249e6
diff --git a/build/BUILD.gn b/build/BUILD.gn
index 73a73e1..50e80f7 100644
--- a/build/BUILD.gn
+++ b/build/BUILD.gn
@@ -44,6 +44,11 @@
plat_partition_max_streams_per_device < 256,
"Maximum streams per device regions must be between 1 and 255: current = ${plat_partition_max_streams_per_device}")
+ assert(
+ plat_num_virtual_interrupts_ids > 0 &&
+ plat_num_virtual_interrupts_ids < 5120,
+ "Maximum virtual interrupt ids per vcpu must be between 1 and 5119: current = ${plat_num_virtual_interrupts_ids}")
+
include_dirs = [
"//inc",
"//inc/vmapi",
@@ -63,5 +68,6 @@
"PARTITION_MAX_DEVICE_REGIONS=${plat_partition_max_device_regions}",
"PARTITION_MAX_INTERRUPTS_PER_DEVICE=${plat_partition_max_intr_per_device}",
"PARTITION_MAX_STREAMS_PER_DEVICE=${plat_partition_max_streams_per_device}",
+ "HF_NUM_INTIDS=${plat_num_virtual_interrupts_ids}",
]
}
diff --git a/build/toolchain/platform.gni b/build/toolchain/platform.gni
index adcfb68..cfc06a0 100644
--- a/build/toolchain/platform.gni
+++ b/build/toolchain/platform.gni
@@ -44,4 +44,7 @@
# the maximum number of streams allowed per device, per partition, in the partition manifest
plat_partition_max_streams_per_device = 4
+
+ # The number of virtual interrupt IDs which are supported
+ plat_num_virtual_interrupts_ids = 64
}