home *** CD-ROM | disk | FTP | other *** search
- 6x86ctl
- Change/view the Configuration Control Registers of a Cyrix 6x86 CPU
-
- by Ray Van Tassle (rayvt@comm.mot.com)
- V1 Dec 26, 1996
-
- Copyright (c) 1996 by
- Ray Van Tassle
- 1020 Fox Run Lane
- Algonquin, Il. 60102 (USA)
-
-
- There are several programs floating around which set various
- option bits in the Cyrix 6x86 CPU. I didn't like any of them,
- because none allowed me to see all the registers, or to change
- the bits individually. Hence this version.
-
- The -f sets all the performance bits, and also the bit that enables
- the CPUID opcode.
- If you want to set only CPUID-ENABLE, use -e.
-
- I ran some benchmarks with different settings. The big hitter
- seems to be WT_ALLOC.
- With PcBench9.0, Cpumark16:
- After boot 363.2
- with -f 361.9
- with -s 340.9
- -f, no DTE_EN 361.9
- -f, no NOLOCK 361.8
- -f, no FAR_COF 360.5
- -f, no WT_ALLOC 341.4 <===== slowest
-
- The sparsely documented Branch Target Buffer is set to enable
- far change of flow (FAR_COF). IBM shows how to do this, but does
- not explain the undocumented registers used.
- I only enable FAR_COF BTB's when you give the "-f" option. To disable,
- but leave all the others set, use "-s -m -e".
-
- At reset, the 6x86 resets all the CCR's to zero. The bios may (or
- may not) turn on some of the bits. Below is what the settings
- on mine are.
- * Gigabyte GA-586HX motherboard, Award bios (1.11)
- * Cyrix cpu, 6x86/133(P166+) rev 2.7
-
-
- DIR0: 31 2X clock
- DIR1: 17 Stepping 1, rev 7 (rev v2.7)---The good version.
- CCR0: 02 00000010
- ......1. NC1
- CCR1: 82 10000010
- ......1. USE_SMI
- .....0.. SMAC
- ...0.... *NO_LOCK
- 1....... SM3
- CCR2: 80 10000000
- .....0.. LOCK_NW
- ....0... *SUSP_HLT
- ...0.... WPR1
- 1....... *USE_SUSP
- CCR3: 00 00000000
- .......0 SMI_LOCK
- ......0. NMI_EN
- .....0.. LINBRST
- CCR4: 17 00010111
- .......1 _IORT1
- ......1. _IORT2
- .....1.. _IORT4
- ...1.... *DTE_EN
- 0....... *CPUID
- CCR5: 21 00100001
- .......1 *WT_ALLOC
- ...0.... LBR1
- ..1..... ARREN
- Far COF's in BTB are enabled.
-
-
- =======================================================================
- The following info is from the Cyrix Web site, Christian Ludloff's
- great CPU info web site, http://webusers.anet-dfw.com/~ludloff,
- and the IBM 6x86 BIOS Writer's Guide (document 40205).
-
- ------------------------------------------------------------------------------
- CCR0 C0h configuration control register #0
- bit7..2 reserved
- bit1 NC1 - caching for 640K..1M area
- 1=disabled (=never), 0=enabled
- bit0 reserved
- ------------------------------------------------------------------------------
- CCR1 C1h configuration control register #1
- bit7 SM3 - SMM address space address region register #3
- 1=enable address region register #3 for SMM addr. space
- 0=disabled (see also CCR5.ARREN, independent!)
- bit6..4 reserved
- bit4 N_LOCK - negate LOCK#
- 1=enabled, 0=disabled
- bit3 reserved
- bit2 SMAC - enable SMM memory accesses with SMAADS# active
- 1=enabled (SMI# ignored), 0=disabled
- bit1 SMI - enable SMM pins (SMI# I/O pin and SMADS# output pin)
- 1=enabled, 0=disabled (=pins float)
- bit0 reserved
- ------------------------------------------------------------------------------
- CCR2 C2h configuration control register #2
- bit7 SUSP - enable SUSP# input pin and SUSPA# ouput pin
- 1=enabled, 0=disabled (=pins float)
- bit6..5 reserved
- bit4 WT1 - caching for 640K..1M area
- 1=force all writes to 640K..1M area that hit in cache
- issued on the external bus
- 0=disabled
- bit3 HALT - enable entering suspend mode on HLT inctructions
- 1=enabled, 0=disabled
- bit2 LockNW - prohibits changing the state of the CR0.NW bit
- 1=enabled (=prohibited), 0=disabled (=allowed)
- bit1..0 reserved
- ------------------------------------------------------------------------------
- CCR3 C3h configuration control register #3
- bit7..4 MAPEN - select active control register set for D0h..FDh
- 0001=default (others are not valid at the moment)
- bit3 reserved
- bit2 LINBRST - enable linear address sequence for burst cycles
- 1=enabled, 0=disabled
- bit1 NMIEN - enable NMI during SMM
- 1=enabled, 0=disabled
- bit0 SMI_LOCK - SMM register lock
- 1=CCR1.bit3..1 and CCR3.bit1 can't be changed in SMM;
- CCR3.bit0 can be changed in SMM; only RESET clears it!
- 0=disabled
- ------------------------------------------------------------------------------
- CCR4 E8h configuration control register #4
- bit7 CPUID
- 1=enable EFLAGS.bit21 and CPUID instruction
- 0=disable EFLAGS.bit21 and CPUID instruction
- bit6..5 reserved
- bit4 DTE_EN - enable directory table entry cache
- 1=enabled, 0=disabled
- bit3 reserved
- bit2..0 IORT - I/O recovery delay time
- 2^x bus clock cycles (0 = fast, 6 = slow)
- 7 = no delay
- ------------------------------------------------------------------------------
- CCR5 E9h configuration control register #5
- bit7..6 reserved
- bit5 ARREN - address region registers enabled
- 1=enabled, 0=disabled (see also CCR1.SM3, independent!)
- bit4 LBR1 - LBR# pin
- 1=assert LBR# for all accesses to 640K-1M, 0=disabled
- bit3..1 reserved
- bit0 WT_ALLOC - WT allocation
- 1=allocate new cache lines for read and write misses
- 0=allocate new cache lines for read misses only
- ------------------------------------------------------------------------------
- ARR0 .. ARR7 address region register #0 thru #7
- Starting address and size
- #7 defines the Main Memory Region
-
- RCR0 .. region control register #0 thru #7
- bit5 NLB - negate LBA#
- 1=enabled, 0=disabled
- bit4 WT - write through caching
- 1=enabled, 0=disabled
- bit3 WG - write gathering
- 1=enabled, 0=disabled
- bit2 WL - weak locking
- 1=enabled, 0=disabled
- bit1 WWO - weak write ordering
- 1=enabled, 0=disabled
- bit0 RCD - cache disabled for region (for RCR0..6 only)
- RCE - cache enabled for region (for RCR7 only)
- 1=enabled (implies that the address space outside of the
- region specified by ARR7 is non-cacheable), 0=disabled
-