Changeset 973be64e in mainline for arch/ia32/src/drivers/ega.c


Ignore:
Timestamp:
2005-12-10T00:19:57Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fcfac420
Parents:
705b4149
Message:

Added generic exc_register/exc_dispatch functions,
copied from ia32 architecture. Currently only mips32 uses them.

The chardev_t can now be both input & output device (was
needed for serial driver).

Broken other architectures - ia64, sparc, powerpc will not compile.

Mips32 supports input on all msim, gxemul, indy(tested emulation
in gxemul, loses characters), simics. Simics serial line
is done using polling, I was unable to make it produce
an interrupt when the key was pressed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/drivers/ega.c

    r705b4149 r973be64e  
    3535#include <arch/asm.h>
    3636#include <memstr.h>
     37#include <console/chardev.h>
     38#include <console/console.h>
    3739
    3840/*
     
    4345static spinlock_t egalock;
    4446static __u32 ega_cursor;
     47
     48static void ega_putchar(chardev_t *d, const char ch);
     49
     50chardev_t ega_console;
     51static chardev_operations_t ega_ops = {
     52        .write = ega_putchar
     53};
    4554
    4655void ega_move_cursor(void);
     
    5665        lo = inb(0x3d5);
    5766        ega_cursor = (hi<<8)|lo;
    58         ega_putchar('\n');
     67
     68        chardev_initialize("ega_out", &ega_console, &ega_ops);
     69        stdout = &ega_console;
     70
     71        putchar('\n');
    5972}
    6073
     
    7992}
    8093
    81 void ega_putchar(const char ch)
     94void ega_putchar(chardev_t *d, const char ch)
    8295{
    8396        ipl_t ipl;
     
    112125        outb(0x3d5,ega_cursor&0xff);   
    113126}
    114 
    115 void putchar(const char ch)
    116 {
    117         ega_putchar(ch);
    118 }
Note: See TracChangeset for help on using the changeset viewer.