From 921fa84f9e6802b28dd42cb905c396d033e64836 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Sun, 28 Jan 2018 20:26:34 +0100 Subject: [PATCH] inteltool: Fix displaying 64bit spi registers The registers were taken from the wrong addess since the spibar offset was not added to it. This also fixes the endianness. Change-Id: I8bb91517770359599fe5f579c4686434da8d1c27 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/23478 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- util/inteltool/spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/inteltool/spi.c b/util/inteltool/spi.c index cda86679d2..2e54cb85ff 100644 --- a/util/inteltool/spi.c +++ b/util/inteltool/spi.c @@ -279,7 +279,8 @@ int print_spibar(struct pci_dev *sb) { printf("0x%08x = %s\n", *(uint32_t *)(rcba + spibaroffset + spi_register[i].addr), spi_register[i].name); break; case 8: - printf("0x%08x%08x = %s\n", *(uint32_t *)(rcba + spi_register[i].addr), *(uint32_t *)(rcba + spi_register[i].addr + 4), spi_register[i].name); + printf("0x%08x%08x = %s\n", *(uint32_t *)(rcba + spibaroffset + spi_register[i].addr + 4), + *(uint32_t *)(rcba + spibaroffset + spi_register[i].addr), spi_register[i].name); break; } }