Subject: Re: boot loader timeout under qemu
To: None <port-i386@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: port-i386
Date: 08/06/2005 14:21:02
On Sat, 06 Aug 2005, Alan Barrett wrote:
> When booting an i386 system in a virtual machine under qemu
> (pkgsrc/emulators/qemu), the second stage boot loader's timeout expires
> much too quickly.  If I set the timeout to 6000 seconds (via installboot
> -o timeout=6000), then I observe it counting down at about 100 counts
> per second, instead of 1 count per second.

BTW, the timeout in the mbr_bootsel code (sys/arch/i386/stand/mbr/mbr.S)
does not suffer from this problem.  mbr_bootsel uses the "INT 1A" BIOS
call to count ticks (at approx 18.2 ticks per second), and that works
well enough.  boot2 uses "INT 15H function 86H", and that doesn't work
properly under qemu.

And does the fact that the kernel running under qemu prints "clock:
unknown CMOS layout" have anything to do with this problem?  (ifdef
DIAGNOSTIC in sys/arch/i386/isa/clock.c:clock_expandyear().)

--apb (Alan Barrett)