Skip to content

Commit bf4d79a

Browse files
finikorgcfriedt
authored andcommitted
pcie: shell: Print 64 bit BARs
Print full 64 bit BARs. Signed-off-by: Andrei Emeltchenko <[email protected]>
1 parent 6c2dca0 commit bf4d79a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/pcie/host/shell.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,21 @@ static void show_bars(const struct shell *shell, pcie_bdf_t bdf)
4646
continue;
4747
}
4848

49-
shell_fprintf(shell, SHELL_NORMAL, " bar %d: %s%s %x\n",
49+
shell_fprintf(shell, SHELL_NORMAL, " bar %d: %s%s",
5050
bar - PCIE_CONF_BAR0,
5151
PCIE_CONF_BAR_IO(data) ? "I/O" : "MEM",
52-
PCIE_CONF_BAR_64(data) ? ", 64-bit" : "",
53-
PCIE_CONF_BAR_ADDR(data));
52+
PCIE_CONF_BAR_64(data) ? ", 64-bit" : "");
53+
54+
shell_fprintf(shell, SHELL_NORMAL, " addr 0x");
5455

5556
if (PCIE_CONF_BAR_64(data)) {
5657
++bar;
58+
shell_fprintf(shell, SHELL_NORMAL, "%08x",
59+
pcie_conf_read(bdf, bar));
5760
}
61+
62+
shell_fprintf(shell, SHELL_NORMAL, "%08x\n",
63+
PCIE_CONF_BAR_ADDR(data));
5864
}
5965
}
6066

0 commit comments

Comments
 (0)