Re: Getting the physical page for a kernel virtual address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Katelyn...

Given a kernel virtual address in the range 0xC0000000 - 0xFFFFFFFF, is
it possible to walk the page tables to get the physical page
corresponding to that address? For example, I tried the following:
Since kernel virtual address is an identity mapping of physical address,
have you tried virt_to_phys()?

        unsigned long addr = PAGE_OFFSET|0x00100000;

        pgd = pgd_offset(&init_mm, addr);
Interesting. You try to hit 0xC010000 which is related to phys address
0x00100000, but in reality (assuming your codes are correct, since I see
no mistake so far) you get no related page table entry. Have you tried
another virtual address?

regards,

Mulyadi



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux