|
Kernelite 0.1.0
Kernelite is a minimalist, educational operating system kernel built from scratch. The project aims to recreate core components of the Linux architecture to explore the fundamentals of operating system design and hardware-software interaction.
|
Human-readable string mapping for kernel error codes. More...
#include "error_codes.h"

Go to the source code of this file.
Macros | |
| #define | STRING_MAP |
| master mapping table for error codes and strings. | |
Functions | |
| const char * | error_to_string (long code) |
| Converts a numeric error code into a human-readable string. | |
Human-readable string mapping for kernel error codes.
Provides lookup support for converting numeric error codes into readable diagnostics used by panic and logging routines.
| #define STRING_MAP |
master mapping table for error codes and strings.
This macro uses the X-Macro pattern: X(constant, string). To add a new error message, define the constant in error_codes.h and add a corresponding entry here.
| const char * error_to_string | ( | long | code | ) |
Converts a numeric error code into a human-readable string.
This function maps internal kernel error constants (e.g., ERROR_CODE_NOT_EL1) to descriptive string literals. It is primarily used by the panic handler to provide diagnostic feedback over UART when a fatal error occurs.
| code | The numeric error code triggered by the kernel or bootloader. |