Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Aug 1999 18:15:08 +0900
From:      KATO Takenori <kato@ganko.eps.nagoya-u.ac.jp>
To:        current@FreeBSD.org
Subject:   Cyrix/IBM CPU detection
Message-ID:  <19990816181508C.kato@gneiss.eps.nagoya-u.ac.jp>

next in thread | raw e-mail | index | archive | help
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 <kato@ganko.eps.nagoya-u.ac.jp>  |        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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990816181508C.kato>