Subject: apm hangs my system
To: None <port-i386@NetBSD.ORG>
From: Martin Husemann <martin@rumolt.teuto.de>
List: port-i386
Date: 07/25/1997 09:15:42
I just upgraded to -current supped last night.
A new kernel hangs rock solid in the apm probe. I modified apm_busprobe
a bit to look like this:
---8<---
int
apm_busprobe()
{
struct apmregs regs;
#ifdef APMDEBUG
char bits[128];
#endif
DPRINTF(APMDEBUG_PROBE, ("apm: doing bioscall\n"));
regs.ax = APM_BIOS_FN(APM_INSTALLATION_CHECK);
regs.bx = APM_DEV_APM_BIOS;
regs.cx = regs.dx = regs.si = regs.di = regs.flags = 0;
bioscall(APM_SYSTEM_BIOS, ®s);
DPRINTF(APMDEBUG_PROBE, ("apm: bioscall return: %x %x %x %x %s %x %x\n",
regs.ax, regs.bx, regs.cx, regs.dx,
bitmask_snprintf(regs.flags, I386_FLAGBITS, bits, sizeof(bits)),
regs.si, regs.di));
--->8---
It hits the first DPRINTF and then does nothing any more. I can't drop into
ddb, so I guess something in the bioscall goes very wrong.
I'll be glad to run any tests or provide more info, if someone could give
me some hints what to look for.
Dmesg output of the old kernel is appended below.
Martin
NetBSD 1.2E (HWART) #0: Sat May 17 09:49:13 MEST 1997
root@hwart.teuto.de:/usr/src/sys-local/arch/i386/compile/HWART
cpu0: family 6 model 3 step 2
cpu0: Intel Pentium Pro (686-class) with MMX
real mem = 65384448
avail mem = 59428864
using 823 buffers containing 3371008 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x8086 product 0x1237 (rev. 0x02)
pcib0 at pci0 dev 7 function 0
pcib0: vendor 0x8086 product 0x7000 (rev. 0x01)
vendor 0x8086 product 0x7010 (IDE mass storage, interface 0x80) at pci0 dev 7 function 1 not configured
vendor 0x121a product 0x0001 (video multimedia, revision 0x02) at pci0 dev 11 function 0 not configured
vendor 0x1002 product 0x5654 (VGA display, revision 0x48) at pci0 dev 17 function 0 not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x3e8-0x3ef irq 4: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b irq 7
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
wd0 at wdc0 drive 0: <WDC AC21600H>
wd0: 1549MB, 3148 cyl, 16 head, 63 sec, 512 bytes/sec
wd0: using 16-sector 16-bit pio transfers, lba addressing
wd1 at wdc0 drive 1: <Maxtor 83500 A8>
wd1: 3346MB, 6800 cyl, 16 head, 63 sec, 512 bytes/sec
wd1: using 16-sector 16-bit pio transfers, lba addressing
wdc1 at isa0 port 0x170-0x177 irq 15
atapibus0 at wdc1
acd0 at atapibus0 drive 0: <MATSHITADVD-ROM SR-8581 PP1@06/27/96, , 048A> type 5/cdrom removable
acd0: medium type unknown
acd1 at atapibus0 drive 1: <CD-ROM CDU311, , 3.0i> type 5/cdrom removable
acd1: medium type unknown
ed0 at isa0 port 0x300-0x31f irq 10
ed0: address 00:00:b4:32:29:61, type NE2000 (16-bit)
sb0 at isa0 port 0x220-0x22f irq 5 drq 1: dsp v1.00
npx0 at isa0 port 0xf0-0xff: using exception 16
vt0 at isa0 port 0x60-0x6f irq 1: generic, 80 col, color, 8 scr, mf2-kbd, [R3.32]
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
joy0 at isa0 port 0x201
joy0: joystick connected
apm0 at mainbus0: Power Management spec V1.1 (BIOS mgmt disabled) (BIOS managing devices)
apm0: A/C state: on
apm0: battery charge state: no battery
biomask c040 netmask c440 ttymask c442
boot device: wd1
root on wd1a swap on wd1b
root file system type: ffs
wd0: no disk label