diff --git a/sys/arm64/arm64/ofw_machdep.c b/sys/arm64/arm64/ofw_machdep.c --- a/sys/arm64/arm64/ofw_machdep.c +++ b/sys/arm64/arm64/ofw_machdep.c @@ -43,7 +43,8 @@ { bus_addr_t addr; bus_size_t size; - int err; + phandle_t parent; + int err, flags; err = ofw_reg_to_paddr(dev, regno, &addr, &size, NULL); if (err != 0) @@ -54,5 +55,10 @@ if (sz != NULL) *sz = size; - return (bus_space_map(*tag, addr, size, 0, handle)); + flags = 0; + parent = OF_parent(dev); + if (parent > 0 && OF_hasprop(parent, "nonposted-mmio")) + flags |= BUS_SPACE_MAP_NONPOSTED; + + return (bus_space_map(*tag, addr, size, flags, handle)); }