Subject: Summary: Problem booting almost generic kernel, sup 1997-09-08
To: Current-users <current-users@NetBSD.ORG>
From: Kjetil B. Thomassen <>
List: current-users
Date: 09/21/1997 18:49:09
On Mon 08 Sep, I wrote:
> I have a problem booting my self-compiled current kernel on
> my (i386) Compaq LTE 5200 laptop.
> It has a SystemSoft BIOS for OPTI Viper 557/558N 1.01 (2450-59)(Version 05.20)
> SystemSoft Plug-n-Play BIOS.
> This computer has two PC Card slots and APM. In addition to this
> I have a docking station with ed2 in it.
> The computer and/or docking station does not have a proper power
> switch, but only a soft one that triggers something in the PC.
> I then get a dialogue box asking if it is ok to shut down. Then
> I press return, and the computer shuts down.
> It is hanging after it has found the:
> Cirrus Logic CL-GD7543 (VGA display) at pci0 dev 2 function 0 not configured
> isa0 at mainbus0.
> The thing that seems to trigger it is when I turn it off using the
> softpower switch, and not when I unplug the power cord from the dock.
> Also, it seems that this happens after Windows 95 has shut it down and
> when I press a key to reboot after NetBSD has done a shutdown -h.
> I just tried to unplug the power cord after NetBSD did a shutdown -h,
> and then it worked fine.
> I have taken the generic kernel config file and just changed the
> following:
> - BIOSEXTMEM to 39936
> - MAXUSERS to 64
> - Uncommented pms0

I found out of this problem after Patrick Welche <>
suggested the following:

> The other thing is that your soft power off seems to come in to your
> story, so maybe the dreaded
> #apm0   at mainbus0                     # Advanced power management
> should be included, though it is thought to still be fairly
> experimental.

It definitely solved the problem with shutdown -h, but the problem
is still in there if I do a shutdown -r.

So, there is still some work to do with the shutdown code, but at
least there is a solution somewhere in the apm code.

With apm code enabled in the kernel it also works fine when
Windows 95 has shut down the computer, although I cannot tell
for sure whether I really had that problem without the apm code.

Also Matthias Drochner <> suggested:

> What I'd do here: enable DDB, set a breakpoint around isaattach()
> and do either single-stepping or some log2-like breakpoint setting
> until you find the point. There is not much between isaattach() and the
> com device probe.

The only thing I haven't been able to figure is how to enter DDB when
this problem occurs. The ddb man page says nothing about how to enter
it, and my searching through some of the source files I thought had
something to do with it, didn't do me any wiser.

How do I do that?

> Another problem I see with this kernel is that once I have pressed
> a key, it repeats until I press a different key. Then that key
> repeats and so on.
> Also when the computer is out of the docking station, the keyboard
> doesn't seem to work until I trigger the on/off switch.
> I have no problems with a telnet session to it.

This problem has also been pinpointed. It is the pms0 device.
Without the pms0 device in the kernel everything works fine.

This problem should definitely be solved, as I do have a pms0 on
this PC. But, at present I do not use X, so I can live without it.

Thanks to Matthias Drochner <>
for pointing this out.

Matthias also wanted to know why I had this:
>> - BIOSEXTMEM to 39936
> Just for curiosity: do the bootblocks fail to determine the correct size?

The reason is simple, I'm using the 1.2 kcother.fs floppy to boot
from hd(0,a)/netbsd as I haven't gotten around to make my own yet.

I also do not want to use a multibooter like os-bs as I prefer to
let the Windows 95 installation believe it is alone on the drive.
The PC belongs to the place I work, and they are supporting it.

So, it looks as though I need to do a couple of send-pr's on these
two problems and see what you can come up with. I'm afraid that
will have to wait a few weeks, as I am very busy at work.

But, if someone has any fixes they want me to try, I'll be happy
to do it.

The rest of the email has been included below for reference.

Thanks for all the help. I am very happy with the workarounds
and fixes for now.

Kjetil B.

> Neither of these problems happen with a kernel built from
> sources the 22nd of August.
> One difference between the two kernels is that there is a pause
> between the isa0 and the com0 probe in the newer one.
> The difference between the old and new kernel is marked with a '#'
> in the dmesg output below. The ones with '#' does not show on the
> old kernel. Other than that, everything is the same.
> I hope that someone will be able to solve my problems, and if you
> need more information or want to test something out, then just
> ask me. I am a dedicated NetBSD user, and I want to contribute
> to the i386 port as well as the arm32 one.
> Kjetil B.
> dmesg output below.
> ------------------
> NetBSD 1.2G (KJETIL) #3: Mon Sep  8 12:17:29 CEST 1997
> cpu0: family 5 model 2 step b
> cpu0: Intel Pentium (P54C) (586-class)
> real mem  = 41545728
> avail mem = 36257792
> using 532 buffers containing 2179072 bytes of memory
> mainbus0 (root)
> pci0 at mainbus0 bus 0: configuration mode 1
> Opti 82C557 (host bridge) at pci0 dev 0 function 0 not configured
> Opti 82C558 (ISA bridge) at pci0 dev 1 function 0 not configured
> Cirrus Logic CL-GD7543 (VGA display) at pci0 dev 2 function 0 not configured
> isa0 at mainbus0
> com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
> com2 at isa0 port 0x3e8-0x3ef irq 5: ns16550a, working fifo
> lpt0 at isa0 port 0x378-0x37b irq 7
> wdc0 at isa0 port 0x1f0-0x1f7 irq 14
> #atapibus0 at wdc0
> wd0 at wdc0 drive 0: <TOSHIBA MK2720FC>
> wd0: 1295MB, 2633 cyl, 16 head, 63 sec, 512 bytes/sec
> wd0: using 16-sector 16-bit pio transfers, lba addressing
> ed2 at isa0 port 0x300-0x31f irq 10
> ed2: address 00:a0:d1:02:db:a7, type NE2000 (16-bit)
> sb0 at isa0 port 0x220-0x237 irq 7 drq 1: dsp v3.01
> #audio0 at sb0
> npx0 at isa0 port 0xf0-0xff: using exception 16
> pc0 at isa0 port 0x60-0x6f irq 1: color
> #pms0 at pc0 irq 12
> #pc0: console
> fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
> fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
> biomask 4040 netmask 4440 ttymask 54c2
> boot device: wd0
> root on wd0a dumps on wd0b
> root file system type: ffs