Index: sys/arm/arm/nexus.c =================================================================== --- sys/arm/arm/nexus.c +++ sys/arm/arm/nexus.c @@ -159,10 +159,11 @@ { mem_rman.rm_start = 0; - mem_rman.rm_end = ~0ul; + mem_rman.rm_end = BUS_SPACE_MAXADDR; mem_rman.rm_type = RMAN_ARRAY; mem_rman.rm_descr = "I/O memory addresses"; - if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0)) + if (rman_init(&mem_rman) || + rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR)) panic("nexus_probe mem_rman"); /* Index: sys/arm64/arm64/nexus.c =================================================================== --- sys/arm64/arm64/nexus.c +++ sys/arm64/arm64/nexus.c @@ -146,10 +146,11 @@ { mem_rman.rm_start = 0; - mem_rman.rm_end = ~0ul; + mem_rman.rm_end = BUS_SPACE_MAXADDR; mem_rman.rm_type = RMAN_ARRAY; mem_rman.rm_descr = "I/O memory addresses"; - if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0)) + if (rman_init(&mem_rman) || + rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR)) panic("nexus_attach mem_rman"); irq_rman.rm_start = 0; irq_rman.rm_end = ~0ul; Index: sys/mips/mips/nexus.c =================================================================== --- sys/mips/mips/nexus.c +++ sys/mips/mips/nexus.c @@ -154,11 +154,11 @@ } mem_rman.rm_start = 0; - mem_rman.rm_end = ~0ul; + mem_rman.rm_end = BUS_SPACE_MAXADDR; mem_rman.rm_type = RMAN_ARRAY; mem_rman.rm_descr = "Memory addresses"; if (rman_init(&mem_rman) != 0 || - rman_manage_region(&mem_rman, 0, ~0) != 0) { + rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR) != 0) { panic("%s: mem_rman", __func__); } Index: sys/sparc64/sparc64/nexus.c =================================================================== --- sys/sparc64/sparc64/nexus.c +++ sys/sparc64/sparc64/nexus.c @@ -231,7 +231,7 @@ rman_init(&sc->sc_mem_rman) != 0 || rman_manage_region(&sc->sc_intr_rman, 0, IV_MAX - 1) != 0 || - rman_manage_region(&sc->sc_mem_rman, 0ULL, ~0ULL) != 0) + rman_manage_region(&sc->sc_mem_rman, 0, BUS_SPACE_MAXADDR) != 0) panic("%s: failed to set up rmans.", __func__); } else node = ofw_bus_get_node(dev); Index: sys/x86/x86/nexus.c =================================================================== --- sys/x86/x86/nexus.c +++ sys/x86/x86/nexus.c @@ -262,11 +262,15 @@ panic("nexus_init_resources port_rman"); mem_rman.rm_start = 0; - mem_rman.rm_end = ~0ul; +#ifndef PAE + mem_rman.rm_end = BUS_SPACE_MAXADDR; +#else + mem_rman.rm_end = ((1ULL << cpu_maxphyaddr) - 1); +#endif mem_rman.rm_type = RMAN_ARRAY; mem_rman.rm_descr = "I/O memory addresses"; if (rman_init(&mem_rman) - || rman_manage_region(&mem_rman, 0, ~0)) + || rman_manage_region(&mem_rman, 0, mem_rman.rm_end)) panic("nexus_init_resources mem_rman"); }