Lines Matching refs:sys_addr

296 static bool base_limit_match(struct amd64_pvt *pvt, u64 sys_addr, u8 nid)  in base_limit_match()  argument
306 addr = sys_addr & 0x000000ffffffffffull; in base_limit_match()
319 u64 sys_addr) in find_mc_by_sys_addr() argument
340 if (base_limit_match(pvt, sys_addr, node_id)) in find_mc_by_sys_addr()
353 bits = (((u32) sys_addr) >> 12) & intlv_en; in find_mc_by_sys_addr()
364 if (unlikely(!base_limit_match(pvt, sys_addr, node_id))) { in find_mc_by_sys_addr()
367 __func__, sys_addr, node_id); in find_mc_by_sys_addr()
376 (unsigned long)sys_addr); in find_mc_by_sys_addr()
868 static u64 sys_addr_to_dram_addr(struct mem_ctl_info *mci, u64 sys_addr) in sys_addr_to_dram_addr() argument
878 if ((sys_addr >= (1ULL << 32)) && in sys_addr_to_dram_addr()
879 (sys_addr < ((1ULL << 32) + hole_size))) { in sys_addr_to_dram_addr()
881 dram_addr = sys_addr - hole_offset; in sys_addr_to_dram_addr()
884 (unsigned long)sys_addr, in sys_addr_to_dram_addr()
900 dram_addr = (sys_addr & GENMASK_ULL(39, 0)) - dram_base; in sys_addr_to_dram_addr()
903 (unsigned long)sys_addr, (unsigned long)dram_addr); in sys_addr_to_dram_addr()
950 static u64 sys_addr_to_input_addr(struct mem_ctl_info *mci, u64 sys_addr) in sys_addr_to_input_addr() argument
955 dram_addr_to_input_addr(mci, sys_addr_to_dram_addr(mci, sys_addr)); in sys_addr_to_input_addr()
958 (unsigned long)sys_addr, (unsigned long)input_addr); in sys_addr_to_input_addr()
979 static int sys_addr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr) in sys_addr_to_csrow() argument
983 csrow = input_addr_to_csrow(mci, sys_addr_to_input_addr(mci, sys_addr)); in sys_addr_to_csrow()
987 "address 0x%lx\n", (unsigned long)sys_addr); in sys_addr_to_csrow()
1551 static void k8_map_sysaddr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr, in k8_map_sysaddr_to_csrow() argument
1556 error_address_to_page_and_offset(sys_addr, err); in k8_map_sysaddr_to_csrow()
1562 err->src_mci = find_mc_by_sys_addr(mci, sys_addr); in k8_map_sysaddr_to_csrow()
1565 (unsigned long)sys_addr); in k8_map_sysaddr_to_csrow()
1571 err->csrow = sys_addr_to_csrow(err->src_mci, sys_addr); in k8_map_sysaddr_to_csrow()
1601 err->channel = ((sys_addr & BIT(3)) != 0); in k8_map_sysaddr_to_csrow()
1947 static u8 f15_m30h_determine_channel(struct amd64_pvt *pvt, u64 sys_addr, in f15_m30h_determine_channel() argument
1958 select = (sys_addr >> 8) & 0x3; in f15_m30h_determine_channel()
1964 channel = (sys_addr >> 8) & 0x3; in f15_m30h_determine_channel()
1967 channel = (sys_addr >> 9) & 0x3; in f15_m30h_determine_channel()
1978 static u8 f1x_determine_channel(struct amd64_pvt *pvt, u64 sys_addr, in f1x_determine_channel() argument
1997 return sys_addr >> 6 & 1; in f1x_determine_channel()
2001 u32 temp = hweight_long((u32) ((sys_addr >> 16) & 0x1F)) & 1; in f1x_determine_channel()
2003 return ((sys_addr >> shift) & 1) ^ temp; in f1x_determine_channel()
2009 return (sys_addr >> shift) & 1; in f1x_determine_channel()
2012 return (sys_addr >> (12 + hweight8(intlv_en))) & 1; in f1x_determine_channel()
2023 u64 sys_addr, bool hi_rng, in f1x_get_norm_dct_addr() argument
2046 (sys_addr >= BIT_64(32))) in f1x_get_norm_dct_addr()
2060 if (dhar_valid(pvt) && (sys_addr >= BIT_64(32))) in f1x_get_norm_dct_addr()
2066 return (sys_addr & GENMASK_ULL(47,6)) - (chan_off & GENMASK_ULL(47,23)); in f1x_get_norm_dct_addr()
2147 static u64 f1x_swap_interleaved_region(struct amd64_pvt *pvt, u64 sys_addr) in f1x_swap_interleaved_region() argument
2154 return sys_addr; in f1x_swap_interleaved_region()
2160 return sys_addr; in f1x_swap_interleaved_region()
2165 tmp_addr = sys_addr >> 27; in f1x_swap_interleaved_region()
2167 if (!(sys_addr >> 34) && in f1x_swap_interleaved_region()
2171 return sys_addr ^ (u64)swap_base << 27; in f1x_swap_interleaved_region()
2173 return sys_addr; in f1x_swap_interleaved_region()
2178 u64 sys_addr, int *chan_sel) in f1x_match_to_this_node() argument
2191 range, sys_addr, get_dram_limit(pvt, range)); in f1x_match_to_this_node()
2194 dhar_base(pvt) <= sys_addr && in f1x_match_to_this_node()
2195 sys_addr < BIT_64(32)) { in f1x_match_to_this_node()
2197 sys_addr); in f1x_match_to_this_node()
2201 if (intlv_en && (intlv_sel != ((sys_addr >> 12) & intlv_en))) in f1x_match_to_this_node()
2204 sys_addr = f1x_swap_interleaved_region(pvt, sys_addr); in f1x_match_to_this_node()
2214 ((sys_addr >> 27) >= (dct_sel_base >> 11))) in f1x_match_to_this_node()
2217 channel = f1x_determine_channel(pvt, sys_addr, high_range, intlv_en); in f1x_match_to_this_node()
2219 chan_addr = f1x_get_norm_dct_addr(pvt, range, sys_addr, in f1x_match_to_this_node()
2258 u64 sys_addr, int *chan_sel) in f15_m30h_match_to_this_node() argument
2279 range, sys_addr, get_dram_limit(pvt, range)); in f15_m30h_match_to_this_node()
2281 if (!(get_dram_base(pvt, range) <= sys_addr) && in f15_m30h_match_to_this_node()
2282 !(get_dram_limit(pvt, range) >= sys_addr)) in f15_m30h_match_to_this_node()
2286 dhar_base(pvt) <= sys_addr && in f15_m30h_match_to_this_node()
2287 sys_addr < BIT_64(32)) { in f15_m30h_match_to_this_node()
2289 sys_addr); in f15_m30h_match_to_this_node()
2298 !(dct_base <= (sys_addr >> 27) && in f15_m30h_match_to_this_node()
2299 dct_limit >= (sys_addr >> 27))) in f15_m30h_match_to_this_node()
2309 channel = f1x_determine_channel(pvt, sys_addr, false, intlv_en); in f15_m30h_match_to_this_node()
2311 channel = f15_m30h_determine_channel(pvt, sys_addr, intlv_en, in f15_m30h_match_to_this_node()
2321 if (leg_mmio_hole && (sys_addr >= BIT_64(32))) in f15_m30h_match_to_this_node()
2326 chan_addr = sys_addr - chan_offset; in f15_m30h_match_to_this_node()
2380 u64 sys_addr, in f1x_translate_sysaddr_to_cs() argument
2392 sys_addr, in f1x_translate_sysaddr_to_cs()
2395 else if ((get_dram_base(pvt, range) <= sys_addr) && in f1x_translate_sysaddr_to_cs()
2396 (get_dram_limit(pvt, range) >= sys_addr)) { in f1x_translate_sysaddr_to_cs()
2398 sys_addr, chan_sel); in f1x_translate_sysaddr_to_cs()
2413 static void f1x_map_sysaddr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr, in f1x_map_sysaddr_to_csrow() argument
2418 error_address_to_page_and_offset(sys_addr, err); in f1x_map_sysaddr_to_csrow()
2420 err->csrow = f1x_translate_sysaddr_to_cs(pvt, sys_addr, &err->channel); in f1x_map_sysaddr_to_csrow()
2845 u64 sys_addr; in decode_bus_error() local
2864 sys_addr = get_error_address(pvt, m); in decode_bus_error()
2869 pvt->ops->map_sysaddr_to_csrow(mci, sys_addr, &err); in decode_bus_error()
2894 u64 sys_addr; in decode_umc_error() local
2925 if (umc_normaddr_to_sysaddr(m->addr, pvt->mc_node_id, err.channel, &sys_addr)) { in decode_umc_error()
2930 error_address_to_page_and_offset(sys_addr, &err); in decode_umc_error()