[U-Boot] [PATCH 1/1] cmd: add exception command
Heinrich Schuchardt
xypron.glpk at gmx.de
Sun Dec 30 08:33:27 UTC 2018
On 12/29/18 2:39 PM, Simon Glass wrote:
> Hi Heinrich,
>
> On Wed, 26 Dec 2018 at 09:20, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>>
>> The 'exception' command allows to test exception handling.
>>
>> This implementation supports ARM, x86, RISC-V and the following exceptions:
>> * 'breakpoint' - prefetch abort exception (ARM 32bit only)
>> * 'unaligned' - data abort exception (ARM only)
>> * 'undefined' - undefined instruction exception
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> ---
>> v2:
>> Split architecture specific code into separate files.
>> Provide include for common code.
>> Update MAINTAINERS file.
>> ---
>> MAINTAINERS | 3 +++
>> cmd/Kconfig | 6 +++++
>> cmd/Makefile | 2 ++
>> cmd/arm/Makefile | 7 +++++
>> cmd/arm/exception.c | 61 +++++++++++++++++++++++++++++++++++++++++++
>> cmd/arm/exception64.c | 33 +++++++++++++++++++++++
>> cmd/riscv/Makefile | 3 +++
>> cmd/riscv/exception.c | 29 ++++++++++++++++++++
>> cmd/x86/Makefile | 1 +
>> cmd/x86/exception.c | 29 ++++++++++++++++++++
>> include/exception.h | 58 ++++++++++++++++++++++++++++++++++++++++
>> 11 files changed, 232 insertions(+)
>> create mode 100644 cmd/arm/Makefile
>> create mode 100644 cmd/arm/exception.c
>> create mode 100644 cmd/arm/exception64.c
>> create mode 100644 cmd/riscv/Makefile
>> create mode 100644 cmd/riscv/exception.c
>> create mode 100644 cmd/x86/exception.c
>> create mode 100644 include/exception.h
>
> This needs something like Series-version: 2 (if you use patman) to set
> the version number in the header.
Sorry for the mishap.
>
> Did you look at using a uclass and driver, like sysreset?
Yes I have considered using a u-class. But I could not see how adding a
separate u-class file would save lines, make the coding less complex, or
make the coding easier to maintain. A u-class would make sense if there
were other consumers for exceptions but the exception command. But I
cannot imagine any.
There are better places to apply u-classes, e.g. I am really missing a
u-class for file systems.
Best regards
Heinrich
>
> Regards,
> Simon
>
More information about the U-Boot
mailing list