Support ACPI MCFG multi tables boards for board_inspector

Some motherboards exposes MCFG1/MCFG2 instead of one ACPI MCFG table,
thus no /sys/firmware/acpi/tables/MCFG exists but MCFG1 and MCFG2.

Read MCFG1 if MCFG doesn't exist.

The same issue report/fix is at https://github.com/intel/pcm/issues/74.

Tracked-On: #8514

Signed-off-by: Xin Zhang <xin.x.zhang@intel.com>
This commit is contained in:
Xin Zhang 2023-09-22 16:17:23 +08:00 committed by acrnsi-robot
parent 5821ffc2f2
commit 443a030cf8

View File

@ -576,6 +576,10 @@ def store_px_data(sysnode, config):
def store_mmcfg_base_data(mmcfg_node, config):
# in case there're MCFG1/MCFG2 instead of MCFG
if not os.path.exists(mmcfg_node):
mmcfg_node += "1"
print("\t/* PCI mmcfg base of MCFG */", file=config)
with open(mmcfg_node, 'rb') as mmcfg:
mmcfg.read(MCFG_OFFSET)