Changeset a8c48241 in mainline


Ignore:
Timestamp:
2005-11-27T21:37:50Z (19 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4a28943
Parents:
f4338d2
Message:

Keyboard support for ski (ia64 emulator)

Location:
arch/ia64
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • arch/ia64/Makefile.inc

    rf4338d2 ra8c48241  
    5757        arch/$(ARCH)/src/fmath.c \
    5858        arch/$(ARCH)/src/mm/frame.c \
    59         arch/$(ARCH)/src/drivers/it.c
     59        arch/$(ARCH)/src/drivers/it.c \
     60        arch/$(ARCH)/src/drivers/keyboard.c
  • arch/ia64/include/ski/ski.h

    rf4338d2 ra8c48241  
    3030#define __SKI_H__
    3131
     32#include <arch/types.h>
     33
     34
    3235#define SKI_INIT_CONSOLE        20
     36#define SKI_GETCHAR             21
    3337#define SKI_PUTCHAR             31
    3438
    3539extern void ski_init_console(void);
    3640extern void ski_putchar(const char ch);
     41extern  __s32 ski_getchar(void);
    3742       
    3843#endif
  • arch/ia64/include/types.h

    rf4338d2 ra8c48241  
    3333
    3434typedef signed char __s8;
     35typedef signed short int __s16;
     36typedef signed int __s32;
     37typedef signed long __s64;
     38
     39
    3540
    3641typedef unsigned char __u8;
  • arch/ia64/src/drivers/it.c

    rf4338d2 ra8c48241  
    3636#include <time/clock.h>
    3737
     38void keyboard(void);
     39
    3840/** Initialize Interval Timer. */
    3941void it_init(void)
     
    6466        srlz_d();                               /* propagate changes */
    6567        clock();
     68        keyboard();
    6669}
  • arch/ia64/src/ia64.c

    rf4338d2 ra8c48241  
    3333#include <arch/barrier.h>
    3434#include <arch/types.h>
     35#include <arch/drivers/keyboard.h>
     36
     37#include <console/console.h>
    3538
    3639void arch_pre_mm_init(void)
     
    4144       
    4245        ski_init_console();
     46        keyboard_init();
    4347        it_init();
    4448}
  • arch/ia64/src/ski/ski.c

    rf4338d2 ra8c48241  
    6565        if (ch == '\n') ski_putchar('\r');
    6666}
     67
     68
     69/** Display character on debug console
     70 *
     71 * Use SSC (Simulator System Call) to
     72 * get character from debug console.
     73 */
     74__s32 ski_getchar(void)
     75{
     76        __u64 ch;
     77       
     78        __asm__ (
     79                "mov r15=%0\n"
     80                "break 0x80000;;\n"     /* modifies r8 */
     81                "mov %1=r8;;\n"         
     82
     83                :
     84                : "i" (SKI_GETCHAR), "r" (ch)
     85                : "r15",  "r8"
     86        );
     87
     88        return (__s32)ch;
     89}
Note: See TracChangeset for help on using the changeset viewer.