Date: Fri, 16 Jul 2004 20:52:48 +0400 From: Sergey Zaharchenko <doublef@tele-kom.ru> To: breath <breath@unix.net> Cc: freebsd-questions@freebsd.org Subject: Re: Reboots after "OR AL,1 MOV CR0, EAX" on some computers. Message-ID: <20040716165248.GA857@shark.localdomain> In-Reply-To: <opsa64oairs5rhgt@smtp.hotpop.com> References: <opsa64oairs5rhgt@smtp.hotpop.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <snip> > .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/--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040716165248.GA857>