Lines Matching refs:maddr

83 static int pa_to_maddr(mc_opl_t *mcp, uint64_t pa, mc_addr_t *maddr);
661 mcaddr_to_pa(mc_opl_t *mcp, mc_addr_t *maddr, uint64_t *pa) in mcaddr_to_pa() argument
665 int cs = (maddr->ma_dimm_addr >> CS_SHIFT) & 1; in mcaddr_to_pa()
666 int bank = maddr->ma_bank; in mcaddr_to_pa()
670 MC_LOG("mcaddr /LSB%d/B%d/%x\n", maddr->ma_bd, bank, in mcaddr_to_pa()
671 maddr->ma_dimm_addr); in mcaddr_to_pa()
674 ASSERT(maddr->ma_bd >= 0 && OPL_BOARD_MAX > maddr->ma_bd); in mcaddr_to_pa()
682 pa_bit = (maddr->ma_dimm_addr >> mc_bit) & 1; in mcaddr_to_pa()
699 "convert PA %lx\n", maddr->ma_bd, bank, in mcaddr_to_pa()
700 maddr->ma_dimm_addr, *pa); in mcaddr_to_pa()
707 if (IS_MIRROR(mcp, maddr->ma_bank)) { in mcaddr_to_pa()
708 bank0 = maddr->ma_bank & ~(1); in mcaddr_to_pa()
711 bank0 = maddr->ma_bank; in mcaddr_to_pa()
718 if ((bank0 == bank1) && (maddr->ma_dimm_addr == in mcaddr_to_pa()
723 "PA %lx, target /LSB%d/B%d/%x\n", maddr->ma_bd, bank, in mcaddr_to_pa()
724 maddr->ma_dimm_addr, *pa, maddr1.ma_bd, maddr1.ma_bank, in mcaddr_to_pa()
813 pa_to_maddr(mc_opl_t *mcp, uint64_t pa, mc_addr_t *maddr) in pa_to_maddr() argument
823 maddr->ma_bd = mcp->mc_board_num; in pa_to_maddr()
824 maddr->ma_phys_bd = mcp->mc_phys_board_num; in pa_to_maddr()
825 maddr->ma_bank = pa_to_bank(mcp, pa_offset); in pa_to_maddr()
826 maddr->ma_dimm_addr = pa_to_dimm(mcp, pa_offset); in pa_to_maddr()
827 MC_LOG("pa %lx -> mcaddr /LSB%d/B%d/%x\n", pa_offset, maddr->ma_bd, in pa_to_maddr()
828 maddr->ma_bank, maddr->ma_dimm_addr); in pa_to_maddr()
1444 mc_addr_t maddr; in mc_set_rewrite() local
1450 maddr.ma_bd = mcp->mc_board_num; in mc_set_rewrite()
1451 maddr.ma_bank = bank; in mc_set_rewrite()
1452 maddr.ma_dimm_addr = addr; in mc_set_rewrite()
1453 if (mcaddr_to_pa(mcp, &maddr, &paddr) == 0) { in mc_set_rewrite()
2379 get_ptrl_start_address(mc_opl_t *mcp, int bank, mc_addr_t *maddr) in get_ptrl_start_address() argument
2381 maddr->ma_bd = mcp->mc_board_num; in get_ptrl_start_address()
2382 maddr->ma_bank = bank; in get_ptrl_start_address()
2383 maddr->ma_dimm_addr = 0; in get_ptrl_start_address()
3636 mc_addr_t maddr; in mc_get_mem_offset() local
3648 if (pa_to_maddr(mcp, paddr, &maddr) == 0) { in mc_get_mem_offset()
3649 *offp = maddr.ma_dimm_addr; in mc_get_mem_offset()
3710 mc_addr_t maddr; in mc_get_mem_addr() local
3743 maddr.ma_bd = mcp->mc_board_num; in mc_get_mem_addr()
3744 maddr.ma_bank = bank; in mc_get_mem_addr()
3745 maddr.ma_dimm_addr = offset; in mc_get_mem_addr()
3746 ret = mcaddr_to_pa(mcp, &maddr, paddr); in mc_get_mem_addr()