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,
That is exactly what kmap and kmap_atomic are used for. Did you try using these?
> 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.
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