示例#1
0
文件: intel.c 项目: Zentific/libvmi
static inline
uint64_t get_pte_pae (vmi_instance_t instance,
    uint32_t vaddr,
    uint64_t pgd,
    addr_t *pte_entry)
{
    uint64_t value;
    *pte_entry = ptba_base_pae(pgd) + pte_index_pae(vaddr);
    dbprint(VMI_DEBUG_PTLOOKUP, "--PAE PTLookup: pte_entry = 0x%.8"PRIx64"\n", *pte_entry);
    if(VMI_FAILURE == vmi_read_64_pa(instance, *pte_entry, &value)) {
        value = 0;
    }
    return value;
}
示例#2
0
文件: intel.c 项目: namidairo/libvmi
static inline
status_t get_pte_pae (vmi_instance_t instance,
    uint32_t vaddr,
    uint64_t pgd,
    addr_t *pte_entry,
    addr_t *pte_value)
{
    *pte_value = 0;
    *pte_entry = ptba_base_pae(pgd) + pte_index_pae(vaddr);
    dbprint(VMI_DEBUG_PTLOOKUP, "--PAE PTLookup: pte_entry = 0x%.8"PRIx64"\n", *pte_entry);
    if(VMI_FAILURE == vmi_read_64_pa(instance, *pte_entry, pte_value)) {
        dbprint(VMI_DEBUG_PTLOOKUP, "--PAE PTLookup: failed to read pte_entry = 0x%.8"PRIx64"\n", *pte_entry);
        return VMI_FAILURE;
    }
    dbprint(VMI_DEBUG_PTLOOKUP, "--PAE PTLookup: pte_entry = 0x%.8"PRIx64", pte_value = 0x%.8"PRIx64"\n",
            *pte_entry, *pte_value);
    return VMI_SUCCESS;
}