Changeset 30ab05f in mainline for arch/sparc64/src


Ignore:
Timestamp:
2006-02-27T20:33:36Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d87c3f3
Parents:
02f441c0
Message:

sparc64 work.
Very raw and fragile preliminary standalone keyboard support - polling mode only.
Because of a workaround in Simics, the scan codes are the same as on ia32.

Location:
arch/sparc64/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • arch/sparc64/src/console.c

    r02f441c0 r30ab05f  
    3232#include <genarch/fb/fb.h>
    3333#include <arch/drivers/fb.h>
    34 #include <arch/drivers/keyboard.h>
     34#include <arch/drivers/i8042.h>
     35#include <genarch/i8042/i8042.h>
    3536#include <genarch/ofw/ofw.h>
    3637#include <console/chardev.h>
     
    4041#include <proc/thread.h>
    4142#include <synch/mutex.h>
     43
     44#define KEYBOARD_POLL_PAUSE     50000   /* 50ms */
    4245
    4346static void ofw_sparc64_putchar(chardev_t *d, const char ch);
     
    7477        stdin = NULL;
    7578        fb_init(FB_VIRT_ADDRESS, FB_X_RES, FB_Y_RES, FB_COLOR_DEPTH/8);
     79        i8042_init();
    7680}
    7781
     
    156160                        chardev_push_character(&ofw_sparc64_console, ch);
    157161                }
    158                 thread_usleep(25000);
     162                thread_usleep(KEYBOARD_POLL_PAUSE);
    159163        }
    160164}
     165
     166/** Kernel thread for polling keyboard.
     167 *
     168 * @param arg Ignored.
     169 */
     170void kkbdpoll(void *arg)
     171{
     172        while (1) {
     173                i8042_poll();           
     174                thread_usleep(KEYBOARD_POLL_PAUSE);
     175        }
     176}
  • arch/sparc64/src/mm/tlb.c

    r02f441c0 r30ab05f  
    4343
    4444#include <arch/drivers/fb.h>
    45 #include <arch/drivers/keyboard.h>
     45#include <arch/drivers/i8042.h>
    4646
    4747char *context_encoding[] = {
  • arch/sparc64/src/sparc64.c

    r02f441c0 r30ab05f  
    6262                panic("cannot create kofwinput\n");
    6363        thread_ready(t);
     64
     65        /*
     66         * Create thread that polls keyboard.
     67         */
     68        t = thread_create(kkbdpoll, NULL, TASK, 0);
     69        if (!t)
     70                panic("cannot create kkbdpoll\n");
     71        thread_ready(t);
    6472}
    6573
  • arch/sparc64/src/start.S

    r02f441c0 r30ab05f  
    102102        nop
    103103
     104        wrpr %r0, 0, %pil
     105
    104106        call main_bsp
    105107        nop
Note: See TracChangeset for help on using the changeset viewer.