Re: Mapping a specific physical address into kernel VA space, in interrupt context

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

 





On Wed, May 26, 2010 at 2:27 PM, Mayank Kaushik <mayank.utexas@xxxxxxxxx> wrote:
On Wed, May 26, 2010 at 1:14 PM, Joel Fernandes <agnel.joel@xxxxxxxxx> wrote:
Hi Mayank,

> To support my kernel debugging tool, I need to examine memory at specific
> locations in the physical address space of a CPU.
> Obviously, I need to map these physical addresses into the VA space of the
> CPU. And this has to be done in an interrupt context, when the kernel
> debugger will have broken into the kernel.

That is exactly what kmap and kmap_atomic are used for. Did you try using these?


Joel's suggestion works for i386. I can map a page at the specific address using the kind of protection I want using kmap_atomic_prot().
On x86_64, this isn't present, presumably because all of the physical memory is mapped at PAGE_OFFSET, so can be accessed at __va(phys_addr).
However, what if the physical address I want to map is device memory that should be uncached?

--
kthxbye
-Mayank

[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