Skip to content

ARM fault dumping code does too much, assumes all faults are fatal, and doesn't work under some configurations #8950

@andrewboie

Description

@andrewboie

There is a great deal of code in ARM's fault.c which is invoked from FAULT_DUMP(). This code is supposed to dump out fault information to the console and only that, but buried within it is code to actually handle the exception like clear sticky bits.

This is problematic:

  • FAULT_DUMP() resolves to nothing if CONFIG_FAULT_DUMP is not set, since this code as documented is only supposed to dump info to the console
  • There's no way to handle a specific exception without printing a bunch of stuff
  • There's no way to return from an exception if the fault was expected instead of calling NanoFatalErrorHandler
  • The code is calling SysFatalErrorHandler directly instead of NanoFatalErrorHandler like it should.
    Open task: switch to _NanoFatalErrorHandler.

There needs to be a clean separation between handling the fault, and dumping information about it, and handling the fault should provide the opportunity to clean up and exit from the exception if the fault is non-fatal.

Metadata

Metadata

Assignees

Labels

area: ARMARM (32-bit) ArchitecturebugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions