RTEMS 6.1-rc2
|
This group contains the Internal Error Handler implementation. More...
Files | |
file | interr.h |
This header file provides the interfaces of the Internal Error Handler. | |
file | interr.c |
This source file contains the definition of _System_state_Current and the implementation of _Terminate() and _Internal_error(). | |
Typedefs | |
typedef CPU_Uint32ptr | Internal_errors_t |
Enumerations | |
enum | Internal_errors_Source { INTERNAL_ERROR_CORE = 0 , INTERNAL_ERROR_RTEMS_API = 1 , INTERNAL_ERROR_POSIX_API = 2 , RTEMS_FATAL_SOURCE_BDBUF = 3 , RTEMS_FATAL_SOURCE_APPLICATION = 4 , RTEMS_FATAL_SOURCE_EXIT = 5 , RTEMS_FATAL_SOURCE_BSP = 6 , RTEMS_FATAL_SOURCE_ASSERT = 7 , RTEMS_FATAL_SOURCE_STACK_CHECKER = 8 , RTEMS_FATAL_SOURCE_EXCEPTION = 9 , RTEMS_FATAL_SOURCE_SMP = 10 , RTEMS_FATAL_SOURCE_PANIC = 11 , RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE = 12 , RTEMS_FATAL_SOURCE_HEAP = 13 , RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT = 14 , RTEMS_FATAL_SOURCE_LAST = 0x7fffffff } |
This type lists the possible sources from which an error can be reported. More... | |
enum | Internal_errors_Core_list { INTERNAL_ERROR_TOO_LITTLE_WORKSPACE = 2 , INTERNAL_ERROR_THREAD_EXITTED = 5 , INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION = 6 , INTERNAL_ERROR_INVALID_NODE = 7 , INTERNAL_ERROR_NO_MPCI = 8 , INTERNAL_ERROR_BAD_PACKET = 9 , INTERNAL_ERROR_OUT_OF_PACKETS = 10 , INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS = 11 , INTERNAL_ERROR_OUT_OF_PROXIES = 12 , INTERNAL_ERROR_INVALID_GLOBAL_ID = 13 , INTERNAL_ERROR_NO_MEMORY_FOR_HEAP = 23 , INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR = 24 , INTERNAL_ERROR_RESOURCE_IN_USE = 25 , INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK = 28 , INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE = 29 , INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL = 30 , INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT = 31 , INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED = 32 , INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED = 33 , INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED = 36 , INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED = 37 , INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT = 38 , INTERNAL_ERROR_ARC4RANDOM_GETENTROPY_FAIL = 39 , INTERNAL_ERROR_NO_MEMORY_FOR_PER_CPU_DATA = 40 , INTERNAL_ERROR_TOO_LARGE_TLS_SIZE = 41 , INTERNAL_ERROR_RTEMS_INIT_TASK_CONSTRUCT_FAILED = 42 , INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED = 43 , INTERNAL_ERROR_NO_MEMORY_FOR_IDLE_TASK_STORAGE = 44 , INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL = 45 } |
A list of errors which are generated internally by the executive core. More... | |
Functions | |
RTEMS_NO_RETURN void | _Terminate (Internal_errors_Source the_source, Internal_errors_t the_error) |
Initiates system termination. | |
RTEMS_NO_RETURN void | _Internal_error (Internal_errors_Core_list core_error) |
Terminates the system with an INTERNAL_ERROR_CORE fatal source and the specified core error code. | |
This group contains the Internal Error Handler implementation.
This handler encapsulates functionality to terminate the system.
A list of errors which are generated internally by the executive core.
Do not re-use numbers of obsolete error codes. Comment no longer used error codes and do not uncomment commented or obsolete error codes.
This type lists the possible sources from which an error can be reported.
Enumerator | |
---|---|
INTERNAL_ERROR_CORE | Errors of the core system.
|
INTERNAL_ERROR_RTEMS_API | Errors of the RTEMS API. |
INTERNAL_ERROR_POSIX_API | Errors of the POSIX API. |
RTEMS_FATAL_SOURCE_BDBUF | Fatal source for the block device cache.
|
RTEMS_FATAL_SOURCE_APPLICATION | Fatal source for application specific errors. The fatal code is application specific. |
RTEMS_FATAL_SOURCE_EXIT | Fatal source of exit(). The fatal code is the exit() status code. |
RTEMS_FATAL_SOURCE_BSP | Fatal source for BSP errors. The fatal codes are defined in <bsp/fatal.h>. Examples are interrupt and exception initialization.
|
RTEMS_FATAL_SOURCE_ASSERT | Fatal source of assert(). The fatal code is the pointer value of the assert context.
|
RTEMS_FATAL_SOURCE_STACK_CHECKER | Fatal source of the stack checker. The fatal code is the object name of the executing task. |
RTEMS_FATAL_SOURCE_EXCEPTION | Fatal source of the exceptions. The fatal code is the pointer value of the exception frame pointer.
|
RTEMS_FATAL_SOURCE_SMP | Fatal source of SMP domain.
|
RTEMS_FATAL_SOURCE_PANIC | Fatal source of rtems_panic().
|
RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE | Fatal source for invalid C program heap frees via free(). The fatal code is the bad pointer. |
RTEMS_FATAL_SOURCE_HEAP | Fatal source for heap errors. The fatal code is the address to a heap error context (Heap_Error_context). |
RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT | Fatal source for spurious interrupts. The fatal code is the interrupt vector number of the spurious interrupt. |
RTEMS_FATAL_SOURCE_LAST | The last available fatal source. This enum value ensures that the enum type needs at least 32-bits for architectures with short enums. |
RTEMS_NO_RETURN void _Internal_error | ( | Internal_errors_Core_list | core_error | ) |
Terminates the system with an INTERNAL_ERROR_CORE fatal source and the specified core error code.
core_error | The core error code. |
RTEMS_NO_RETURN void _Terminate | ( | Internal_errors_Source | the_source, |
Internal_errors_t | the_error | ||
) |
Initiates system termination.
This routine is invoked when the application or the executive itself determines that a fatal error has occurred or a final system state is reached (for example after exit()).
The first action of this function is to call the fatal handler of the user extensions. For the initial extensions the following conditions are required
For the initial extensions the read-write data (including BSS segment) is not required on single processor configurations. On SMP configurations however the read-write data must be initialized since this function must determine the state of the other processors and request them to shut-down if necessary.
Non-initial extensions require in addition valid read-write data. The BSP may install an initial extension that performs a system reset. In this case the non-initial extensions will be not called.
Once all fatal handler executed the system state is set to SYSTEM_STATE_TERMINATED.
The final step is to call the CPU specific _CPU_Fatal_halt().
the_source | The fatal source indicating the subsystem the fatal condition originated in. |
the_error | The fatal error code. This value must be interpreted with respect to the source. |