1
/* The SRM console prompt.
3
Copyright (C) 2011 Richard Henderson
5
This file is part of QEMU PALcode.
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2 of the License or
10
(at your option) any later version.
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the text
15
of the GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program; see the file COPYING. If not see
19
<http://www.gnu.org/licenses/>. */
23
#include "vgatables.h"
29
crb_puts(0, "\r\n", 2);
39
backspace_and_erase(void)
41
crb_puts(0, "\b \b", 3);
45
getline(char *buf, unsigned long bufsize)
47
unsigned long len = 0;
64
case 0x7f: /* Delete */
67
backspace_and_erase();
75
if (len + 1 < bufsize)
78
crb_puts(0, buf+len, 1);
88
static inline void set_console_alarm(void)
90
/* Just set a new timeout for 10ms = 10M ns. */
91
set_alarm_rel(10 * 1000 * 1000);
95
do_entInt(unsigned long type, unsigned long vector)
100
/* ??? SMP interrupt. We're going to need this for starting up
104
/* Timer interrupt. */
108
/* ??? Device interrupt. We're going to need this for virtio disk
109
operations at minimum. */
127
unsigned short *vga, attr;
128
vga = pci_mem_base + SEG_CTEXT *16;
139
crb_puts(0, ">>> ", 4);
140
len = getline(line, sizeof(line));
141
crb_puts(0, "got: ", 5);
142
crb_puts(0, line, len);