12
12
13
13
#include <linuxmt/types.h>
14
14
#include <linuxmt/config.h>
15
- #include <linuxmt/errno.h>
16
- #include <linuxmt/fcntl.h>
17
- #include <linuxmt/fs.h>
18
- #include <linuxmt/kernel.h>
19
- #include <linuxmt/major.h>
20
15
#include <linuxmt/mm.h>
21
- #include <linuxmt/timer.h>
22
- #include <linuxmt/sched.h>
23
16
#include <linuxmt/chqueue.h>
24
17
#include <linuxmt/ntty.h>
25
- #include <arch/io.h>
26
- #include <arch/segment.h>
27
18
#include "console.h"
28
19
#include "bioscon-asm.h"
29
20
@@ -71,7 +62,6 @@ static Console Con[MAX_CONSOLES], *Visible;
71
62
static Console * glock ; /* Which console owns the graphics hardware */
72
63
static int Width , MaxCol , Height , MaxRow ;
73
64
static unsigned short int NumConsoles = MAX_CONSOLES ;
74
- static struct timer_list timer ;
75
65
static int kraw ;
76
66
static int Current_VCminor = 0 ;
77
67
@@ -85,69 +75,6 @@ static int Current_VCminor = 0;
85
75
86
76
static void std_char (register Console * , char );
87
77
88
- static void kbd_timer (int data );
89
- /*
90
- * Restart timer
91
- */
92
- static void restart_timer (void )
93
- {
94
- init_timer (& timer );
95
- timer .tl_expires = jiffies + 8 ;
96
- timer .tl_function = kbd_timer ;
97
- add_timer (& timer );
98
- }
99
-
100
- /*
101
- * Bios Keyboard Decoder
102
- */
103
- static void kbd_timer (int data )
104
- {
105
- int dav , extra = 0 ;
106
-
107
- if ((dav = bios_kbd_poll ())) {
108
- if (dav & 0xFF )
109
- Console_conin (dav & 0x7F );
110
- else {
111
- dav = (dav >> 8 ) & 0xFF ;
112
- if (dav >= 0x3B && dav <= 0x3D ) { /* temp console switch on F1-F3*/
113
- Console_set_vc (dav - 0x3B );
114
- dav = 0 ;
115
- }
116
- else if ((dav >= 0x68 ) && (dav < 0x6B )) { /* Change VC */
117
- Console_set_vc ((unsigned )(dav - 0x68 ));
118
- dav = 0 ;
119
- }
120
- else if (dav >= 0x3B && dav < 0x45 ) /* Function keys */
121
- dav = dav - 0x3B + 'a' ;
122
- else {
123
- switch (dav ) {
124
- case 0x48 : dav = 'A' ; break ; /* up*/
125
- case 0x50 : dav = 'B' ; break ; /* down*/
126
- case 0x4d : dav = 'C' ; break ; /* right*/
127
- case 0x4b : dav = 'D' ; break ; /* left*/
128
- case 0x47 : dav = 'H' ; break ; /* home*/
129
- case 0x4f : dav = 'F' ; break ; /* end*/
130
- case 0x49 : dav = '5' ; extra = '~' ; break ; /* pgup*/
131
- case 0x51 : dav = '6' ; extra = '~' ; break ; /* pgdn*/
132
- default : dav = 0 ;
133
- }
134
- }
135
- if (dav ) {
136
- Console_conin (ESC );
137
- #ifdef CONFIG_EMUL_ANSI
138
- Console_conin ('[' );
139
- #endif
140
- Console_conin (dav );
141
- #ifdef CONFIG_EMUL_ANSI
142
- if (extra )
143
- Console_conin (extra );
144
- #endif
145
- }
146
- }
147
- }
148
- restart_timer ();
149
- }
150
-
151
78
static void PositionCursor (register Console * C )
152
79
{
153
80
int x , y , p ;
@@ -276,8 +203,7 @@ void console_init(void)
276
203
C ++ ;
277
204
}
278
205
279
- enable_irq (1 ); /* enable BIOS Keyboard interrupts */
280
- restart_timer ();
206
+ kbd_init ();
281
207
282
208
printk ("BIOS console %ux%u" TERM_TYPE "(%u virtual consoles)\n" ,
283
209
Width , Height , NumConsoles );
0 commit comments