From owner-freebsd-hackers Thu Apr 27 16:10:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id CCFB737BB5A for ; Thu, 27 Apr 2000 16:09:58 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id TAA01034; Thu, 27 Apr 2000 19:09:40 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-Id: <200004272309.TAA01034@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 27 Apr 2000 19:09:40 -0400 (EDT) From: John Baldwin To: Chris Shenton Subject: RE: 4.0-RELEASE ASUS K7V floppy boot fails -- register dump Cc: hackers@FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 27-Apr-00 Chris Shenton wrote: > Got a new ASUS K7V with AMD K7 700Mhz processor trying to install > FreeBSD-4.0 from the kern.flp on ftp.freebsd.org. It dumps the > registers immediately after saying > > /boot.config: -P > Keyboard: yes > / [spin icon just twitches once or somethign] > > Here's what the 4.0-RELEASE kern.flp dumps before halting; I'm > supressing the leading zeros so I can typie this: > > int=d err=0 efl=30002 eip=56af > eax=208 ebx=0 ecx=c0010010 edx=100 > esi=b edi=5 ebp=3f4 esp=3c4 > cs=f000 ds=ec00 es=1000 fs=0 gs=0 ss=9e75 > cs: eip=0f 32 66 0d 00 00 08 00-0f 30 c3 66 b9 10 00 01 > ss: esp=12 57 03 01 00 00 00 01-00 00 8d 1d 00 ec ba 1d > System Halted It appears to be some weird BIOS problem (cs=f000 is the BIOS code segment): 00000000 0F32 rdmsr 00000002 660D00000800 or eax,0x80000 00000008 F1 int1 00000009 30C3 xor bl,al 0000000B 66B910000101 mov ecx,0x1010010 It's trying to read a Machine Status Register, specifically MSR[0xc0010010] (%ecx) into %edx:%eax. It then is setting a bit in the value it read, and executing an undocumented/ invalid instruction. *sigh*, why must hardware manufacturers be so difficult? The real problem is that the rdmsr instruction can't be executed in virtual 86 mode, which we use to make BIOS calls once boot2 has started up. When the machine fails to boot the first time, it probably ends up running this BIOS hook in real mode, where it succeeds, and supposing it is a once-only init type of thing, the second time around it sees that it's already done this and doesn't bother executing the instruction, thus not faulting. Now, it could be that or at some point we are wondering off into lala land and executing random code, but I really doubt it, especially since the processor is in vm86 mode (most likely) when it executes this instruction, and we are only in vm86 mode when we call the BIOS. > I've also tried this with the 3.4-RELEASE floppy and it fails > similarly, tho dumps the registers twice for some reason. Probably another little buglet I accidentally introduced in 3.4 that causes the fault handler to execute an invalid instruction since it doesn't leave protected mode when it tries to exit after the first fault. :P > BTW: Solaris-x86-beta does boot from floppy. It may not be running in protected mode as early as we are, thus not tripping a General Protection Fault like we do. > Any hints? I'd really prefer not to go to (ehem) another operating system. Well, we're looking into it. :) We'll let you know when we have more info. > Thanks. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message