예제 #1
0
파일: intel.c 프로젝트: Zentific/libvmi
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;
}
예제 #2
0
파일: intel.c 프로젝트: namidairo/libvmi
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;
}