mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: give more detailed information about data aborts
Date: Wed, 05 Dec 2012 11:50:56 +0100	[thread overview]
Message-ID: <lyd2yo3h7z.fsf@ensc-virt.intern.sigma-chemnitz.de> (raw)
In-Reply-To: <20121205094344.GC10369@pengutronix.de> (Sascha Hauer's message of "Wed, 5 Dec 2012 10:43:44 +0100")

Sascha Hauer <s.hauer@pengutronix.de> writes:

>> -	asm volatile ("mrc     p15, 0, %0, c6, c0, 0" : "=r" (far) : : "cc");
>> -
>> -	printf("unable to handle %s at address 0x%08x\n",
>> -			far < PAGE_SIZE ? "NULL pointer dereference" :
>> -			"paging request", far);
>> +	if (!IS_ENABLED(CONFIG_VERBOSE_EXCEPTIONS)) {
>> +		printf("data abort\n");
>
> Why don't you keep the original message here? The fault address is a very
> useful information.

I think it is cleaner to implement a minimal + verbose variant, than a
little-bit-minimal + verbose variant.

I am not sure since when (ARM architecture wise) FAR and DFSR (introduced
by my patch) are available.  Value of FAR depends on the fault reason
(e.g. it is invalid for imprecise external aborts or debug events) so
printing FAR without DFSR might be misleading.


>> --- a/common/Kconfig
>> +++ b/common/Kconfig
>> @@ -668,6 +668,12 @@ config DEBUG_LL
>>  	help
>>  	  Enable this to get low level debug messages during barebox initialization.
>>  
>> +config VERBOSE_EXCEPTIONS
>> +	bool "decode processor specific exceptions"
>> +	default y
>> +	help
>> +	  Enable this to give out more detailed information about data aborts.
>
> This option should be in arch/arm/Kconfig since it's ARM specific.

I do not think that verbose exception messages are an ARM-only thing.
atm, it is implemented for ARM only but similar code can be written for
other architectures probably.

Having this option in the "Debugging" section of 'menuconfig' is expected
probably by the most users.  Making it architecture dependent requires
more or less invasive changes in the Kconfig infrastructure.


> Also it should depend on ARM_EXCEPTIONS.

ok


Enrico

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-12-05 10:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 12:04 Enrico Scholz
2012-12-05  9:43 ` Sascha Hauer
2012-12-05 10:50   ` Enrico Scholz [this message]
2012-12-05 11:35     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lyd2yo3h7z.fsf@ensc-virt.intern.sigma-chemnitz.de \
    --to=enrico.scholz@sigma-chemnitz.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox