From 4b150117e82021c58c9cda27d8c65a5b5974e076 Mon Sep 17 00:00:00 2001 From: "jws@cairnwell.research" Date: Thu, 1 May 2003 18:23:20 +0000 Subject: bitkeeper revision 1.192.1.1 (3eb16618C2ePfMjC3p2SoqAYtLR0Kw) Console support - next delta --- xenolinux-2.4.21-pre4-sparse/arch/xeno/defconfig | 4 +- .../arch/xeno/drivers/console/Makefile | 2 +- .../arch/xeno/drivers/console/console.c | 110 +++---- .../arch/xeno/kernel/setup.c | 31 +- .../drivers/char/Config.in | 14 +- xenolinux-2.4.21-pre4-sparse/drivers/char/Makefile | 339 --------------------- xenolinux-2.4.21-pre4-sparse/drivers/char/tty_io.c | 24 +- 7 files changed, 112 insertions(+), 412 deletions(-) delete mode 100644 xenolinux-2.4.21-pre4-sparse/drivers/char/Makefile (limited to 'xenolinux-2.4.21-pre4-sparse') diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/defconfig b/xenolinux-2.4.21-pre4-sparse/arch/xeno/defconfig index 6e2e14723f..c59c3282e4 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/defconfig +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/defconfig @@ -125,9 +125,11 @@ CONFIG_XENOLINUX_BLOCK=y # # Character devices # +CONFIG_XEN_CONSOLE=y # CONFIG_VT is not set +# CONFIG_VGA_CONSOLE is not set # CONFIG_DUMMY_CONSOLE is not set -CONFIG_PSMOUSE=y +# CONFIG_PSMOUSE is not set # CONFIG_UNIX98_PTYS is not set # diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/console/Makefile b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/console/Makefile index 5a0e7b36b1..546180a3c2 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/console/Makefile +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/console/Makefile @@ -1,3 +1,3 @@ O_TARGET := con.o -obj-y := console.o +obj-$(CONFIG_XEN_CONSOLE) := console.o include $(TOPDIR)/Rules.make diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/console/console.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/console/console.c index 11548f877e..2704905813 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/console/console.c +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/console/console.c @@ -24,9 +24,11 @@ #include #include +#define XENO_TTY_MINOR 123 + /******************** Kernel console driver ********************************/ -static void kconsole_write(struct console *co, const char *s, unsigned count) +static void xen_console_write(struct console *co, const char *s, unsigned count) { #define STRLEN 256 static char str[STRLEN]; @@ -49,56 +51,57 @@ static void kconsole_write(struct console *co, const char *s, unsigned count) } } -static kdev_t kconsole_device(struct console *c) +static kdev_t xen_console_device(struct console *c) { /* * This is the magic that binds our "struct console" to our * "tty_struct", defined below. */ - return MKDEV(TTY_MAJOR, 0); + return MKDEV(TTY_MAJOR, XENO_TTY_MINOR); } -static struct console kconsole_info = { - name: "xenocon", - write: kconsole_write, - device: kconsole_device, +static struct console xen_console_info = { + name: "xen_console", + write: xen_console_write, + device: xen_console_device, flags: CON_PRINTBUFFER, index: -1, }; -void xeno_console_init(void) +void xen_console_init(void) { - register_console(&kconsole_info); + printk("xeno_console_init\n"); + register_console(&xen_console_info); } /******************** Initial /dev/console *********************************/ -static struct tty_driver console_driver; -static int console_refcount; -static struct tty_struct *console_table[1]; -static struct termios *console_termios[1]; -static struct termios *console_termios_locked[1]; +static struct tty_driver xeno_console_driver; +static int xeno_console_refcount; +static struct tty_struct *xeno_console_table[1]; +static struct termios *xeno_console_termios[1]; +static struct termios *xeno_console_termios_locked[1]; -static int console_write_room(struct tty_struct *tty) +static int xeno_console_write_room(struct tty_struct *tty) { return INT_MAX; } -static int console_chars_in_buffer(struct tty_struct *tty) +static int xeno_console_chars_in_buffer(struct tty_struct *tty) { return 0; } -static inline int console_xmit(int ch) +static inline int xeno_console_xmit(int ch) { char _ch = ch; - kconsole_write(NULL, &_ch, 1); + xen_console_write(NULL, &_ch, 1); return 1; } -static int console_write(struct tty_struct *tty, int from_user, +static int xeno_console_write(struct tty_struct *tty, int from_user, const u_char * buf, int count) { int i; @@ -119,17 +122,17 @@ static int console_write(struct tty_struct *tty, int from_user, { ch = buf[i]; } - console_xmit(ch); + xeno_console_xmit(ch); } return i; } -static void console_put_char(struct tty_struct *tty, u_char ch) +static void xeno_console_put_char(struct tty_struct *tty, u_char ch) { - console_xmit(ch); + xeno_console_xmit(ch); } -static int console_open(struct tty_struct *tty, struct file *filp) +static int xeno_console_open(struct tty_struct *tty, struct file *filp) { int line; @@ -146,37 +149,40 @@ static int console_open(struct tty_struct *tty, struct file *filp) return 0; } -static void console_close(struct tty_struct *tty, struct file *filp) +static void xeno_console_close(struct tty_struct *tty, struct file *filp) { MOD_DEC_USE_COUNT; } -static int __init console_ini(void) +int __init xeno_con_init(void) { - memset(&console_driver, 0, sizeof(struct tty_driver)); - console_driver.magic = TTY_DRIVER_MAGIC; - console_driver.driver_name = "xeno_console"; - console_driver.name = "console"; - console_driver.major = TTY_MAJOR; - console_driver.minor_start = 0; - console_driver.num = 1; - console_driver.type = TTY_DRIVER_TYPE_SERIAL; - console_driver.subtype = SERIAL_TYPE_NORMAL; - console_driver.init_termios = tty_std_termios; - console_driver.flags = TTY_DRIVER_REAL_RAW; - console_driver.refcount = &console_refcount; - console_driver.table = console_table; - console_driver.termios = console_termios; - console_driver.termios_locked = console_termios_locked; + + printk("xeno_con_init\n"); + + memset(&xeno_console_driver, 0, sizeof(struct tty_driver)); + xeno_console_driver.magic = TTY_DRIVER_MAGIC; + xeno_console_driver.driver_name = "xeno_console"; + xeno_console_driver.name = "xencon"; + xeno_console_driver.major = TTY_MAJOR; + xeno_console_driver.minor_start = XENO_TTY_MINOR; + xeno_console_driver.num = 1; + xeno_console_driver.type = TTY_DRIVER_TYPE_SERIAL; + xeno_console_driver.subtype = SERIAL_TYPE_NORMAL; + xeno_console_driver.init_termios = tty_std_termios; + xeno_console_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + xeno_console_driver.refcount = &xeno_console_refcount; + xeno_console_driver.table = xeno_console_table; + xeno_console_driver.termios = xeno_console_termios; + xeno_console_driver.termios_locked = xeno_console_termios_locked; /* Functions */ - console_driver.open = console_open; - console_driver.close = console_close; - console_driver.write = console_write; - console_driver.write_room = console_write_room; - console_driver.put_char = console_put_char; - console_driver.chars_in_buffer = console_chars_in_buffer; - - if ( tty_register_driver(&console_driver) ) + xeno_console_driver.open = xeno_console_open; + xeno_console_driver.close = xeno_console_close; + xeno_console_driver.write = xeno_console_write; + xeno_console_driver.write_room = xeno_console_write_room; + xeno_console_driver.put_char = xeno_console_put_char; + xeno_console_driver.chars_in_buffer = xeno_console_chars_in_buffer; + + if ( tty_register_driver(&xeno_console_driver) ) { printk(KERN_ERR "Couldn't register Xeno console driver\n"); } @@ -188,17 +194,17 @@ static int __init console_ini(void) return 0; } -static void __exit console_fin(void) +void __exit xeno_con_fini(void) { int ret; - ret = tty_unregister_driver(&console_driver); + ret = tty_unregister_driver(&xeno_console_driver); if ( ret != 0 ) { printk(KERN_ERR "Unable to unregister Xeno console driver: %d\n", ret); } } -module_init(console_ini); -module_exit(console_fin); +module_init(xeno_con_init); +module_exit(xeno_con_fini); diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/setup.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/setup.c index b3fa27fb11..832a7a2087 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/setup.c +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/setup.c @@ -163,8 +163,16 @@ void __init setup_arch(char **cmdline_p) ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); memset(&drive_info, 0, sizeof(drive_info)); memset(&screen_info, 0, sizeof(screen_info)); + // this is drawn from a dump from vgacon:startup in standard linux + screen_info.orig_video_mode = 3; + screen_info.orig_video_isVGA = 1; + screen_info.orig_video_lines = 25; + screen_info.orig_video_cols = 80; + screen_info.orig_video_ega_bx = 3; + screen_info.orig_video_points = 16; + memset(&apm_info.bios, 0, sizeof(apm_info.bios)); - aux_device_present = 0; + aux_device_present = 0; #ifdef CONFIG_BLK_DEV_RAM rd_image_start = 0; rd_prompt = 0; @@ -292,6 +300,27 @@ void __init setup_arch(char **cmdline_p) #endif paging_init(); + + if(start_info.flags & SIF_PRIVILEGED) { + // we are privileged guest os - should be able to set IOPL + if(HYPERVISOR_iopl(1)) { + panic("Unable to obtain IOPL, despite being SIF_PRIVILEGED"); + } + + } + + if(start_info.flags & SIF_CONSOLE) { + if(!(start_info.flags & SIF_PRIVILEGED)) { + panic("Xen granted us console access but not privileged status"); + } +#ifdef CONFIG_VT +#if defined(CONFIG_VGA_CONSOLE) + conswitchp = &vga_con; +#elif defined(CONFIG_DUMMY_CONSOLE) + conswitchp = &dummy_con; +#endif +#endif + } } static int cachesize_override __initdata = -1; diff --git a/xenolinux-2.4.21-pre4-sparse/drivers/char/Config.in b/xenolinux-2.4.21-pre4-sparse/drivers/char/Config.in index edeb8b3a71..217398d6e2 100644 --- a/xenolinux-2.4.21-pre4-sparse/drivers/char/Config.in +++ b/xenolinux-2.4.21-pre4-sparse/drivers/char/Config.in @@ -4,18 +4,22 @@ mainmenu_option next_comment comment 'Character devices' +bool 'Xen console support' CONFIG_XEN_CONSOLE +comment 'The options below are alpha-stage and will probably not work' bool 'Virtual terminal' CONFIG_VT -if [ "$CONFIG_VT" = "n" ]; then - bool 'Dummy Console (to allow kbd/mouse testing without VTs)' CONFIG_DUMMY_CONSOLE -fi - -bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE +if [ "$CONFIG_VT" = "y" ]; then + bool ' Support for console on virtual terminal' CONFIG_VT_CONSOLE + bool ' Support for VGA Video' CONFIG_VGA_CONSOLE + bool ' Support for Dummy Video (for testing)' CONFIG_DUMMY_CONSOLE + bool ' PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE +fi bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256 fi + endmenu # KEPT IN CASE WE WANT TO BRING SOME BACK... diff --git a/xenolinux-2.4.21-pre4-sparse/drivers/char/Makefile b/xenolinux-2.4.21-pre4-sparse/drivers/char/Makefile deleted file mode 100644 index 0b7b73cd16..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/drivers/char/Makefile +++ /dev/null @@ -1,339 +0,0 @@ -# -# Makefile for the kernel character device drivers. -# -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# XENO INFO - this is just copied from the linux one -# and most is irrelevant for xenolinux and can go. -# (see Config.in for the relevant bits) -# JWS - added dummy_console to test ps2 functionality - - -# -# This file contains the font map for the default (hardware) font -# -FONTMAPFILE = cp437.uni - -O_TARGET := char.o - -obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o raw.o pty.o misc.o random.o - -# All of the (potential) objects that export symbols. -# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. - -export-objs := busmouse.o console.o keyboard.o sysrq.o \ - misc.o pty.o random.o selection.o serial.o \ - sonypi.o tty_io.o tty_ioctl.o generic_serial.o \ - au1000_gpio.o hp_psaux.o nvram.o dummy_console.o - -mod-subdirs := joystick ftape drm drm-4.0 pcmcia - -list-multi := - -KEYMAP =defkeymap.o -KEYBD =pc_keyb.o -CONSOLE =console.o -SERIAL =serial.o - -ifeq ($(ARCH),s390) - KEYMAP = - KEYBD = - CONSOLE = - SERIAL = -endif - -ifeq ($(ARCH),mips) - ifneq ($(CONFIG_PC_KEYB),y) - KEYBD = - endif -endif - -ifeq ($(ARCH),s390x) - KEYMAP = - KEYBD = - CONSOLE = - SERIAL = -endif - -ifeq ($(ARCH),m68k) - ifdef CONFIG_AMIGA - KEYBD = amikeyb.o - else - ifndef CONFIG_MAC - KEYBD = - endif - endif - SERIAL = -endif - -ifeq ($(ARCH),parisc) - ifdef CONFIG_GSC_PS2 - KEYBD = hp_psaux.o hp_keyb.o - else - KEYBD = - endif - ifdef CONFIG_SERIAL_MUX - CONSOLE += mux.o - endif - ifdef CONFIG_PDC_CONSOLE - CONSOLE += pdc_console.o - endif -endif - -ifdef CONFIG_Q40 - KEYBD += q40_keyb.o - SERIAL = serial.o -endif - -ifdef CONFIG_APOLLO - KEYBD += dn_keyb.o -endif - -ifeq ($(ARCH),parisc) - ifdef CONFIG_GSC_PS2 - KEYBD = hp_psaux.o hp_keyb.o - else - KEYBD = - endif - ifdef CONFIG_PDC_CONSOLE - CONSOLE += pdc_console.o - endif -endif - -ifeq ($(ARCH),arm) - ifneq ($(CONFIG_PC_KEYMAP),y) - KEYMAP = - endif - ifneq ($(CONFIG_PC_KEYB),y) - KEYBD = - endif -endif - -ifeq ($(ARCH),sh) - KEYMAP = - KEYBD = - CONSOLE = - ifeq ($(CONFIG_SH_HP600),y) - KEYMAP = defkeymap.o - KEYBD = scan_keyb.o hp600_keyb.o - CONSOLE = console.o - endif - ifeq ($(CONFIG_SH_DMIDA),y) - # DMIDA does not connect the HD64465 PS/2 keyboard port - # but we allow for USB keyboards to be plugged in. - KEYMAP = defkeymap.o - KEYBD = # hd64465_keyb.o pc_keyb.o - CONSOLE = console.o - endif - ifeq ($(CONFIG_SH_EC3104),y) - KEYMAP = defkeymap.o - KEYBD = ec3104_keyb.o - CONSOLE = console.o - endif - ifeq ($(CONFIG_SH_DREAMCAST),y) - KEYMAP = defkeymap.o - KEYBD = - CONSOLE = console.o - endif -endif - -ifeq ($(CONFIG_DECSTATION),y) - KEYMAP = - KEYBD = - SERIAL = decserial.o -endif - -ifeq ($(CONFIG_BAGET_MIPS),y) - KEYBD = - SERIAL = -endif - -ifeq ($(CONFIG_NINO),y) - SERIAL = -endif - -ifneq ($(CONFIG_SUN_SERIAL),) - SERIAL = -endif - -ifeq ($(CONFIG_QTRONIX_KEYBOARD),y) - KEYBD = qtronix.o - KEYMAP = qtronixmap.o -endif - -ifeq ($(CONFIG_DUMMY_KEYB),y) - KEYBD = dummy_keyb.o -endif - -obj-$(CONFIG_VT) += vt.o vc_screen.o consolemap.o consolemap_deftbl.o $(CONSOLE) selection.o - -ifeq ($(CONFIG_VT),) - obj-$(CONFIG_DUMMY_CONSOLE) += $(KEYBD) dummy_console.o -endif - -obj-$(CONFIG_SERIAL) += $(SERIAL) -obj-$(CONFIG_SERIAL_HCDP) += hcdp_serial.o -obj-$(CONFIG_SERIAL_21285) += serial_21285.o -obj-$(CONFIG_SERIAL_SA1100) += serial_sa1100.o -obj-$(CONFIG_SERIAL_AMBA) += serial_amba.o -obj-$(CONFIG_TS_AU1000_ADS7846) += au1000_ts.o - -ifndef CONFIG_SUN_KEYBOARD - obj-$(CONFIG_VT) += keyboard.o $(KEYMAP) $(KEYBD) -else - obj-$(CONFIG_PCI) += keyboard.o $(KEYMAP) -endif - -obj-$(CONFIG_HIL) += hp_keyb.o -obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o -obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o -obj-$(CONFIG_ROCKETPORT) += rocket.o -obj-$(CONFIG_MOXA_SMARTIO) += mxser.o -obj-$(CONFIG_MOXA_INTELLIO) += moxa.o -obj-$(CONFIG_DIGI) += pcxx.o -obj-$(CONFIG_DIGIEPCA) += epca.o -obj-$(CONFIG_CYCLADES) += cyclades.o -obj-$(CONFIG_STALLION) += stallion.o -obj-$(CONFIG_ISTALLION) += istallion.o -obj-$(CONFIG_SIBYTE_SB1250_DUART) += sb1250_duart.o -obj-$(CONFIG_COMPUTONE) += ip2.o ip2main.o -obj-$(CONFIG_RISCOM8) += riscom8.o -obj-$(CONFIG_ISI) += isicom.o -obj-$(CONFIG_ESPSERIAL) += esp.o -obj-$(CONFIG_SYNCLINK) += synclink.o -obj-$(CONFIG_SYNCLINKMP) += synclinkmp.o -obj-$(CONFIG_N_HDLC) += n_hdlc.o -obj-$(CONFIG_SPECIALIX) += specialix.o -obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o -obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o -obj-$(CONFIG_SX) += sx.o generic_serial.o -obj-$(CONFIG_RIO) += rio/rio.o generic_serial.o -obj-$(CONFIG_SH_SCI) += sh-sci.o generic_serial.o -obj-$(CONFIG_SERIAL167) += serial167.o -obj-$(CONFIG_MVME147_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_MVME162_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_BVME6000_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o -obj-$(CONFIG_SERIAL_TX3912) += generic_serial.o serial_tx3912.o -obj-$(CONFIG_TXX927_SERIAL) += serial_txx927.o - -subdir-$(CONFIG_RIO) += rio -subdir-$(CONFIG_INPUT) += joystick - -obj-$(CONFIG_ATIXL_BUSMOUSE) += atixlmouse.o -obj-$(CONFIG_LOGIBUSMOUSE) += logibusmouse.o -obj-$(CONFIG_PRINTER) += lp.o -obj-$(CONFIG_TIPAR) += tipar.o - -ifeq ($(CONFIG_INPUT),y) -obj-y += joystick/js.o -endif - -obj-$(CONFIG_BUSMOUSE) += busmouse.o -obj-$(CONFIG_DTLK) += dtlk.o -obj-$(CONFIG_R3964) += n_r3964.o -obj-$(CONFIG_APPLICOM) += applicom.o -obj-$(CONFIG_SONYPI) += sonypi.o -obj-$(CONFIG_MS_BUSMOUSE) += msbusmouse.o -obj-$(CONFIG_82C710_MOUSE) += qpmouse.o -obj-$(CONFIG_AMIGAMOUSE) += amigamouse.o -obj-$(CONFIG_ATARIMOUSE) += atarimouse.o -obj-$(CONFIG_ADBMOUSE) += adbmouse.o -obj-$(CONFIG_PC110_PAD) += pc110pad.o -obj-$(CONFIG_MK712_MOUSE) += mk712.o -obj-$(CONFIG_RTC) += rtc.o -obj-$(CONFIG_EFI_RTC) += efirtc.o -ifeq ($(CONFIG_PPC),) - obj-$(CONFIG_NVRAM) += nvram.o -endif -obj-$(CONFIG_TOSHIBA) += toshiba.o -obj-$(CONFIG_I8K) += i8k.o -obj-$(CONFIG_DS1620) += ds1620.o -obj-$(CONFIG_INTEL_RNG) += i810_rng.o -obj-$(CONFIG_AMD_RNG) += amd768_rng.o -obj-$(CONFIG_AMD_PM768) += amd76x_pm.o - -obj-$(CONFIG_ITE_GPIO) += ite_gpio.o -obj-$(CONFIG_AU1000_GPIO) += au1000_gpio.o -obj-$(CONFIG_COBALT_LCD) += lcd.o - -obj-$(CONFIG_QIC02_TAPE) += tpqic02.o - -subdir-$(CONFIG_FTAPE) += ftape -subdir-$(CONFIG_DRM_OLD) += drm-4.0 -subdir-$(CONFIG_DRM_NEW) += drm -subdir-$(CONFIG_PCMCIA) += pcmcia -subdir-$(CONFIG_AGP) += agp - -ifeq ($(CONFIG_FTAPE),y) -obj-y += ftape/ftape.o -endif - -obj-$(CONFIG_H8) += h8.o -obj-$(CONFIG_PPDEV) += ppdev.o -obj-$(CONFIG_DZ) += dz.o -obj-$(CONFIG_NWBUTTON) += nwbutton.o -obj-$(CONFIG_NWFLASH) += nwflash.o -obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o scx200.o - -# Only one watchdog can succeed. We probe the hardware watchdog -# drivers first, then the softdog driver. This means if your hardware -# watchdog dies or is 'borrowed' for some reason the software watchdog -# still gives you some cover. - -obj-$(CONFIG_PCWATCHDOG) += pcwd.o -obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o -obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o -obj-$(CONFIG_IB700_WDT) += ib700wdt.o -obj-$(CONFIG_MIXCOMWD) += mixcomwd.o -obj-$(CONFIG_60XX_WDT) += sbc60xxwdt.o -obj-$(CONFIG_W83877F_WDT) += w83877f_wdt.o -obj-$(CONFIG_SC520_WDT) += sc520_wdt.o -obj-$(CONFIG_WDT) += wdt.o -obj-$(CONFIG_WDTPCI) += wdt_pci.o -obj-$(CONFIG_21285_WATCHDOG) += wdt285.o -obj-$(CONFIG_977_WATCHDOG) += wdt977.o -obj-$(CONFIG_I810_TCO) += i810-tco.o -obj-$(CONFIG_MACHZ_WDT) += machzwd.o -obj-$(CONFIG_SH_WDT) += shwdt.o -obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o -obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o -#obj-$(CONFIG_ALIM1535_WDT) += alim1535d_wdt.o -obj-$(CONFIG_INDYDOG) += indydog.o -obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o -obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o -obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o -obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o -obj-$(CONFIG_AMD7XX_TCO) += amd7xx_tco.o - -subdir-$(CONFIG_MWAVE) += mwave -ifeq ($(CONFIG_MWAVE),y) - obj-y += mwave/mwave.o -endif - -subdir-$(CONFIG_IPMI_HANDLER) += ipmi -ifeq ($(CONFIG_IPMI_HANDLER),y) - obj-y += ipmi/ipmi.o -endif - -include $(TOPDIR)/Rules.make - -fastdep: - -conmakehash: conmakehash.c - $(HOSTCC) $(HOSTCFLAGS) -o conmakehash conmakehash.c - -consolemap_deftbl.c: $(FONTMAPFILE) conmakehash - ./conmakehash $(FONTMAPFILE) > consolemap_deftbl.c - -consolemap_deftbl.o: consolemap_deftbl.c $(TOPDIR)/include/linux/types.h - -.DELETE_ON_ERROR: - -defkeymap.c: defkeymap.map - set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@ - -qtronixmap.c: qtronixmap.map - set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@ diff --git a/xenolinux-2.4.21-pre4-sparse/drivers/char/tty_io.c b/xenolinux-2.4.21-pre4-sparse/drivers/char/tty_io.c index 8f7e08bc94..62c6c09740 100644 --- a/xenolinux-2.4.21-pre4-sparse/drivers/char/tty_io.c +++ b/xenolinux-2.4.21-pre4-sparse/drivers/char/tty_io.c @@ -102,8 +102,8 @@ #include -#ifdef CONFIG_XENO -extern void xeno_console_init(void); +#ifdef CONFIG_XEN_CONSOLE +extern void xen_console_init(void); #endif #ifdef CONFIG_VT @@ -817,8 +817,9 @@ static int init_dev(kdev_t device, struct tty_struct **ret_tty) int idx; driver = get_tty_driver(device); - if (!driver) - return -ENODEV; + if (!driver) { + return -ENODEV; + } idx = MINOR(device) - driver->minor_start; @@ -2186,7 +2187,7 @@ int tty_unregister_driver(struct tty_driver *driver) */ void __init console_init(void) { - /* Setup the default TTY line discipline. */ + /* Setup the default TTY line discipline. */ memset(ldiscs, 0, sizeof(ldiscs)); (void) tty_register_ldisc(N_TTY, &tty_ldisc_N_TTY); @@ -2209,9 +2210,14 @@ void __init console_init(void) #ifdef CONFIG_EARLY_PRINTK disable_early_printk(); #endif + #ifdef CONFIG_VT con_init(); #endif + +#ifdef CONFIG_XEN_CONSOLE + xen_console_init(); +#endif #ifdef CONFIG_AU1000_SERIAL_CONSOLE au1000_serial_console_init(); #endif @@ -2326,9 +2332,6 @@ void __init tty_init(void) /* console calls tty_register_driver() before kmalloc() works. * Thus, we can't devfs_register() then. Do so now, instead. */ -#ifdef CONFIG_XENO - xeno_console_init(); -#endif #ifdef CONFIG_VT con_init_devfs(); #endif @@ -2358,11 +2361,6 @@ void __init tty_init(void) panic("Couldn't register /dev/tty0 driver\n"); kbd_init(); -#else - // the below is a dodgy hack to allow keyboard/mouse support without the console support, along with the file "dummy_console.c" -#ifdef CONFIG_DUMMY_CONSOLE - kbd_init(); -#endif #endif #ifdef CONFIG_ESPSERIAL /* init ESP before rs, so rs doesn't see the port */ -- cgit v1.2.3