From 4856ac93360f5adcc80cabc242e5bcb571779d18 Mon Sep 17 00:00:00 2001 From: "Yang,Yu-chu" Date: Thu, 7 Oct 2021 19:15:35 -0700 Subject: [PATCH] config-tools: refine xpath to pci host bridge Looks for host bridge with address = '0x0'. Tracked-On: #6024 Signed-off-by: Yang,Yu-chu --- misc/config_tools/static_allocators/bdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/config_tools/static_allocators/bdf.py b/misc/config_tools/static_allocators/bdf.py index 7dd653e2b..a7086dbdb 100644 --- a/misc/config_tools/static_allocators/bdf.py +++ b/misc/config_tools/static_allocators/bdf.py @@ -79,7 +79,7 @@ def get_devs_bdf_native(board_etree): Get all pci devices' bdf in native environment. return: list of pci devices' bdf """ - nodes = board_etree.xpath(f"//bus[@type = 'pci' and @id]/device[@address]") + nodes = board_etree.xpath(f"//bus[@type = 'pci' and @address = '0x0']/device[@address]") dev_list = [] for node in nodes: address = node.get('address')