Esempio n. 1
0
uint64_t get_pdpi (vmi_instance_t instance, uint32_t vaddr, uint32_t cr3)
{
    uint64_t value;
    uint32_t pdpi_entry = get_pdptb(cr3) + pdpi_index(vaddr);

    dbprint("--PTLookup: pdpi_entry = 0x%.8x\n", pdpi_entry);
    vmi_read_64_pa(instance, pdpi_entry, &value);
    return value;
}
Esempio n. 2
0
static inline
uint64_t get_pdpi (vmi_instance_t instance,
    uint32_t vaddr,
    addr_t dtb,
    addr_t *pdpi_entry)
{
    uint64_t value;
    *pdpi_entry = get_pdptb(dtb) + pdpi_index(vaddr);
    dbprint(VMI_DEBUG_PTLOOKUP, "--PAE PTLookup: pdpi_entry = 0x%.16"PRIx64"\n", *pdpi_entry);
    if(VMI_FAILURE == vmi_read_64_pa(instance, *pdpi_entry, &value)) {
        value = 0;
    }

    return value;
}
Esempio n. 3
0
static inline
status_t get_pdpi (vmi_instance_t instance,
    uint32_t vaddr,
    addr_t dtb,
    addr_t *pdpi_entry,
    uint64_t *pdpi_value)
{
    *pdpi_entry = get_pdptb(dtb) + pdpi_index(vaddr);
    if(VMI_FAILURE == vmi_read_64_pa(instance, *pdpi_entry, pdpi_value)) {
        dbprint(VMI_DEBUG_PTLOOKUP, "--PAE PTLookup: failed to read pdpi_entry = 0x%.16"PRIx64"\n", *pdpi_entry);
        return VMI_FAILURE;
    }
    dbprint(VMI_DEBUG_PTLOOKUP, "--PAE PTLookup: pdpi_entry = 0x%.16"PRIx64", pdpi_value = 0x%.16"PRIx64"\n",
            *pdpi_entry, *pdpi_value);

    return VMI_SUCCESS;
}