From: kettenis Date: Fri, 29 Mar 2024 12:45:13 +0000 (+0000) Subject: Fix writing the prefetchable mmio window base/limit. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4bc9c22f538b2c7f923fe36df44134377ea81af5;p=openbsd Fix writing the prefetchable mmio window base/limit. ok patrick@ --- diff --git a/sys/dev/fdt/dwpcie.c b/sys/dev/fdt/dwpcie.c index 278d48c8595..4cdee4cdd2a 100644 --- a/sys/dev/fdt/dwpcie.c +++ b/sys/dev/fdt/dwpcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwpcie.c,v 1.52 2024/02/26 21:41:24 kettenis Exp $ */ +/* $OpenBSD: dwpcie.c,v 1.53 2024/03/29 12:45:13 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -676,7 +676,7 @@ dwpcie_attach_deferred(struct device *self) pmembase = sc->sc_pmem_bus_addr; pmemlimit = pmembase + sc->sc_pmem_size - 1; blr = pmemlimit & PPB_MEM_MASK; - blr |= (pmembase >> PPB_MEM_SHIFT); + blr |= ((pmembase & PPB_MEM_MASK) >> PPB_MEM_SHIFT); HWRITE4(sc, PPB_REG_PREFMEM, blr); HWRITE4(sc, PPB_REG_PREFBASE_HI32, pmembase >> 32); HWRITE4(sc, PPB_REG_PREFLIM_HI32, pmemlimit >> 32);