Changeset 516ff92 in mainline


Ignore:
Timestamp:
2009-01-31T21:27:18Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4863e50b
Parents:
96a2e45
Message:

silent kernel console output when user space console is active

Files:
18 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/machine.h

    r96a2e45 r516ff92  
    103103
    104104
    105 #ifdef MACHINE_GXEMUL_TESTARM   
    106 #define machine_console_init(devno)           gxemul_console_init(devno)
    107 #define machine_grab_console                  gxemul_grab_console
    108 #define machine_release_console               gxemul_release_console
    109 #define machine_hw_map_init                   gxemul_hw_map_init
    110 #define machine_timer_irq_start               gxemul_timer_irq_start
    111 #define machine_cpu_halt                      gxemul_cpu_halt
    112 #define machine_get_memory_size               gxemul_get_memory_size
    113 #define machine_debug_putc(ch)                gxemul_debug_putc(ch)
    114 #define machine_irq_exception(exc_no, istate) \
    115         gxemul_irq_exception(exc_no, istate)
    116 #define machine_get_fb_address                gxemul_get_fb_address
     105#ifdef MACHINE_GXEMUL_TESTARM
     106        #define machine_console_init(devno)            gxemul_console_init(devno)
     107        #define machine_grab_console                   gxemul_grab_console
     108        #define machine_release_console                gxemul_release_console
     109        #define machine_hw_map_init                    gxemul_hw_map_init
     110        #define machine_timer_irq_start                gxemul_timer_irq_start
     111        #define machine_cpu_halt                       gxemul_cpu_halt
     112        #define machine_get_memory_size                gxemul_get_memory_size
     113        #define machine_debug_putc(ch)                 gxemul_debug_putc(ch)
     114        #define machine_irq_exception(exc_no, istate)  gxemul_irq_exception(exc_no, istate)
     115        #define machine_get_fb_address                 gxemul_get_fb_address
    117116#endif
    118117
  • kernel/arch/arm32/src/drivers/gxemul.c

    r96a2e45 r516ff92  
    134134 * @param ch Characted to be printed.
    135135 */
    136 static void gxemul_write(chardev_t *dev, const char ch)
    137 {
    138         *((char *) gxemul_hw_map.videoram) = ch;
     136static void gxemul_write(chardev_t *dev, const char ch, bool silent)
     137{
     138        if (!silent)
     139                *((char *) gxemul_hw_map.videoram) = ch;
    139140}
    140141
  • kernel/arch/ia32xen/src/drivers/xconsole.c

    r96a2e45 r516ff92  
    5656}
    5757
    58 void xen_putchar(chardev_t *d, const char ch)
     58void xen_putchar(chardev_t *d, const char ch, bool silent)
    5959{
    60         if (start_info.console.domU.evtchn != 0) {
    61                 uint32_t cons = console_page.out_cons;
    62                 uint32_t prod = console_page.out_prod;
    63                
    64                 memory_barrier();
    65                
    66                 if ((prod - cons) > sizeof(console_page.out))
    67                         return;
    68                
    69                 if (ch == '\n')
    70                         console_page.out[MASK_INDEX(prod++, console_page.out)] = '\r';
    71                 console_page.out[MASK_INDEX(prod++, console_page.out)] = ch;
    72                
    73                 write_barrier();
    74                
    75                 console_page.out_prod = prod;
    76                
    77                 xen_notify_remote(start_info.console.domU.evtchn);
    78         } else
    79                 xen_console_io(CONSOLE_IO_WRITE, 1, &ch);
     60        if (!silent) {
     61                if (start_info.console.domU.evtchn != 0) {
     62                        uint32_t cons = console_page.out_cons;
     63                        uint32_t prod = console_page.out_prod;
     64                       
     65                        memory_barrier();
     66                       
     67                        if ((prod - cons) > sizeof(console_page.out))
     68                                return;
     69                       
     70                        if (ch == '\n')
     71                                console_page.out[MASK_INDEX(prod++, console_page.out)] = '\r';
     72                        console_page.out[MASK_INDEX(prod++, console_page.out)] = ch;
     73                       
     74                        write_barrier();
     75                       
     76                        console_page.out_prod = prod;
     77                       
     78                        xen_notify_remote(start_info.console.domU.evtchn);
     79                } else
     80                        xen_console_io(CONSOLE_IO_WRITE, 1, &ch);
     81        }
    8082}
    8183
  • kernel/arch/ia64/src/ia64.c

    r96a2e45 r516ff92  
    255255#else
    256256        i8042_grab();
    257 #endif 
    258 #endif 
     257#endif
     258#endif
    259259}
    260260
  • kernel/arch/ia64/src/ski/ski.c

    r96a2e45 r516ff92  
    5757static bool kbd_disabled;
    5858
    59 static void ski_putchar(chardev_t *d, const char ch);
    60 static int32_t ski_getchar(void);
    61 
    6259/** Display character on debug console
    6360 *
     
    6865 * @param ch Character to be printed.
    6966 */
    70 void ski_putchar(chardev_t *d, const char ch)
    71 {
    72         asm volatile (
    73                 "mov r15 = %0\n"
    74                 "mov r32 = %1\n"        /* r32 is in0 */
    75                 "break 0x80000\n"       /* modifies r8 */
    76                 :
    77                 : "i" (SKI_PUTCHAR), "r" (ch)
    78                 : "r15", "in0", "r8"
    79         );
    80        
    81         if (ch == '\n')
    82                 ski_putchar(d, '\r');
     67static void ski_putchar(chardev_t *d, const char ch, bool silent)
     68{
     69        if (!silent) {
     70                asm volatile (
     71                        "mov r15 = %0\n"
     72                        "mov r32 = %1\n"   /* r32 is in0 */
     73                        "break 0x80000\n"  /* modifies r8 */
     74                        :
     75                        : "i" (SKI_PUTCHAR), "r" (ch)
     76                        : "r15", "in0", "r8"
     77                );
     78               
     79                if (ch == '\n')
     80                        ski_putchar(d, '\r');
     81        }
    8382}
    8483
     
    9291 * @return ASCII code of pressed key or 0 if no key pressed.
    9392 */
    94 int32_t ski_getchar(void)
     93static int32_t ski_getchar(void)
    9594{
    9695        uint64_t ch;
  • kernel/arch/mips32/src/drivers/msim.c

    r96a2e45 r516ff92  
    2727 */
    2828
    29 /** @addtogroup mips32 
     29/** @addtogroup mips32
    3030 * @{
    3131 */
     
    5959
    6060/** Putchar that works with MSIM & gxemul */
    61 void msim_write(chardev_t *dev, const char ch)
     61void msim_write(chardev_t *dev, const char ch, bool silent)
    6262{
    63         *((char *) MSIM_VIDEORAM) = ch;
     63        if (!silent)
     64                *((char *) MSIM_VIDEORAM) = ch;
    6465}
    6566
     
    8182{
    8283        char ch;
    83 
     84       
    8485        while (1) {
    8586                ch = *((volatile char *) MSIM_KBD_ADDRESS);
     
    102103                char ch = 0;
    103104               
    104                         ch = *((char *) MSIM_KBD_ADDRESS);
    105                         if (ch =='\r')
    106                                 ch = '\n';
    107                         if (ch == 0x7f)
    108                                 ch = '\b';
    109                         chardev_push_character(&console, ch);
     105                ch = *((char *) MSIM_KBD_ADDRESS);
     106                if (ch =='\r')
     107                        ch = '\n';
     108                if (ch == 0x7f)
     109                        ch = '\b';
     110                chardev_push_character(&console, ch);
    110111        }
    111112}
  • kernel/arch/mips32/src/drivers/serial.c

    r96a2e45 r516ff92  
    2727 */
    2828
    29 /** @addtogroup mips32 
     29/** @addtogroup mips32
    3030 * @{
    3131 */
     
    4747static bool kb_enabled;
    4848
    49 static void serial_write(chardev_t *d, const char ch)
     49static void serial_write(chardev_t *d, const char ch, bool silent)
    5050{
    51         serial_t *sd = (serial_t *)d->data;
    52 
    53         if (ch == '\n')
    54                 serial_write(d, '\r');
    55         /* Wait until transmit buffer empty */
    56         while (! (SERIAL_READ_LSR(sd->port) & (1<<TRANSMIT_EMPTY_BIT)))
    57                 ;
    58         SERIAL_WRITE(sd->port, ch);
     51        if (!silent) {
     52                serial_t *sd = (serial_t *)d->data;
     53               
     54                if (ch == '\n')
     55                        serial_write(d, '\r');
     56               
     57                /* Wait until transmit buffer empty */
     58                while (!(SERIAL_READ_LSR(sd->port) & (1 << TRANSMIT_EMPTY_BIT)));
     59                SERIAL_WRITE(sd->port, ch);
     60        }
    5961}
    6062
     
    134136{
    135137        serial_t *sd = &sconf[0];
    136 
    137 
     138       
    138139        chardev_initialize("serial_console", &console, &serial_ops);
    139140        console.data = sd;
     
    146147        serial_irq.handler = serial_irq_handler;
    147148        irq_register(&serial_irq);
    148 
     149       
    149150        /* I don't know why, but the serial interrupts simply
    150          * don't work on simics
    151          */
     151           don't work on simics */
    152152        virtual_timer_fnc = &serial_handler;
    153153       
  • kernel/arch/ppc32/src/ppc32.c

    r96a2e45 r516ff92  
    148148       
    149149        /* Unreachable */
    150         for (;;)
    151                 ;
     150        while (true);
    152151}
    153152
  • kernel/arch/sparc64/src/drivers/sgcn.c

    r96a2e45 r516ff92  
    296296 * written straight away.
    297297 */
    298 static void sgcn_putchar(struct chardev * cd, const char c)
    299 {
    300         spinlock_lock(&sgcn_output_lock);
    301        
    302         sgcn_do_putchar(c);
    303         if (c == '\n') {
    304                 sgcn_do_putchar('\r');
     298static void sgcn_putchar(struct chardev * cd, const char c, bool silent)
     299{
     300        if (!silent) {
     301                spinlock_lock(&sgcn_output_lock);
     302               
     303                sgcn_do_putchar(c);
     304                if (c == '\n')
     305                        sgcn_do_putchar('\r');
     306               
     307                spinlock_unlock(&sgcn_output_lock);
    305308        }
    306        
    307         spinlock_unlock(&sgcn_output_lock);
    308309}
    309310
  • kernel/genarch/src/drivers/ega/ega.c

    r96a2e45 r516ff92  
    6363static ioport_t ega_base;
    6464
    65 static void ega_putchar(chardev_t *d, const char ch);
    66 
    6765chardev_t ega_console;
    68 static chardev_operations_t ega_ops = {
    69         .write = ega_putchar
    70 };
    71 
    72 static void ega_move_cursor(void);
    73 
    74 void ega_init(ioport_t base, uintptr_t videoram_phys)
    75 {
    76         /* Initialize the software structure. */       
    77         ega_base = base;
    78 
    79         backbuf = (uint8_t *) malloc(SCREEN * 2, 0);
    80         if (!backbuf)
    81                 panic("Unable to allocate backbuffer.");
    82        
    83         videoram = (uint8_t *) hw_map(videoram_phys, SCREEN * 2);
    84        
    85         /* Clear the screen and set the cursor position. */
    86         memsetw(videoram, SCREEN, 0x0720);
    87         memsetw(backbuf, SCREEN, 0x0720);
    88         ega_move_cursor();
    89 
    90         chardev_initialize("ega_out", &ega_console, &ega_ops);
    91         stdout = &ega_console;
    92        
    93         ega_parea.pbase = videoram_phys;
    94         ega_parea.vbase = (uintptr_t) videoram;
    95         ega_parea.frames = 1;
    96         ega_parea.cacheable = false;
    97         ddi_parea_register(&ega_parea);
    98 
    99         sysinfo_set_item_val("fb", NULL, true);
    100         sysinfo_set_item_val("fb.kind", NULL, 2);
    101         sysinfo_set_item_val("fb.width", NULL, ROW);
    102         sysinfo_set_item_val("fb.height", NULL, ROWS);
    103         sysinfo_set_item_val("fb.blinking", NULL, true);
    104         sysinfo_set_item_val("fb.address.physical", NULL, videoram_phys);
    105 }
    106 
    107 static void ega_display_char(char ch)
    108 {
    109         videoram[ega_cursor * 2] = ch;
    110         backbuf[ega_cursor * 2] = ch;
    111 }
    11266
    11367/*
     
    12882}
    12983
    130 void ega_putchar(chardev_t *d __attribute__((unused)), const char ch)
     84static void ega_move_cursor(void)
     85{
     86        outb(ega_base + EGA_INDEX_REG, 0xe);
     87        outb(ega_base + EGA_DATA_REG, (uint8_t) ((ega_cursor >> 8) & 0xff));
     88        outb(ega_base + EGA_INDEX_REG, 0xf);
     89        outb(ega_base + EGA_DATA_REG, (uint8_t) (ega_cursor & 0xff));   
     90}
     91
     92static void ega_display_char(char ch, bool silent)
     93{
     94        backbuf[ega_cursor * 2] = ch;
     95       
     96        if (!silent)
     97                videoram[ega_cursor * 2] = ch;
     98}
     99
     100static void ega_putchar(chardev_t *d __attribute__((unused)), const char ch, bool silent)
    131101{
    132102        ipl_t ipl;
    133 
     103       
    134104        ipl = interrupts_disable();
    135105        spinlock_lock(&egalock);
    136 
     106       
    137107        switch (ch) {
    138108        case '\n':
     
    147117                break;
    148118        default:
    149                 ega_display_char(ch);
     119                ega_display_char(ch, silent);
    150120                ega_cursor++;
    151121                break;
    152122        }
    153123        ega_check_cursor();
    154         ega_move_cursor();
    155 
     124       
     125        if (!silent)
     126                ega_move_cursor();
     127       
    156128        spinlock_unlock(&egalock);
    157129        interrupts_restore(ipl);
    158130}
    159131
    160 void ega_move_cursor(void)
     132static chardev_operations_t ega_ops = {
     133        .write = ega_putchar
     134};
     135
     136void ega_init(ioport_t base, uintptr_t videoram_phys)
    161137{
    162         outb(ega_base + EGA_INDEX_REG, 0xe);
    163         outb(ega_base + EGA_DATA_REG, (uint8_t) ((ega_cursor >> 8) & 0xff));
    164         outb(ega_base + EGA_INDEX_REG, 0xf);
    165         outb(ega_base + EGA_DATA_REG, (uint8_t) (ega_cursor & 0xff));   
     138        /* Initialize the software structure. */       
     139        ega_base = base;
     140       
     141        backbuf = (uint8_t *) malloc(SCREEN * 2, 0);
     142        if (!backbuf)
     143                panic("Unable to allocate backbuffer.");
     144       
     145        videoram = (uint8_t *) hw_map(videoram_phys, SCREEN * 2);
     146       
     147        /* Clear the screen and set the cursor position. */
     148        memsetw(videoram, SCREEN, 0x0720);
     149        memsetw(backbuf, SCREEN, 0x0720);
     150        ega_move_cursor();
     151       
     152        chardev_initialize("ega_out", &ega_console, &ega_ops);
     153        stdout = &ega_console;
     154       
     155        ega_parea.pbase = videoram_phys;
     156        ega_parea.vbase = (uintptr_t) videoram;
     157        ega_parea.frames = 1;
     158        ega_parea.cacheable = false;
     159        ddi_parea_register(&ega_parea);
     160       
     161        sysinfo_set_item_val("fb", NULL, true);
     162        sysinfo_set_item_val("fb.kind", NULL, 2);
     163        sysinfo_set_item_val("fb.width", NULL, ROW);
     164        sysinfo_set_item_val("fb.height", NULL, ROWS);
     165        sysinfo_set_item_val("fb.blinking", NULL, true);
     166        sysinfo_set_item_val("fb.address.physical", NULL, videoram_phys);
    166167}
    167168
  • kernel/genarch/src/fb/fb.c

    r96a2e45 r516ff92  
    185185 *
    186186 */
    187 static void logo_hide(void)
     187static void logo_hide(bool silent)
    188188{
    189189        ylogo = 0;
    190190        ytrim = yres;
    191191        rowtrim = rows;
    192         fb_redraw();
     192        if (!silent)
     193                fb_redraw();
    193194}
    194195
     
    197198 *
    198199 */
    199 static void glyph_draw(uint8_t glyph, unsigned int col, unsigned int row)
     200static void glyph_draw(uint8_t glyph, unsigned int col, unsigned int row, bool silent)
    200201{
    201202        unsigned int x = COL2X(col);
     
    204205       
    205206        if (y >= ytrim)
    206                 logo_hide();
     207                logo_hide(silent);
    207208       
    208209        backbuf[BB_POS(col, row)] = glyph;
    209210       
    210         for (yd = 0; yd < FONT_SCANLINES; yd++)
    211                 memcpy(&fb_addr[FB_POS(x, y + yd + ylogo)],
    212                     &glyphs[GLYPH_POS(glyph, yd)], glyphscanline);
     211        if (!silent) {
     212                for (yd = 0; yd < FONT_SCANLINES; yd++)
     213                        memcpy(&fb_addr[FB_POS(x, y + yd + ylogo)],
     214                            &glyphs[GLYPH_POS(glyph, yd)], glyphscanline);
     215        }
    213216}
    214217
     
    218221 *
    219222 */
    220 static void screen_scroll(void)
     223static void screen_scroll(bool silent)
    221224{
    222225        if (ylogo > 0) {
    223                 logo_hide();
     226                logo_hide(silent);
    224227                return;
    225228        }
    226229       
    227         unsigned int row;
    228        
    229         for (row = 0; row < rows; row++) {
    230                 unsigned int y = ROW2Y(row);
    231                 unsigned int yd;
     230        if (!silent) {
     231                unsigned int row;
    232232               
    233                 for (yd = 0; yd < FONT_SCANLINES; yd++) {
    234                         unsigned int x;
    235                         unsigned int col;
     233                for (row = 0; row < rows; row++) {
     234                        unsigned int y = ROW2Y(row);
     235                        unsigned int yd;
    236236                       
    237                         for (col = 0, x = 0; col < cols; col++,
    238                             x += FONT_WIDTH) {
    239                                 uint8_t glyph;
     237                        for (yd = 0; yd < FONT_SCANLINES; yd++) {
     238                                unsigned int x;
     239                                unsigned int col;
    240240                               
    241                                 if (row < rows - 1) {
    242                                         if (backbuf[BB_POS(col, row)] ==
    243                                             backbuf[BB_POS(col, row + 1)])
    244                                                 continue;
     241                                for (col = 0, x = 0; col < cols; col++,
     242                                    x += FONT_WIDTH) {
     243                                        uint8_t glyph;
    245244                                       
    246                                         glyph = backbuf[BB_POS(col, row + 1)];
    247                                 } else
    248                                         glyph = 0;
    249                                
    250                                 memcpy(&fb_addr[FB_POS(x, y + yd)],
    251                                     &glyphs[GLYPH_POS(glyph, yd)],
    252                                     glyphscanline);
     245                                        if (row < rows - 1) {
     246                                                if (backbuf[BB_POS(col, row)] ==
     247                                                    backbuf[BB_POS(col, row + 1)])
     248                                                        continue;
     249                                               
     250                                                glyph = backbuf[BB_POS(col, row + 1)];
     251                                        } else
     252                                                glyph = 0;
     253                                       
     254                                        memcpy(&fb_addr[FB_POS(x, y + yd)],
     255                                            &glyphs[GLYPH_POS(glyph, yd)],
     256                                            glyphscanline);
     257                                }
    253258                        }
    254259                }
     
    260265
    261266
    262 static void cursor_put(void)
    263 {
    264         glyph_draw(CURSOR, position % cols, position / cols);
    265 }
    266 
    267 
    268 static void cursor_remove(void)
    269 {
    270         glyph_draw(0, position % cols, position / cols);
     267static void cursor_put(bool silent)
     268{
     269        glyph_draw(CURSOR, position % cols, position / cols, silent);
     270}
     271
     272
     273static void cursor_remove(bool silent)
     274{
     275        glyph_draw(0, position % cols, position / cols, silent);
    271276}
    272277
     
    277282 *
    278283 */
    279 static void fb_putchar(chardev_t *dev, char ch)
     284static void fb_putchar(chardev_t *dev, char ch, bool silent)
    280285{
    281286        spinlock_lock(&fb_lock);
     
    283288        switch (ch) {
    284289        case '\n':
    285                 cursor_remove();
     290                cursor_remove(silent);
    286291                position += cols;
    287292                position -= position % cols;
    288293                break;
    289294        case '\r':
    290                 cursor_remove();
     295                cursor_remove(silent);
    291296                position -= position % cols;
    292297                break;
    293298        case '\b':
    294                 cursor_remove();
     299                cursor_remove(silent);
    295300                if (position % cols)
    296301                        position--;
    297302                break;
    298303        case '\t':
    299                 cursor_remove();
     304                cursor_remove(silent);
    300305                do {
    301306                        glyph_draw((uint8_t) ' ', position % cols,
    302                             position / cols);
     307                            position / cols, silent);
    303308                        position++;
    304309                } while ((position % 8) && (position < cols * rows));
    305310                break;
    306311        default:
    307                 glyph_draw((uint8_t) ch, position % cols, position / cols);
     312                glyph_draw((uint8_t) ch, position % cols,
     313                    position / cols, silent);
    308314                position++;
    309315        }
     
    311317        if (position >= cols * rows) {
    312318                position -= cols;
    313                 screen_scroll();
    314         }
    315        
    316         cursor_put();
     319                screen_scroll(silent);
     320        }
     321       
     322        cursor_put(silent);
    317323       
    318324        spinlock_unlock(&fb_lock);
  • kernel/generic/include/console/chardev.h

    r96a2e45 r516ff92  
    5151        void (* resume)(struct chardev *);
    5252        /** Write character to stream. */
    53         void (* write)(struct chardev *, char c);
     53        void (* write)(struct chardev *, char c, bool silent);
    5454        /** Read character directly from device, assume interrupts disabled. */
    5555        char (* read)(struct chardev *);
  • kernel/generic/include/console/console.h

    r96a2e45 r516ff92  
    5050extern void putchar(char c);
    5151
     52extern void grab_console(void);
     53extern void release_console(void);
     54
    5255extern void arch_grab_console(void);
    5356extern void arch_release_console(void);
  • kernel/generic/include/syscall/syscall.h

    r96a2e45 r516ff92  
    8080       
    8181        SYS_DEBUG_ENABLE_CONSOLE,
     82        SYS_DEBUG_DISABLE_CONSOLE,
    8283        SYS_IPC_CONNECT_KBOX,
    8384        SYSCALL_END
  • kernel/generic/src/console/cmd.c

    r96a2e45 r516ff92  
    977977{
    978978        printf("The kernel will now relinquish the console.\n");
    979         arch_release_console();
     979        release_console();
    980980       
    981981        if ((kconsole_notify) && (kconsole_irq.notif_cfg.notify))
  • kernel/generic/src/console/console.c

    r96a2e45 r516ff92  
    6666static size_t klog_uspace = 0;
    6767
     68/**< Silent output */
     69static bool silent = false;
     70
    6871/**< Kernel log spinlock */
    6972SPINLOCK_INITIALIZE(klog_lock);
     
    7174/** Physical memory area used for klog buffer */
    7275static parea_t klog_parea;
    73        
     76
    7477/*
    7578 * For now, we use 0 as INR.
     
    143146        klog_inited = true;
    144147        spinlock_unlock(&klog_lock);
     148}
     149
     150void grab_console(void)
     151{
     152        silent = false;
     153        arch_grab_console();
     154}
     155
     156void release_console(void)
     157{
     158        silent = true;
     159        arch_release_console();
    145160}
    146161
     
    200215        index_t index = 0;
    201216        char ch;
    202 
     217       
    203218        while (index < buflen) {
    204219                ch = _getc(chardev);
     
    214229                }
    215230                putchar(ch);
    216 
     231               
    217232                if (ch == '\n') { /* end of string => write 0, return */
    218233                        buf[index] = '\0';
     
    254269                index_t i;
    255270                for (i = klog_len - klog_stored; i < klog_len; i++)
    256                         stdout->op->write(stdout, klog[(klog_start + i) % KLOG_SIZE]);
     271                        stdout->op->write(stdout, klog[(klog_start + i) % KLOG_SIZE], silent);
    257272                klog_stored = 0;
    258273        }
     
    266281       
    267282        if (stdout->op->write)
    268                 stdout->op->write(stdout, c);
     283                stdout->op->write(stdout, c, silent);
    269284        else {
    270285                /* The character is just in the kernel log */
  • kernel/generic/src/syscall/syscall.c

    r96a2e45 r516ff92  
    9393{
    9494#ifdef CONFIG_KCONSOLE
    95         arch_grab_console();
     95        grab_console();
    9696        return true;
    9797#else
    9898        return false;
    9999#endif
     100}
     101
     102/** Tell kernel to relinquish keyboard/console access */
     103static unative_t sys_debug_disable_console(void)
     104{
     105        release_console();
     106        return true;
    100107}
    101108
     
    185192        /* Debug calls */
    186193        (syshandler_t) sys_debug_enable_console,
    187 
     194        (syshandler_t) sys_debug_disable_console,
     195       
    188196        (syshandler_t) sys_ipc_connect_kbox
    189197};
  • uspace/srv/console/console.c

    r96a2e45 r516ff92  
    501501       
    502502        /* Connect to keyboard driver */
    503        
    504503        kbd_phone = ipc_connect_me_to(PHONE_NS, SERVICE_KEYBOARD, 0, 0);
    505504        while (kbd_phone < 0) {
     
    518517                fb_info.phone = ipc_connect_me_to(PHONE_NS, SERVICE_VIDEO, 0, 0);
    519518        }
     519       
     520        /* Disable kernel output to the console */
     521        __SYSCALL0(SYS_DEBUG_DISABLE_CONSOLE);
    520522       
    521523        /* Initialize gcons */
     
    588590        return 0;
    589591}
    590  
     592
    591593/** @}
    592594 */
Note: See TracChangeset for help on using the changeset viewer.