Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset b8da2a3 in mainline


Ignore:
Timestamp:
2010-02-17T19:07:51Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
bfd7aac, ca2d142
Parents:
81983e3
Message:

enable kernel console output in case of kernel panic

  • the panic message might still be slightly unreadable due to the framebuffer driver optimizations (we don't waste time with full screen redraw), but at least you know that something bad happened and this issue can be tackled later
  • let's hope that enabling the kernel console cannot make things worse in the panicking kernel (especially with respect to the kernel/uspace interrupt handler priorities switch)
Location:
kernel/generic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/console/console.h

    r81983e3 rb8da2a3  
    4141extern indev_t *stdin;
    4242extern outdev_t *stdout;
    43 extern bool silent;
    4443
    4544extern indev_t *stdin_wire(void);
  • kernel/generic/include/panic.h

    r81983e3 rb8da2a3  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_PANIC_H_
    3737
     38#include <typedefs.h>
    3839#include <stacktrace.h>
    3940#include <print.h>
     
    4243#       define panic(format, ...) \
    4344                do { \
     45                        silent = false; \
    4446                        printf("Kernel panic in %s() at %s:%u.\n", \
    4547                            __func__, __FILE__, __LINE__); \
     
    5052#else
    5153#       define panic(format, ...) \
    52                 panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__);
     54                do { \
     55                        silent = false; \
     56                        panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__); \
     57                } while (0)
    5358#endif
     59
     60extern bool silent;
    5461
    5562extern void panic_printf(char *fmt, ...) __attribute__((noreturn));
  • kernel/generic/src/console/console.c

    r81983e3 rb8da2a3  
    4545#include <ipc/irq.h>
    4646#include <arch.h>
     47#include <panic.h>
    4748#include <print.h>
    4849#include <putchar.h>
Note: See TracChangeset for help on using the changeset viewer.