i386/75887 : [pcvt] with vt0.disabled=0 and PCVT in kernel video/keyboard is lost when kernel loads

Anton Shterenlikht mexas at bristol.ac.uk
Mon Sep 25 14:18:31 PDT 2006

On Thu, Sep 14, 2006 at 06:55:40PM +0200, Remko Lodder wrote:
> Anton Shterenlikht wrote:
> >The following reply was made to PR i386/75887; it has been noted by GNATS.
> >
> > I think I hit the same problem in 6.0.
> > I can send the full details if anybody is interested.
> Hello, by all means, please do, it might help us debugging
> what is going on...

Below are the details. Let me know if anything else is missing.
If I want to try to solve the problem myself where do I start?


Release:	FreeBSD 6.0-RELEASE i386
Machine:	Compaq Armada 1700 laptop
Kernel:		Thu Sep 14 10:40:41 BST 2006 /usr/src/sys/i386/compile/SC

Please note that SC is the working kernel with sc console device.
VT is the problem kernel with pcvt console device.


Copyright (c) 1992-2005 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 6.0-RELEASE #1: Thu Sep 14 10:40:41 BST 2006
    shterenl at mech-aslap33.men.bris.ac.uk:/usr/src/sys/i386/compile/SC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Pentium II/Pentium II Xeon/Celeron (233.34-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x652  Stepping = 2
real memory  = 167772160 (160 MB)
avail memory = 158879744 (151 MB)
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
cpu0 on motherboard
pcib0: <Intel 82443BX host to PCI bridge (AGP disabled)> pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX4 UDMA33 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1020-0x102f at device 7.1 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0x1000-0x101f irq 11 at device 7.2 on pci0
usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
pci0: <bridge> at device 7.3 (no driver attached)
pci0: <display, VGA> at device 8.0 (no driver attached)
cbb0: <TI1220 PCI-CardBus Bridge> mem 0x7fffe000-0x7fffefff irq 11 at device 17.0 on pci0
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb1: <TI1220 PCI-CardBus Bridge> mem 0x7ffff000-0x7fffffff irq 11 at device 17.1 on pci0
cardbus1: <CardBus bus> on cbb1
pccard1: <16-bit PCCard bus> on cbb1
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xc0000-0xcafff on isa0
fdc0: <Enhanced floppy controller> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: [FAST]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
unknown: <PNP0401> can't assign resources (port)
unknown: <PNP0501> can't assign resources (port)
unknown: <PNP0700> can't assign resources (port)
unknown: <PNP0303> can't assign resources (port)
unknown: <PNP0f13> can't assign resources (irq)
unknown: <PNP0c02> can't assign resources (memory)
Timecounter "TSC" frequency 233343079 Hz quality 800
Timecounters tick every 1.000 msec
rl0: <RealTek 8139 10/100BaseTX> port 0x1100-0x11ff mem 0x88000000-0x880001ff irq 11 at device 0.0 on cardbus1
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl0: Ethernet address: 00:02:44:7b:52:b8
ad0: 3102MB <IBM DKLA-23240 KL3OA41A> at ata0-master UDMA33
acd0: CDROM <UJDA150/1.02> at ata0-slave PIO4
Trying to mount root from ufs:/dev/ad0s1a


	I built a custom kernel with pcvt (vt) console driver enabled.
	I removed sc driver from the kernel configuration file.
	When I try to boot with this new kernel the machine freezes
	just after the kernel starts to load.


	The kernel configuration file:

# vt video driver
machine		i386
cpu		I686_CPU
ident		VT	

# To statically compile in device wiring instead of /boot/device.hints
hints		"VT.hints"		# Default places to look for devices.

makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols

#options 	SCHED_ULE		# ULE scheduler
options 	SCHED_4BSD		# 4BSD scheduler
options 	PREEMPTION		# Enable kernel thread preemption
options 	INET			# InterNETworking
options 	INET6			# IPv6 communications protocols
options 	FFS			# Berkeley Fast Filesystem
options 	SOFTUPDATES		# Enable FFS soft updates support
options 	UFS_ACL			# Support for access control lists
options 	UFS_DIRHASH		# Improve performance on big directories
options 	MD_ROOT			# MD is a potential root device
options 	MSDOSFS			# MSDOS Filesystem
options 	CD9660			# ISO 9660 Filesystem
options 	PROCFS			# Process filesystem (requires PSEUDOFS)
options 	PSEUDOFS		# Pseudo-filesystem framework
options 	GEOM_GPT		# GUID Partition Tables.
options 	COMPAT_43		# Compatible with BSD 4.3 [KEEP THIS!]
options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
options 	KTRACE			# ktrace(1) support
options 	SYSVSHM			# SYSV-style shared memory
options 	SYSVMSG			# SYSV-style message queues
options 	SYSVSEM			# SYSV-style semaphores
options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options 	AHC_REG_PRETTY_PRINT	# Print register bitfields in debug
					# output.  Adds ~128k to driver.
options 	AHD_REG_PRETTY_PRINT	# Print register bitfields in debug
					# output.  Adds ~215k to driver.
options 	ADAPTIVE_GIANT		# Giant mutex is adaptive.

device		apic			# I/O APIC

# Bus support.
device		pci

# Floppy drives
device		fdc

# ATA and ATAPI devices
device		ata
device		atadisk		# ATA disk drives
device		atapicd		# ATAPI CDROM drives
device		atapifd		# ATAPI floppy drives
options 	ATA_STATIC_ID	# Static device numbering

# SCSI peripherals
device		scbus		# SCSI bus (required for SCSI)
device		da		# Direct Access (disks)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc		# AT keyboard controller
device		atkbd		# AT keyboard
device		psm		# PS/2 mouse

device		vga		# VGA video card driver

# syscons is the default console driver, resembling an SCO console
#device		sc

# Enable this for the pcvt (VT220 compatible) console driver
device		vt
options 	XSERVER		# support for X server on a vt console
options 	FAT_CURSOR	# start with block cursor

# Add suspend/resume support for the i8254.
device		pmtimer

# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support
device		cbb		# cardbus (yenta) bridge
device		pccard		# PC Card (16-bit) bus
device		cardbus		# CardBus (32-bit) bus

# Serial (COM) ports
device		sio		# 8250, 16[45]50 based serial ports

# Parallel port
device		ppc
device		ppbus		# Parallel port bus (required)
device		lpt		# Printer
device		plip		# TCP/IP over parallel
device		ppi		# Parallel port interface device

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device		miibus		# MII bus support
device		rl		# RealTek 8129/8139

# Pseudo devices.
device		loop		# Network loopback
device		random		# Entropy device
device		ether		# Ethernet support
device		sl		# Kernel SLIP
device		ppp		# Kernel PPP
device		tun		# Packet tunnel.
device		pty		# Pseudo-ttys (telnet etc)
device		md		# Memory "disks"
device		gif		# IPv6 and IPv4 tunneling
device		faith		# IPv6-to-IPv4 relaying (translation)

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device		bpf		# Berkeley packet filter

# USB support
device		uhci		# UHCI PCI->USB interface
device		ohci		# OHCI PCI->USB interface
device		ehci		# EHCI PCI->USB interface (USB 2.0)
device		usb		# USB Bus (required)
device		ugen		# Generic
device		umass		# Disks/Mass storage - Requires scbus and da


# hints to build statically into VT kernel. The only important bit is that
# sc is disabled
# EOF VT.hints

I did not build any modules:


I did not touch the default /etc/rc.d/pcvt

I built and installed the kernel as advised in the user manual:

#cd /usr/src/sys/i386/conf
#/usr/sbin/config VT
#cd ../compile/VT
#make cleandepend
#make depend
#make install

I had no warnings or errors in the process.
	don't know

More information about the freebsd-i386 mailing list