static inline uint32_t get_pte_nopae (vmi_instance_t instance, uint32_t vaddr, uint32_t pgd, addr_t *pte_entry) { uint32_t value; *pte_entry = ptba_base_nopae(pgd) + pte_index_nopae(vaddr); dbprint(VMI_DEBUG_PTLOOKUP, "--PTLookup: pte_entry = 0x%.8"PRIx64"\n", *pte_entry); if(VMI_FAILURE == vmi_read_32_pa(instance, *pte_entry, &value)) { value = 0; } return value; }
static inline status_t get_pte_nopae (vmi_instance_t instance, uint32_t vaddr, uint32_t pgd, addr_t *pte_entry, addr_t *pte_value) { uint32_t value = 0; *pte_value = 0; *pte_entry = ptba_base_nopae(pgd) + pte_index_nopae(vaddr); if(VMI_FAILURE == vmi_read_32_pa(instance, *pte_entry, &value)) { dbprint(VMI_DEBUG_PTLOOKUP, "--PTLookup: failed to read pte_entry = 0x%.8"PRIx64"\n", *pte_entry); return VMI_FAILURE; } *pte_value = value; dbprint(VMI_DEBUG_PTLOOKUP, "--PTLookup: pte_entry = 0x%.8"PRIx64", pte_value = 0x%.8"PRIx64"\n", *pte_entry, *pte_value); return VMI_SUCCESS; }