#include "../drivers.h"#include <termios.h>#include <sys/ioctl.h>#include <sys/vm.h>#include <minix/callnr.h>#include <minix/com.h>#include "tty.h"#include "../../kernel/const.h"#include "../../kernel/config.h"#include "../../kernel/type.h"Include dependency graph for console.c:

Go to the source code of this file.
Data Structures | |
| struct | console |
| struct | sequence |
Defines | |
| #define | MONO_BASE 0xB0000L |
| #define | COLOR_BASE 0xB8000L |
| #define | MONO_SIZE 0x1000 |
| #define | COLOR_SIZE 0x4000 |
| #define | EGA_SIZE 0x8000 |
| #define | BLANK_COLOR 0x0700 |
| #define | SCROLL_UP 0 |
| #define | SCROLL_DOWN 1 |
| #define | BLANK_MEM ((u16_t *) 0) |
| #define | CONS_RAM_WORDS 80 |
| #define | MAX_ESC_PARMS 4 |
| #define | M_6845 0x3B4 |
| #define | C_6845 0x3D4 |
| #define | INDEX 0 |
| #define | DATA 1 |
| #define | STATUS 6 |
| #define | VID_ORG 12 |
| #define | CURSOR 14 |
| #define | TIMER_FREQ 1193182L |
| #define | BEEP_FREQ 0x0533 |
| #define | B_TIME 3 |
| #define | GA_SEQUENCER_INDEX 0x3C4 |
| #define | GA_SEQUENCER_DATA 0x3C5 |
| #define | GA_GRAPHICS_INDEX 0x3CE |
| #define | GA_GRAPHICS_DATA 0x3CF |
| #define | GA_VIDEO_ADDRESS 0xA0000L |
| #define | GA_FONT_SIZE 8192 |
| #define | color (vid_port == C_6845) |
| #define | COM1_BASE 0x3F8 |
| #define | COM1_THR (COM1_BASE + 0) |
| #define | LSR_THRE 0x20 |
| #define | COM1_LSR (COM1_BASE + 5) |
Typedefs | |
| typedef console | console_t |
Functions | |
| FORWARD | _PROTOTYPE (int cons_write,(struct tty *tp, int try)) |
| FORWARD | _PROTOTYPE (void cons_echo,(tty_t *tp, int c)) |
| FORWARD | _PROTOTYPE (void out_char,(console_t *cons, int c)) |
| FORWARD | _PROTOTYPE (void cons_putk,(int c)) |
| FORWARD | _PROTOTYPE (void beep,(void)) |
| FORWARD | _PROTOTYPE (void flush,(console_t *cons)) |
| FORWARD | _PROTOTYPE (void scroll_screen,(console_t *cons, int dir)) |
| FORWARD | _PROTOTYPE (void set_6845,(int reg, unsigned val)) |
| FORWARD | _PROTOTYPE (void get_6845,(int reg, unsigned *val)) |
| FORWARD | _PROTOTYPE (void stop_beep,(timer_t *tmrp)) |
| FORWARD | _PROTOTYPE (int ga_program,(struct sequence *seq)) |
| FORWARD | _PROTOTYPE (int cons_ioctl,(tty_t *tp, int)) |
| PRIVATE | _PROTOTYPE (void ser_putc,(char c)) |
| PRIVATE int | cons_write (struct tty *tp, int try) |
| PRIVATE void | cons_echo (tty_t *tp, int c) |
| PRIVATE void | out_char (console_t *cons, int c) |
| PRIVATE void | scroll_screen (console_t *cons, int dir) |
| PRIVATE void | flush (console_t *cons) |
| PRIVATE void | parse_escape (console_t *cons, char c) |
| PRIVATE void | do_escape (console_t *cons, char c) |
| PRIVATE void | set_6845 (int reg, unsigned val) |
| PRIVATE void | get_6845 (int reg, unsigned *val) |
| PRIVATE void | beep () |
| PUBLIC void | do_video (message *m) |
| PUBLIC void | beep_x (unsigned freq, clock_t dur) |
| PRIVATE void | stop_beep (timer_t *tmrp) |
| PUBLIC void | scr_init (tty_t *tp) |
| PUBLIC void | kputc (int c) |
| PUBLIC void | do_new_kmess (message *m) |
| PUBLIC void | do_diagnostics (message *m_ptr) |
| PUBLIC void | do_get_kmess (message *m_ptr) |
| PRIVATE void | cons_putk (int c) |
| PUBLIC void | toggle_scroll () |
| PUBLIC void | cons_stop () |
| PRIVATE void | cons_org0 () |
| PUBLIC void | select_console (int cons_line) |
| PUBLIC int | con_loadfont (message *m) |
| PRIVATE int | ga_program (struct sequence *seq) |
| PRIVATE int | cons_ioctl (tty_t *tp, int try) |
| PRIVATE void | ser_putc (char c) |
Variables | |
| PUBLIC int | vid_index |
| PUBLIC u16_t | vid_seg |
| PUBLIC vir_bytes | vid_off |
| PUBLIC unsigned | vid_size |
| PUBLIC unsigned | vid_mask |
| PUBLIC unsigned | blank_color = BLANK_COLOR |
| PRIVATE int | vid_port |
| PRIVATE int | wrap |
| PRIVATE int | softscroll |
| PRIVATE int | beeping |
| PRIVATE unsigned | font_lines |
| PRIVATE unsigned | scr_width |
| PRIVATE unsigned | scr_lines |
| PRIVATE unsigned | scr_size |
| PRIVATE int | nr_cons = 1 |
| PRIVATE console_t | cons_table [NR_CONS] |
| PRIVATE console_t * | curcons |
| PRIVATE int | ansi_colors [8] = {0, 4, 2, 6, 1, 5, 3, 7} |
|
|
Definition at line 58 of file console.c. Referenced by beep(). |
|
|
Definition at line 57 of file console.c. Referenced by beep(). |
|
|
Definition at line 37 of file console.c. Referenced by cons_stop(), do_escape(), and scr_init(). |
|
|
Definition at line 40 of file console.c. Referenced by do_escape(), scr_init(), and scroll_screen(). |
|
|
|
|
|
Definition at line 111 of file console.c. Referenced by con_loadfont(), do_escape(), and scr_init(). |
|
|
|
|
|
Definition at line 35 of file console.c. Referenced by scr_init(). |
|
|
|
|
|
Definition at line 1254 of file console.c. Referenced by ser_putc(). |
|
|
Definition at line 1252 of file console.c. Referenced by ser_putc(). |
|
|
|
|
|
|
|
|
Definition at line 48 of file console.c. Referenced by add(), get_6845(), set_6845(), and slave(). |
|
|
Definition at line 36 of file console.c. Referenced by scr_init(). |
|
|
Definition at line 66 of file console.c. Referenced by con_loadfont(). |
|
|
|
|
|
Definition at line 63 of file console.c. Referenced by con_loadfont(). |
|
|
|
|
|
Definition at line 61 of file console.c. Referenced by con_loadfont(). |
|
|
Definition at line 65 of file console.c. Referenced by con_loadfont(). |
|
|
|
|
|
Definition at line 1253 of file console.c. Referenced by ser_putc(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 34 of file console.c. Referenced by scr_init(). |
|
|
Definition at line 39 of file console.c. Referenced by do_escape(). |
|
|
Definition at line 38 of file console.c. Referenced by out_char(), scr_init(), and scroll_screen(). |
|
|
Definition at line 49 of file console.c. Referenced by c_complete(), emacs(), insert_char(), and last_argument(). |
|
|
Definition at line 54 of file console.c. Referenced by beep_x(). |
|
|
Definition at line 50 of file console.c. Referenced by scroll_screen(), and select_console(). |
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
Definition at line 739 of file console.c. References B_TIME, BEEP_FREQ, beeping, BYTE, getuptime(), now, NULL, OK, panic, PORT_B, pv_set, s, sys_inb, sys_outb, sys_setalarm(), sys_voutb(), TIMER2, TIMER_MODE, timer::tmr_exp_time, tmrs_settimer(), TRUE, tty_next_timeout, and tty_timers. |
|
||||||||||||
|
Definition at line 833 of file console.c. References beeping, BYTE, getuptime(), now, NULL, OK, panic, PORT_B, pv_set, s, sys_inb, sys_outb, sys_setalarm(), sys_voutb(), TIMER2, TIMER_FREQ, TIMER_MODE, timer::tmr_exp_time, tmrs_settimer(), TRUE, tty_next_timeout, and tty_timers. Referenced by handle_req(). |
|
|
Definition at line 1183 of file console.c. References color, D, ENOTTY, GA_FONT_SIZE, GA_GRAPHICS_INDEX, ga_program(), GA_SEQUENCER_INDEX, GA_VIDEO_ADDRESS, NONE, PHYS_SEG, result, sys_physcopy(), and sequence::value. Referenced by do_ioctl(). |
|
||||||||||||
|
Definition at line 212 of file console.c. References cons(), flush, and out_char(). |
|
||||||||||||
|
Definition at line 1239 of file console.c. References font_lines, scr_lines, and scr_width. Referenced by scr_init(). |
|
|
Definition at line 1145 of file console.c. References cons(), cons_table, if(), n, nr_cons, scr_size, and vid_size. Referenced by cons_stop(), and toggle_scroll(). |
|
|
Definition at line 1105 of file console.c. References cons_table, flush, and out_char(). Referenced by do_diagnostics(), do_new_kmess(), and kputc(). |
|
|
Definition at line 1133 of file console.c. References BLANK_COLOR, console::c_attr, console::c_blank, cons_org0(), cons_table, select_console(), and softscroll. Referenced by main(). |
|
||||||||||||
|
Definition at line 143 of file console.c. References buflen, BYTE, cons(), count, D, flush, OK, out_char(), result, scr_width, SELF, sys_vircopy(), and tty_reply(). |
|
|
Definition at line 1058 of file console.c. References c, cons_putk(), count, D, EFAULT, OK, proc_nr, result, SELF, send, and sys_vircopy(). |
|
||||||||||||
|
Definition at line 459 of file console.c. References ansi_colors, BLANK_COLOR, blank_color, BLANK_MEM, bufend, color, count, FALSE, flush, n, scr_lines, scr_size, scr_width, SCROLL_DOWN, scroll_screen(), and TRUE. Referenced by parse_escape(). |
|
|
Definition at line 1085 of file console.c. References D, EFAULT, if(), kmess, OK, r, SELF, send, and sys_vircopy(). Referenced by main(). |
|
|
Definition at line 1009 of file console.c. References bytes, cons_putk(), kmessages::km_buf, kmessages::km_next, kmessages::km_size, kmess, KMESS_BUF_SIZE, next, OK, printf, r, size, and sys_getkmessages. |
|
|
Definition at line 778 of file console.c. References c, D, DEV_CLOSE, DEV_IOCTL, DEV_OPEN, EINVAL, ENOTTY, i, m, MIOCMAP, MIOCUNMAP, n, OK, ops, printf, r, SELF, sys_vircopy(), sys_vm_map(), TASK_REPLY, and tty_reply(). Referenced by main(). |
|
|
Definition at line 366 of file console.c. References curcons, CURSOR, scr_lines, scr_width, set_6845(), tp, and TRUE. |
|
|
Definition at line 1223 of file console.c. References i, pvb_pair_t::port, pv_set, and pvb_pair_t::value. Referenced by con_loadfont(). |
|
||||||||||||
|
|
|
|
Definition at line 983 of file console.c. References cons_putk(), kmessages::km_buf, kmessages::km_next, kmessages::km_size, kmess, KMESS_BUF_SIZE, LOG_PROC_NR, notify, panicing, and ser_putc(). |
|
||||||||||||
|
Definition at line 226 of file console.c. References beep(), buflen, BYTE, flush, LINEWRAP, OPOST, parse_escape(), scr_lines, scr_width, scroll_screen(), SCROLL_UP, TAB_MASK, and TAB_SIZE. |
|
||||||||||||
|
Definition at line 400 of file console.c. References bufend, and do_escape(). Referenced by out_char(). |
|
|
Definition at line 890 of file console.c. References BIOS_SEG, blank_color, BLANK_COLOR, BLANK_MEM, color, COLOR_BASE, COLOR_SIZE, cons(), cons_ioctl(), cons_table, D, EGA_SIZE, font_lines, i, MONO_BASE, MONO_SIZE, n, NR_CONS, nr_cons, page_size(), s, scr_lines, scr_size, scr_width, scroll_screen(), SCROLL_UP, select_console(), SELF, sys_segctl(), sys_vircopy(), tty_table, VDU_CRT_BASE_ADDR, VDU_CRT_BASE_SIZE, VDU_FONTLINES_ADDR, VDU_FONTLINES_SIZE, VDU_SCREEN_COLS_ADDR, VDU_SCREEN_COLS_SIZE, VDU_SCREEN_ROWS_ADDR, VDU_SCREEN_ROWS_SIZE, vid_index, vid_mask, vid_off, vid_port, vid_seg, vid_size, and wrap. Referenced by tty_init(). |
|
||||||||||||
|
Definition at line 312 of file console.c. References blank_color, BLANK_MEM, chars, curcons, flush, new_line(), scr_size, scr_width, SCROLL_UP, set_6845(), softscroll, vid_mask, VID_ORG, and wrap. Referenced by do_escape(), out_char(), and scr_init(). |
|
|
Definition at line 1169 of file console.c. References console::c_cur, console::c_org, ccurrent, cons_table, curcons, CURSOR, nr_cons, set_6845(), and VID_ORG. Referenced by cons_stop(), kb_read(), and scr_init(). |
|
|
Definition at line 1256 of file console.c. References b, COM1_LSR, COM1_THR, i, LSR_THRE, and sys_inb. Referenced by kputc(). |
|
||||||||||||
|
Definition at line 701 of file console.c. References BYTE, DATA, INDEX, pv_set, sys_voutb(), and vid_port. Referenced by flush(), scroll_screen(), and select_console(). |
|
|
Definition at line 877 of file console.c. References beeping, FALSE, OK, PORT_B, sys_inb, and sys_outb. |
|
|
Definition at line 1121 of file console.c. References cons_org0(), printf, and softscroll. Referenced by kb_read(). |
|
|
Definition at line 114 of file console.c. Referenced by do_escape(). |
|
|
Definition at line 80 of file console.c. Referenced by beep(), beep_x(), and stop_beep(). |
|
|
Definition at line 74 of file console.c. Referenced by do_escape(), scr_init(), and scroll_screen(). |
|
|
Definition at line 107 of file console.c. Referenced by cons_org0(), cons_putk(), cons_stop(), scr_init(), and select_console(). |
|
|
Definition at line 108 of file console.c. Referenced by flush(), scroll_screen(), and select_console(). |
|
|
Definition at line 81 of file console.c. Referenced by cons_ioctl(), and scr_init(). |
|
|
Definition at line 106 of file console.c. Referenced by cons_org0(), scr_init(), and select_console(). |
|
|
Definition at line 83 of file console.c. Referenced by cons_ioctl(), do_escape(), flush(), out_char(), and scr_init(). |
|
|
Definition at line 84 of file console.c. Referenced by cons_org0(), do_escape(), scr_init(), and scroll_screen(). |
|
|
Definition at line 82 of file console.c. Referenced by cons_ioctl(), cons_write(), do_escape(), flush(), out_char(), scr_init(), and scroll_screen(). |
|
|
Definition at line 79 of file console.c. Referenced by cons_stop(), scroll_screen(), and toggle_scroll(). |
|
|
Definition at line 69 of file console.c. Referenced by scr_init(). |
|
|
Definition at line 73 of file console.c. Referenced by scr_init(), and scroll_screen(). |
|
|
Definition at line 71 of file console.c. Referenced by scr_init(). |
|
|
Definition at line 77 of file console.c. Referenced by get_6845(), scr_init(), and set_6845(). |
|
|
Definition at line 70 of file console.c. Referenced by scr_init(). |
|
|
Definition at line 72 of file console.c. Referenced by cons_org0(), and scr_init(). |
|
|
Definition at line 78 of file console.c. Referenced by deflateInit2_(), inflateBack9(), scr_init(), and scroll_screen(). |
1.4.6