board_inspector: generate maximum DRHD devscope count

Add a new field DRHD_MAX_DEVSCOPE_COUNT in board file representing
maximum devscope count in a DMAR structure for statically allocating
drhd_dev_scope array in hypervisor.

Tracked-On: #8494
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Jiaqing Zhao 2024-08-01 08:06:06 +00:00 committed by acrnsi-robot
parent 069afc6519
commit 65f84d6ae6

View File

@ -360,6 +360,7 @@ def write_dmar_data(sysnode, config):
dmar_tbl, dmar_hw_list, dmar_dev_list, sysnode)
print("\t#define DRHD_COUNT {0}U".format(drhd_cnt), file=config)
print("\t#define DRHD_MAX_DEVSCOPE_COUNT {0}U".format(max(dmar_dev_list.dev_scope_cnt_list)), file=config)
print("", file=config)
prev_dev_scope_num = 0
for drhd_hw_i in range(drhd_cnt):