summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-12-11 10:38:35 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-12-13 14:31:41 +0000
commit167b7fcdd93410b27950762373409ef8775e8282 (patch)
treedbd19228666695d3042dad5d7bbfea5a7a44abb6
parent878a99f554da5e7f49c6a70a1d56b3974f78b0c4 (diff)
soc/intel/xeon_sp/nb_acpi.c: Use read{16,32,64}p()
Change-Id: I89bfbab7850dd9bd29ca2097ee2efce058720ca7 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70583 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
-rw-r--r--src/soc/intel/xeon_sp/nb_acpi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/soc/intel/xeon_sp/nb_acpi.c b/src/soc/intel/xeon_sp/nb_acpi.c
index 42b52f3a26..bebabfba29 100644
--- a/src/soc/intel/xeon_sp/nb_acpi.c
+++ b/src/soc/intel/xeon_sp/nb_acpi.c
@@ -258,13 +258,13 @@ static unsigned long acpi_create_drhd(unsigned long current, int socket,
// Add HPET
if (socket == 0 && stack == CSTACK) {
- uint16_t hpet_capid = read16((void *)HPET_BASE_ADDRESS);
+ uint16_t hpet_capid = read16p(HPET_BASE_ADDRESS);
uint16_t num_hpets = (hpet_capid >> 0x08) & 0x1F; // Bits [8:12] has hpet count
printk(BIOS_SPEW, "%s hpet_capid: 0x%x, num_hpets: 0x%x\n",
__func__, hpet_capid, num_hpets);
//BIT 15
if (num_hpets && (num_hpets != 0x1f) &&
- (read32((void *)(HPET_BASE_ADDRESS + 0x100)) & (0x00008000))) {
+ (read32p(HPET_BASE_ADDRESS + 0x100) & (0x00008000))) {
union p2sb_bdf hpet_bdf = p2sb_get_hpet_bdf();
printk(BIOS_DEBUG, " [Message-capable HPET Device] Enumeration ID: 0x%x, "
"PCI Bus Number: 0x%x, PCI Path: 0x%x, 0x%x\n",
@@ -293,7 +293,7 @@ static unsigned long acpi_create_atsr(unsigned long current, const IIO_UDS *hob)
uint32_t vtd_base = iio_resource.StackRes[stack].VtdBarAddress;
if (!vtd_base)
continue;
- uint64_t vtd_mmio_cap = read64((void *)(vtd_base + VTD_EXT_CAP_LOW));
+ uint64_t vtd_mmio_cap = read64p(vtd_base + VTD_EXT_CAP_LOW);
printk(BIOS_SPEW, "%s socket: %d, stack: %d, bus: 0x%x, vtd_base: 0x%x, "
"vtd_mmio_cap: 0x%llx\n",
__func__, socket, stack, bus, vtd_base, vtd_mmio_cap);