Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/drivers/pl011/pl011.c

    r6404aca r84176f3  
    6060        pl011_uart_t *uart = dev->data;
    6161
    62         if (!ascii_check(ch)) {
     62        /* If the userspace owns the console, do not output anything. */
     63        if (uart->parea.mapped && !console_override)
     64                return;
     65
     66        if (!ascii_check(ch))
    6367                pl011_uart_sendb(uart, U_SPECIAL);
    64         } else {
     68        else {
    6569                if (ch == '\n')
    6670                        pl011_uart_sendb(uart, (uint8_t) '\r');
     
    100104        assert(uart);
    101105        uart->regs = (void *)km_map(addr, sizeof(pl011_uart_regs_t),
    102             KM_NATURAL_ALIGNMENT, PAGE_NOT_CACHEABLE);
     106            KM_NATURAL_ALIGNMENT, PAGE_WRITE | PAGE_NOT_CACHEABLE);
    103107        assert(uart->regs);
    104108
     
    131135        uart->irq.instance = uart;
    132136
     137        ddi_parea_init(&uart->parea);
     138        uart->parea.pbase = addr;
     139        uart->parea.frames = 1;
     140        uart->parea.unpriv = false;
     141        uart->parea.mapped = false;
     142        ddi_parea_register(&uart->parea);
     143
    133144        return true;
    134145}
Note: See TracChangeset for help on using the changeset viewer.