[#4778] debug-mmrs.c causes crashes

Document created by Aaronwu Employee on Aug 30, 2013
Version 1Show Document
  • View in full screen mode

[#4778] debug-mmrs.c causes crashes

Submitted By: Robin Getz

Open Date

2009-01-07 11:46:23     Close Date

2009-09-27 00:08:06

Priority:

Medium     Assignee:

Vivi Li

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2008R1.5-RC3     Release:

trunk

Category:

Kernel Functions     Board:

N/A

Processor:

ALL     Silicon Revision:

all

Is this bug repeatable?:

Yes     Resolution:

Assigned (Not Start)

Uboot version or rev.:

any     Toolchain version or rev.:

trunk

App binary format:

N/A     

Summary: debug-mmrs.c causes crashes

Details:

 

Read access on the debugfs normally crashes.

 

find /sys/kernel/debug/blackfin/ -type f -print -exec cat {} \;

 

Since some registers are not defined as write only. (yes, there are registers on the Blackfin which will cause HWERR if they are read).

 

Since some registers are not described properly (16 bit vs 32 bit).

 

The fixups need to occur in arch/blackfin/kernel/debug-mmrs.c - but this is an autogenerated file - from the toolchain's proc-defs/xml/* files. (the commit's to fix this will go into the toolchain, and then before the release the kernel's file needs to be updated).

 

The above command line (find /sys/...) should be part of the manual tests which are done before a release (and when adding a new processor type) to ensure that everything is up to date.

 

The purpose is to be able to allow end users to get a quick register dump by just doing:

 

cat /sys/kernel/debug/blackfin/USB/*

 

-Robin

 

Follow-ups

 

--- Robin Getz                                               2009-06-28 17:47:49

This can run fine on 537 now - we just need to add it to all machine types on

the regression machines.

 

Vivi: Can you do that?

 

Should be simple enough - just do a "find /sys/kernel/debug/blackfin/

-type f -print -exec cat {} \;" and wait 5 min for the shell to come up -

if the kernel crashes - the test fails.

 

Thanks

-Robin

 

--- Mike Frysinger                                           2009-06-28 18:15:43

if you send the output to >/dev/null, then it should be even faster i think

 

i'm pretty sure this also works on BF54x now

 

--- Robin Getz                                               2009-06-28 23:53:37

If you send the output to null - you don't know where it crashes...

 

-Robin

 

--- Mike Frysinger                                           2009-06-29 00:11:38

yes you will ... in the crash message, only one of the p registers will be

pointing to mmr space (or at least that i've seen)

 

it's about as likely as working with cat ... often ive seen the relevant MMR

output not make it to the console before traps triggered

 

--- Vivi Li                                                  2009-09-27 00:08:06

Test case is add in folder debug_mmrs. So close this case.

 

As I found a crash when I run debug_mmrs_test.exp, so open a new bug 5559.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes