mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-23 22:18:17 +00:00
config_tools: gracefully skip invalid or ignored BARs
The board configuration generator assumes all PCI BARs are programmed when the board inspector runs, which is sometimes not the case. Unprogrammed BARs will be reported using plain texts wrapped by angle brackets in the output of `lspci`. This patch gracefully skips the unprogrammed BARs and continues when parsing the output of `lspci`, in order to avoid build-time failures due to unprogrammed BARs. Tracked-On: #6355 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
b5b22bf98b
commit
5118d67508
@ -435,7 +435,11 @@ def parser_pci():
|
||||
if "size=" not in line:
|
||||
continue
|
||||
|
||||
bar_addr = int(get_value_after_str(line, "at"), 16)
|
||||
try:
|
||||
bar_addr = int(get_value_after_str(line, "at"), 16)
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
bar_num = line.split()[1].strip(':')
|
||||
if bar_addr >= common.SIZE_4G or bar_addr < common.SIZE_2G:
|
||||
if not tmp_bar_attr.remappable:
|
||||
|
Loading…
Reference in New Issue
Block a user