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

Changeset b5e17b1 in mainline


Ignore:
Timestamp:
2013-02-04T10:43:30Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
7be6379
Parents:
260f678
Message:

Initializatoin of stdout for malta.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/mach/malta/malta.c

    r260f678 rb5e17b1  
    3535
    3636#include <arch/mach/malta/malta.h>
     37#include <console/console.h>
     38#include <console/chardev.h>
     39#include <arch/mm/page.h>
    3740
    3841static void malta_init(void);
     
    7073}
    7174
     75#define YAMON_SUBR_BASE         PA2KA(0x1fc00500)
     76#define YAMON_SUBR_PRINT_COUNT  (YAMON_SUBR_BASE + 0x4)
     77
     78typedef void (**yamon_print_count_ptr_t)(uint32_t, const char *, uint32_t);
     79
     80yamon_print_count_ptr_t yamon_print_count =
     81    (yamon_print_count_ptr_t) YAMON_SUBR_PRINT_COUNT;
     82
     83static void yamon_putchar(outdev_t *dev, const wchar_t wch)
     84{
     85
     86        const char ch = (char) wch;
     87
     88        (*yamon_print_count)(0, &ch, 1);
     89}
     90
     91static outdev_t yamon_outdev;
     92static outdev_operations_t yamon_outdev_ops = {
     93        .write = yamon_putchar,
     94        .redraw = NULL
     95};
     96
    7297void malta_output_init(void)
    7398{
     99        outdev_initialize("yamon", &yamon_outdev, &yamon_outdev_ops);
     100        stdout_wire(&yamon_outdev);
    74101}
    75102
Note: See TracChangeset for help on using the changeset viewer.