Changeset fd07e57b in mainline for kernel/generic/src/main


Ignore:
Timestamp:
2014-01-05T21:25:41Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4aa2a27
Parents:
aacdb8e (diff), ca05e9b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge cherrypicked kernel logger.

  • Old klog sybsystem was renamed to kio
  • Kernel and user-space log messages are stored in both logs (kernel logs end up in log/kernel file)
Location:
kernel/generic/src/main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/main/kinit.c

    raacdb8e rfd07e57b  
    5959#include <mm/km.h>
    6060#include <print.h>
     61#include <log.h>
    6162#include <memstr.h>
    6263#include <console/console.h>
     
    140141                                thread_ready(thread);
    141142                        } else
    142                                 printf("Unable to create kcpulb thread for cpu%u\n", i);
     143                                log(LF_OTHER, LVL_ERROR,
     144                                    "Unable to create kcpulb thread for cpu%u", i);
    143145                }
    144146        }
     
    156158                thread_ready(thread);
    157159        else
    158                 printf("Unable to create kload thread\n");
     160                log(LF_OTHER, LVL_ERROR, "Unable to create kload thread");
    159161       
    160162#ifdef CONFIG_KCONSOLE
     
    168170                        thread_ready(thread);
    169171                else
    170                         printf("Unable to create kconsole thread\n");
     172                        log(LF_OTHER, LVL_ERROR,
     173                            "Unable to create kconsole thread");
    171174        }
    172175#endif /* CONFIG_KCONSOLE */
     
    210213        for (i = 0; i < init.cnt; i++) {
    211214                if (init.tasks[i].paddr % FRAME_SIZE) {
    212                         printf("init[%zu]: Address is not frame aligned\n", i);
     215                        log(LF_OTHER, LVL_ERROR,
     216                            "init[%zu]: Address is not frame aligned", i);
    213217                        programs[i].task = NULL;
    214218                        continue;
     
    273277                        init_rd((void *) init.tasks[i].paddr, init.tasks[i].size);
    274278                } else
    275                         printf("init[%zu]: Init binary load failed "
    276                             "(error %d, loader status %u)\n", i, rc,
     279                        log(LF_OTHER, LVL_ERROR,
     280                            "init[%zu]: Init binary load failed "
     281                            "(error %d, loader status %u)", i, rc,
    277282                            programs[i].loader_status);
    278283        }
  • kernel/generic/src/main/main.c

    raacdb8e rfd07e57b  
    6262#include <console/kconsole.h>
    6363#include <console/console.h>
     64#include <log.h>
    6465#include <cpu.h>
    6566#include <align.h>
     
    281282        ipc_init();
    282283        event_init();
    283         klog_init();
     284        kio_init();
     285        log_init();
    284286        stats_init();
    285287       
  • kernel/generic/src/main/shutdown.c

    raacdb8e rfd07e57b  
    3939#include <func.h>
    4040#include <print.h>
     41#include <log.h>
    4142
    4243void reboot(void)
     
    4546       
    4647#ifdef CONFIG_DEBUG
    47         printf("Rebooting the system\n");
     48        log(LF_OTHER, LVL_DEBUG, "Rebooting the system");
    4849#endif
    4950       
Note: See TracChangeset for help on using the changeset viewer.