[Crash-utility] [PATCH 0/5] [ppc32] update vtop

Toshikazu Nakayama nakayama.ts at ncos.nec.co.jp
Thu Mar 22 10:42:36 UTC 2012


This patch update ppc32 vtop.
 - Translate kvaddr for fsl-booke by using TLBCAM setting
 - Remove PMD from display because virtual address bit is not assigned
 - Fixup displayed PHYSICAL values of fsl-booke PTE format
 - Fixup bug for page flags setup which I made previous patch

Updated command images are below.

- kvaddr can be translated by using TLBCAM

crash> sym powerpc_base_platform
c0913024 (S) powerpc_base_platform
crash> vtop c0913024
VIRTUAL   PHYSICAL
c0913024  913024

PAGE DIRECTORY: c08d1000
  PGD: c08d2810 => 0

  TLBCAM[0]: MAS0     MAS1     MAS2     MAS3     MAS7
             10000001 c0000900 c0000004 15       0
             VIRTUAL RANGE : c0000000 - cfffffff
             PHYSICAL RANGE: 0 - fffffff
  => VIRTUAL  PHYSICAL TLBCAM-OFFSET
     c0913024 913024   9515044

  PAGE     PHYSICAL   MAPPING    INDEX CNT FLAGS
d0012260     913000         0         0  1 400

Next,
- vtop won't display PMD
- physical address is not equal to PTE
- FLAGS can be handled well

crash> vtop -c 4145 10000000
VIRTUAL   PHYSICAL
10000000  ef448000

PAGE DIRECTORY: e85c4000
  PGD: e85c4200 => e873c000
  PTE: e873c000 => ef44824020d
 PAGE: ef448000

    PTE      PHYSICAL  FLAGS
ef44824020d  ef448000  (PRESENT|USER|COHERENT|ACCESSED)

  VMA       START      END    FLAGS  FILE
ea1d3960  10000000  10af9000 8001875  /tmp/toshi/crash

However, ... could not read vtop'd physical address data from /dev/mem now.

crash> rd -p ef448000
rd: read error: physical address: ef448000  type: "32-bit PHYSADDR"

Although my environment tends to set higher PTE value,
PFN is valid physical scope number, my maximum is 4GB.

crash> log | grep totalpages
On node 0 totalpages: 1048576
crash> eval 1048576
hexadecimal: 100000  (1MB)
    decimal: 1048576
      octal: 4000000
     binary: 00000000000100000000000000000000

Is there any constraint in "rd" or is my "/dev/mem" something wrong?

Thanks,
Toshi

Toshikazu Nakayama (5):
  ppc32: add macros for machdep flags about ppc32 pte
  ppc32: add special vtop for FSL BOOKE
  ppc32: Ignore PMD
  ppc32: fixup vtop display items
  ppc32: fix page flags setup macro

 defs.h |   10 ++++
 ppc.c  |  162 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 2 files changed, 143 insertions(+), 29 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ppc32-add-macros-for-machdep-flags-about-ppc32-pte.patch
Type: text/x-patch
Size: 2848 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120322/72102975/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ppc32-add-special-vtop-for-FSL-BOOKE.patch
Type: text/x-patch
Size: 5977 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120322/72102975/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ppc32-Ignore-PMD.patch
Type: text/x-patch
Size: 2940 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120322/72102975/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-ppc32-fixup-vtop-display-items.patch
Type: text/x-patch
Size: 944 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120322/72102975/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-ppc32-fix-page-flags-setup-macro.patch
Type: text/x-patch
Size: 939 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120322/72102975/attachment-0004.bin>


More information about the Crash-utility mailing list