From owner-freebsd-current Mon Aug 16 2:15:29 1999 Delivered-To: freebsd-current@freebsd.org Received: from gneiss.eps.nagoya-u.ac.jp (gneiss.eps.nagoya-u.ac.jp [133.6.124.148]) by hub.freebsd.org (Postfix) with ESMTP id 86D391549A for ; Mon, 16 Aug 1999 02:15:16 -0700 (PDT) (envelope-from kato@ganko.eps.nagoya-u.ac.jp) Received: from localhost (localhost [127.0.0.1]) by gneiss.eps.nagoya-u.ac.jp (8.9.3/3.7W) with ESMTP id SAA00970 for ; Mon, 16 Aug 1999 18:15:08 +0900 (JST) To: current@FreeBSD.org Subject: Cyrix/IBM CPU detection From: KATO Takenori X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) X-PGP-Fingerprint: 03 72 85 36 62 46 23 03 52 B1 10 22 44 10 0D 9E Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19990816181508C.kato@gneiss.eps.nagoya-u.ac.jp> Date: Mon, 16 Aug 1999 18:15:08 +0900 X-Dispatcher: imput version 980905(IM100) Lines: 63 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Current CPU detection routine sometimes fails to detect IBM BlueLightning CPU. The problem is caused by failure of Cyrix/IBM CPU detection in sys/i386/i386/locore.s. Our Cyrix/IBM CPU detection code is different from that in Cyrix's BIOS writer's guide because latter code cannot distinguish NexGen CPU from Cyrix CPU. Our locore.s detects NexGen CPU before Cyrix CPU detection. So, there is no reason for not using Cyrix's code. I have made a patch bellow which use Cyrix's code. Please report results on following CPUs: 1. IBM BlueLightning CPU (IBM 486SLC) 2. Cyrix/IBM/TI 486SLC/DLC CPU 3. Cyrix/IBM 486DX/DX4 CPU 4. Cyrix 5x86 CPU (aka M1sc CPU) 5. Cyrix 6x86 CPU (aka M1 CPU) 6. Intel 386 CPU I have already received reports on i486DX2 and AMD Am5x86 CPUs and they work without any problem. Also, if you find a problem on other CPU than above list, please let me know. Thank you. ---------- BEGIN ---------- *** locore.s.ORIG Mon Aug 16 14:28:56 1999 --- locore.s Mon Aug 16 14:32:33 1999 *************** *** 674,685 **** * Note: CPUID is enabled on M2, so it passes another way. */ pushfl ! movl $0x5555, %eax ! xorl %edx, %edx ! movl $2, %ecx ! clc ! divl %ecx ! jnc trycyrix popfl jmp 3f /* You may use Intel CPU. */ --- 674,686 ---- * Note: CPUID is enabled on M2, so it passes another way. */ pushfl ! movl $5, %eax ! movl $2, %ebx ! sahf ! divb %bl ! lahf ! cmpb $2, %ah ! je trycyrix popfl jmp 3f /* You may use Intel CPU. */ ---------- END ---------- -----------------------------------------------+--------------------------+ KATO Takenori | FreeBSD | Dept. Earth Planet. Sci, Nagoya Univ. | The power to serve! | Nagoya, 464-8602, Japan | http://www.FreeBSD.org/ | ++++ FreeBSD(98) 3.2: Rev. 01 available! |http://www.jp.FreeBSD.org/| ++++ FreeBSD(98) 2.2.8: Rev. 02 available! +==========================+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message