pt = env->ptbr;
- /* TODO: rather than using ldq_phys() to read the page table we should
+ /*
+ * TODO: rather than using ldq_phys_le() to read the page table we should
* use address_space_ldq() so that we can handle the case when
* the page table read gives a bus fault, rather than ignoring it.
- * For the existing code the zero data that ldq_phys will return for
+ * For the existing code the zero data that ldq_phys_le will return for
* an access to invalid memory will result in our treating the page
* table as invalid, which may even be the right behaviour.
*/
/* L1 page table read. */
index = (addr >> (TARGET_PAGE_BITS + 20)) & 0x3ff;
- L1pte = ldq_phys(cs->as, pt + index*8);
+ L1pte = ldq_phys_le(cs->as, pt + index * 8);
if (unlikely((L1pte & PTE_VALID) == 0)) {
ret = MM_K_TNV;
/* L2 page table read. */
index = (addr >> (TARGET_PAGE_BITS + 10)) & 0x3ff;
- L2pte = ldq_phys(cs->as, pt + index*8);
+ L2pte = ldq_phys_le(cs->as, pt + index * 8);
if (unlikely((L2pte & PTE_VALID) == 0)) {
ret = MM_K_TNV;
/* L3 page table read. */
index = (addr >> TARGET_PAGE_BITS) & 0x3ff;
- L3pte = ldq_phys(cs->as, pt + index*8);
+ L3pte = ldq_phys_le(cs->as, pt + index * 8);
phys = L3pte >> 32 << TARGET_PAGE_BITS;
if (unlikely((L3pte & PTE_VALID) == 0)) {