From owner-freebsd-questions@FreeBSD.ORG Fri Jul 16 16:53:10 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CCEB16A4CE for ; Fri, 16 Jul 2004 16:53:10 +0000 (GMT) Received: from ns3.tele-kom.ru (ns3.tele-kom.ru [217.107.251.251]) by mx1.FreeBSD.org (Postfix) with SMTP id 2D43843D41 for ; Fri, 16 Jul 2004 16:53:09 +0000 (GMT) (envelope-from doublef@tele-kom.ru) Received: (qmail 32523 invoked from network); 16 Jul 2004 16:52:43 -0000 Received: from mx.tele-kom.ru (213.80.148.6) by ns.tele-kom.ru with SMTP; 16 Jul 2004 16:52:43 -0000 Received: (qmail 26223 invoked by uid 555); 16 Jul 2004 16:53:41 -0000 Received: from shark (213.80.149.139) by t-k.ru with TeleMail/2 id 1089996820-26201 for freebsd-questions@freebsd.org; Fri, 16 Jul 20:53:40 2004 +0400 (MSD) Received: by shark (Postfix, from userid 1000) id 1905839D; Fri, 16 Jul 2004 20:52:50 +0400 (MSD) Date: Fri, 16 Jul 2004 20:52:48 +0400 From: Sergey Zaharchenko To: breath Message-ID: <20040716165248.GA857@shark.localdomain> Mail-Followup-To: Sergey Zaharchenko , breath , freebsd-questions@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Listening-To: /Machina_Vremeni/Uhodya_uhodi cc: freebsd-questions@freebsd.org Subject: Re: Reboots after "OR AL,1 MOV CR0, EAX" on some computers. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2004 16:53:10 -0000 --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 16, 2004 at 12:32:24AM +0400, breath probably wrote: > Normal: > When you boot from the floppy you get something like black screen and > computer hangs up (but not reboots) >=20 > Abnormal: > When you boot from the floppy you get a screen splash and then back to > reboot POST procedure. Heh. The only thing I can think of right now is an interrupt not masked by the cli you issued. You could try inserting a `mov ss, something' just before the jump. This will prevent any processor from doing any interrupts, as the immediately next instruction should be `mov sp, something' (it was documented somewhere). Like > mov eax, cr0 > or al, 0x1 ; cr0 |=3D PE mov dx, 0x8 > mov cr0, eax mov ss, dx > jmp 0x10: protected > .gdt0 dw 0x0000, 0x0000, 0x0000, 0x0000 > .data dw 0xFFFF, 0x0000, 0x9200, 0x00CF > .code dw 0xFFFF, 0x0000, 0x9800, 0x00CF > .gdtr dw $ - .gdt0 - 1 And why `-1'? > dd .gdt0 You could also try adding CPUID's between all instructions for synchronization, in case it's that kind of issue. > Here goes the code. PLEASE, even if you're not interested in this > 'puzzle':( MAKE AND TEST IT ON YOUR COMPUTER. EMAIL ME RESULTS AND > COMPUTER MODEL. As soon as I have access to the 'puter with nasm, maybe. P.S. Does booting DOS, and running a DOS-extended program succeed or fail? --=20 DoubleF New York is real. The rest is done with mirrors. --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA+Affwo7hT/9lVdwRAiseAJ41caWgT90KUxBSCdDqZwObvD0OkwCbBX7T 1TDdhCQivoQa1SWFkoJ7w0M= =WcGq -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/--