Hi Dave

 

I have a question about the ptov command. Ptov only handles kernel virtual addresses and their corresponding physical addresses. However if you give ptov a physical address that does not correspond to a kernel virtual address it still answers with an address. Users might get confused and do not know when to trust ptov, especially as the inverse command vtop always works.

 

So I would like to restrict ptov to give a result only when it is valid. The idea I have is that if ptov returns a valid virtual address then vtop on that address should give the same physical address back again. True??

 

cmd_ptov() in memory.c

  ....

  vaddr = PTOV(paddr);

  kvtop(0, vaddr, &paddr_tst, 0);

  if (paddr != paddr_tst) ... invalid vaddr, do not print it ...

 

Any comments?

 

Jan

 

Jan Karlsson

Senior Software Engineer

MIB

 

Sony Mobile Communications

Tel: +46703062174

sonymobile.com

 

SONY make.believe