Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 May 1996 15:36:32 +0900
From:      si@injapan.net
To:        hackers@freebsd.org
Cc:        si@injapan.net
Subject:   distinguish i386SX from i386DX [locore.s]
Message-ID:  <199605170636.PAA04414@js3guj.injapan.net>

next in thread | raw e-mail | index | archive | help
Hello hackers,

I added the code that distinguish i386SX from i386DX to 'locore.s' and
modify 'specialreg.h'.

I tested this code on my i386SX box only, because there are no i386DX box 
around me. If you have one, please test and tell me (or this ML) the result.

And I tested this code on FreeBSD-2.0.5R only.


My i386SX box's configuration:

Model:	Toshiba J3100SX001VW
CPUs:	i386SX(20MHz) + i387SX
Memory:	10M
HD:	200M
OS:	FreeBSD-2.0.5R

Following diffs are for FreeBSD-current.

*** 1.1	1996/05/17 05:23:21
--- locore.s	1996/05/17 05:48:51
***************
*** 547,552 ****
--- 547,568 ----
  	testl	%eax,%eax
  	jnz	1f
  	movl	$CPU_386,_cpu-KERNBASE
+ 
+ 	/* Try to toggle ET bit; cannot change on 386SX. */
+ 	movl	%cr0,%eax
+ 	movl	%eax,%ecx
+ 	orl	$CR0_ET,%eax
+ 	movl	%eax,%cr0
+ 
+ 	movl	%cr0,%eax
+ 	xorl	%ecx,%eax               
+ 	andl	$CR0_ET,%eax
+ 	movl	%ecx,%cr0
+         
+ 	testl	%eax,%eax
+ 	jnz	1f
+ 	movl	$CPU_386SX,_cpu-KERNBASE        
+ 
  	jmp	3f
  
  1:	/* Try to toggle identification flag; does not exist on early 486s. */


*** 1.1	1996/05/17 05:34:53
--- specialreg.h	1996/05/17 05:35:15
***************
*** 46,54 ****
  #define	CR0_EM	0x00000004	/* EMulate non-NPX coproc. (trap ESC only) */
  #endif
  #define	CR0_TS	0x00000008	/* Task Switched (if MP, trap ESC and WAIT) */
- #ifdef notused
  #define	CR0_ET	0x00000010	/* Extension Type (387 (if set) vs 287) */
- #endif
  #define	CR0_PG	0x80000000	/* PaGing enable */
  
  /*
--- 46,52 ----



--si
-.. . .--- ... ...-- --. ..- .---



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