Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Dec 1998 22:31:07 +0900
From:      Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
To:        current@FreeBSD.ORG
Cc:        yokota@zodiac.mech.utsunomiya-u.ac.jp
Subject:   future of syscons 
Message-ID:  <199812221331.WAA09326@zodiac.mech.utsunomiya-u.ac.jp>

next in thread | raw e-mail | index | archive | help
I wrote some notes on the future development plan of our console
driver syscons.

I would appriciate if you could give me some comments.

Kazu
----------------------------------------------------------------------
syscons the Next Generation
22 December 1998
Kazutaka YOKOTA
yokota@FreeBSD.ORG

I. Overview

It has been pointed out in FreeBSD mailing lists over and over again
that reorganization of our console driver is desired.

The current version of syscons is very closely tied to the AT keyboard
interface and the VGA video card.

As the support for USB devices and the alpha architecture has been
added to 3.0-CURRENT, it is now urgently needed to make syscons more
portable, and add support for USB keyboards and video cards other than
MDA/CGA/EGA/VGA.

We need to decouple the main part of syscons and keyboard/video I/O
code to this end.

In the process, we shall also try to modularize syscons, so that it
would become easier to maintain syscons than now.

When we finish this, we should be able to use:

1. non-VGA type video cards for the console,
2. and non-AT type keyboards, such as the USB keyboard.

There would also be possibilities of using multiple video cards and
keyboards simultaneously.

In the next couple of months we shall see dramatic changes in syscons
in the following areas.

a. Decouple keyboard and video I/O
We shall have keyboard and video card drivers segregated from syscons.
syscons will access the devices through abstracted interface.  If the
system has more than one keyboards or more than one video cards, the
user should be allowed to specify which keyboard and video card will
be used by syscons.

We already have sys/i386/isa/kbdio and sys/i386/isa/videoio modules,
but they are not sufficient and need to be extended.

b. Modularized source files
Split syscons.c into a several files of manageable size.

c. Selectable features
syscons accumulated a number of features over the years.  However, it
has become rather bloat as a result.  The user should be allowed to
choose which features to be loaded, by specifying kernel configuration
options or by loading/unloading KLD modules.

We should be able to bring the size of syscons down by substantial
amount if only a set of basic features is selected.

d. Terminal emulation
Decouple the terminal emulation code from the main body of syscons,
and make it possible to load alternative terminal emulator code or
multiple emulator codes so that the user is allowed to choose favorite
emulator other than the SCO console.


The end result of the above improvement may not be as good as "the
unified console driver" discussed a few years ago.  But, I believe
these changes are heading towards the right direction.

The changes will first take place in i386, and will be incorporated
into alpha and PC98.  Most, if not all, code will be shared among
these architectures.


II. Details and time schedule

1. Keyboard driver
Create the AT keyboard controller driver (kbdc) and the AT keyboard
driver (atkbd).
	sys/i386/isa/kbdc.c
	sys/i386/isa/atkbd.c

Update the USB keyboard driver (ukbd).  
	sys/dev/usb/ukbd.c

Keyboard drivers are managed and attached by the virtual keyboard
driver (kbd).
	sys/dev/kbd/kbd.c

The kernel configuration file should look:

controller 	kbdc0 at isa? port IO_KBD tty
device 		atkbd0 at isa? tty flags xxxx
device		psm0 at isa? tty flags yyy

device		sc0 at isa? tty flags zzz
...
device		ukbd0
...

The current keyboard access routines in kbdio.c are mostly moved to
kbdc.c and kbdio.[ch] will be deprecated.

Status: AT keyboard driver: in testing, given to several developers
        virtual keyboard driver: in testing, given to several developers
        USB keyboard driver: to be developed
Commit schedule: early next year?

NOTE: pcvt driver will still work after this change.  But, it will not
be able to use the USB keyboard.


2. Video card driver
Create MDA/CGA/EGA/VGA driver (vga).
	sys/i386/isa/vga_isa.c

DEC TGA driver?
	sys/pci/tga.c

Ideally these driver should provide high-level, character
drawing(rendering) functions as well as low-level I/O services.
However, we shall start with basic set of low-level functions and
gradually "grow" video card drivers because such incremental path will
be easier to follow than doing everything at once.

Video card drivers are managed and attached by the virtual frame buffer
driver (fb).
	sys/dev/fb/fb.c

The kernel configuration file should look:

device 		vga0 at isa?
...
device 		tga0
...

The current video I/O routines in videoio.c are mostly moved to vga_isa.c
and fb.c. videoio.[ch] will be deprecated.

Status: VGA driver: in testing
        frame buffer driver: in testing
        TGA driver: to be developed
Commit schedule: towards the end of January?

NOTE: the pcvt driver will still work after this change.  It won't use
the video card drivers and will access the video hardware directly as
before.


3. Source file reorganization
Split syscons.c into the following separate files.

1) main body
2) cut&paste, sysmouse support
3) scroll back buffer handling
4) renderer
5) terminal buffer manipulation routines

Rendering function (4) should be moved to video card drivers in the
future.

Status: in testing
Commit schedule: towards February?

AFTER this step is completed we should be able to say that syscons
is "mostly" architecture independent!!

4. Terminal emulator enhancement

Nothing is done.

That's all for now.
----------------------------------------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812221331.WAA09326>