From owner-freebsd-hackers Thu May 16 23:36:45 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id XAA19482 for hackers-outgoing; Thu, 16 May 1996 23:36:45 -0700 (PDT) Received: from js3guj.injapan.net (pms16.inJapan.net [202.243.53.80]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id XAA19469 for ; Thu, 16 May 1996 23:36:37 -0700 (PDT) Received: (from si@localhost) by js3guj.injapan.net (8.6.11/8.6.9) id PAA04414; Fri, 17 May 1996 15:36:32 +0900 Date: Fri, 17 May 1996 15:36:32 +0900 Message-Id: <199605170636.PAA04414@js3guj.injapan.net> From: si@injapan.net To: hackers@freebsd.org Subject: distinguish i386SX from i386DX [locore.s] CC: si@injapan.net Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 -.. . .--- ... ...-- --. ..- .---