Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/drivers/ski.c

    rcf3a905c raafed15  
    3737#include <console/console.h>
    3838#include <console/chardev.h>
    39 #include <ddi/ddi.h>
    4039#include <sysinfo/sysinfo.h>
    4140#include <stdint.h>
     
    7069
    7170static ski_instance_t *instance = NULL;
    72 static parea_t ski_parea;
    7371
    7472/** Ask debug console if a key was pressed.
     
    107105        int count = POLL_LIMIT;
    108106
    109         if (ski_parea.mapped)
    110                 return;
    111 
    112107        while (count > 0) {
    113108                wchar_t ch = ski_getchar();
     
    127122
    128123        while (true) {
    129                 poll_keyboard(instance);
     124                // TODO FIXME:
     125                // This currently breaks the kernel console
     126                // before we get the override from uspace.
     127                if (console_override)
     128                        poll_keyboard(instance);
     129
    130130                thread_usleep(POLL_INTERVAL);
    131131        }
     
    140140static void ski_init(void)
    141141{
    142         uintptr_t faddr;
    143 
    144142        if (instance)
    145143                return;
     
    152150            : "r15", "r8"
    153151        );
    154 
    155         faddr = frame_alloc(1, FRAME_LOWMEM | FRAME_ATOMIC, 0);
    156         if (faddr == 0)
    157                 panic("Cannot allocate page for ski console.");
    158 
    159         ddi_parea_init(&ski_parea);
    160         ski_parea.pbase = faddr;
    161         ski_parea.frames = 1;
    162         ski_parea.unpriv = false;
    163         ski_parea.mapped = false;
    164         ddi_parea_register(&ski_parea);
    165 
    166         sysinfo_set_item_val("ski.paddr", NULL, (sysarg_t) faddr);
    167152
    168153        instance = malloc(sizeof(ski_instance_t));
     
    205190static void ski_putwchar(outdev_t *dev, wchar_t ch)
    206191{
    207         if (ski_parea.mapped)
    208                 return;
    209 
    210         if (ascii_check(ch)) {
    211                 if (ch == '\n')
    212                         ski_do_putchar('\r');
    213 
    214                 ski_do_putchar(ch);
    215         } else {
    216                 ski_do_putchar('?');
     192        // TODO FIXME:
     193        // This currently breaks the kernel console
     194        // before we get the override from uspace.
     195        if (console_override) {
     196                if (ascii_check(ch)) {
     197                        if (ch == '\n')
     198                                ski_do_putchar('\r');
     199
     200                        ski_do_putchar(ch);
     201                } else {
     202                        ski_do_putchar('?');
     203                }
    217204        }
    218205}
Note: See TracChangeset for help on using the changeset viewer.