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

Changeset 8e33e1d in mainline


Ignore:
Timestamp:
2010-01-29T17:15:32Z (10 years ago)
Author:
Pavel Rimsky <pavel@…>
Branches:
master
Children:
b86d436
Parents:
86018c1
Message:

Cleanup.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/niagara.c

    r86018c1 r8e33e1d  
    5252#include <genarch/srln/srln.h>
    5353
     54/* polling interval in miliseconds */
    5455#define POLL_INTERVAL  10000
    5556
     57/* device instance */
    5658static niagara_instance_t *instance = NULL;
    5759
     
    124126static void niagara_poll(niagara_instance_t *instance)
    125127{
     128        /* print any pending characters from the shared buffer to the console */
    126129        while (output_buffer.read_ptr != output_buffer.write_ptr) {
    127130                do_putchar(output_buffer.data[output_buffer.read_ptr]);
     
    132135        uint64_t c;
    133136
     137        /* read character from keyboard, send it to upper layers of HelenOS */
    134138        if (__hypercall_fast_ret1(0, 0, 0, 0, 0, CONS_GETCHAR, &c) == EOK) {
    135139                if (!silent) {
     140                        /* kconsole active, send the character to kernel */
    136141                        indev_push_character(instance->srlnin, c);
    137142                } else {
     143                        /* kconsole inactive, send the character to uspace driver */
    138144                        input_buffer.data[input_buffer.write_ptr] = (char) c;
    139145                        input_buffer.write_ptr =
     
    141147                }
    142148        }
    143 
    144149}
    145150
     
    177182
    178183        instance->srlnin = NULL;
    179         sysinfo_set_item_val("fb.kind", NULL, 5);
     184
     185        output_buffer.read_ptr = 0;
     186        output_buffer.write_ptr = 0;
     187        input_buffer.write_ptr = 0;
     188        input_buffer.read_ptr = 0;
    180189
    181190        /*
     
    184193         * buffers.
    185194         */
    186         output_buffer.read_ptr = 0;
    187         output_buffer.write_ptr = 0;
    188         input_buffer.write_ptr = 0;
    189         input_buffer.read_ptr = 0;
     195
     196        sysinfo_set_item_val("fb.kind", NULL, 5);
    190197
    191198        sysinfo_set_item_val("niagara.outbuf.address", NULL,
  • uspace/app/init/init.c

    r86018c1 r8e33e1d  
    263263        }
    264264       
    265         //spawn("/srv/fhc");
    266         //spawn("/srv/obio");
    267         //srv_start("/srv/i8042");
    268         //srv_start("/srv/c_mouse");
     265        spawn("/srv/fhc");
     266        spawn("/srv/obio");
     267        srv_start("/srv/i8042");
     268        srv_start("/srv/c_mouse");
    269269
    270270        spawn("/srv/fb");
  • uspace/lib/libc/arch/sparc64/src/thread_entry.s

    r86018c1 r8e33e1d  
    3939        #
    4040
    41         # MH
    4241        #save %sp, -176, %sp
    4342        #flushw
  • uspace/lib/libc/generic/thread.c

    r86018c1 r8e33e1d  
    4141#include <string.h>
    4242#include <async.h>
    43 #include <stdio.h>
    4443
    4544#ifndef THREAD_INITIAL_STACK_PAGES_NO
     
    6362        __tcb_set(f->tcb);
    6463
    65         // MH
    66         printf("uarg: %lx\n", uarg);
    6764        uarg->uspace_thread_function(uarg->uspace_thread_arg);
    6865        /* XXX: we cannot free the userspace stack while running on it */
  • uspace/srv/hid/kbd/generic/kbd.c

    r86018c1 r8e33e1d  
    219219                cir_service = SERVICE_OBIO;
    220220       
    221 /*
    222221        if (cir_service) {
    223222                while (cir_phone < 0) {
     
    226225                }
    227226        }
    228 */
    229 printf("KBD driver!!!\n");
    230227       
    231228        /* Initialize port driver. */
  • uspace/srv/hid/kbd/port/niagara.c

    r86018c1 r8e33e1d  
    6767        *input_buffer_t;
    6868
     69/* virtual address of the shared buffer */
    6970input_buffer_t input_buffer;
    7071
     
    7374
    7475/**
    75  * Initializes the SGCN driver.
    76  * Maps the physical memory (SRAM) and creates the polling thread.
     76 * Initializes the Niagara driver.
     77 * Maps the shared buffer and creates the polling thread.
    7778 */
    7879int kbd_port_init(void)
     
    117118
    118119/**
    119  * Handler of the "key pressed" event. Reads codes of all the pressed keys from
    120  * the buffer.
     120 * Called regularly by the polling thread. Reads codes of all the
     121 * pressed keys from the buffer.
    121122 */
    122123static void niagara_key_pressed(void)
Note: See TracChangeset for help on using the changeset viewer.