home *** CD-ROM | disk | FTP | other *** search
/ Computer Installation Guide - Dragon Clan Series / CD1.iso / cpu / 6x86ctl1 / 6X86CTL.DOC next >
Encoding:
Text File  |  1996-12-27  |  7.3 KB  |  172 lines

  1. 6x86ctl
  2. Change/view the Configuration Control Registers of a Cyrix 6x86 CPU
  3.  
  4. by Ray Van Tassle    (rayvt@comm.mot.com)
  5. V1 Dec 26, 1996
  6.  
  7.     Copyright (c) 1996 by
  8.     Ray Van Tassle
  9.     1020 Fox Run Lane
  10.     Algonquin, Il. 60102  (USA)
  11.  
  12.  
  13. There are several programs floating around which set various
  14. option bits in the Cyrix 6x86 CPU.  I didn't like any of them,
  15. because none allowed me to see all the registers, or to change
  16. the bits individually.  Hence this version.
  17.  
  18. The -f sets all the performance bits, and also the bit that enables
  19. the CPUID opcode.
  20. If you want to set only CPUID-ENABLE, use -e.
  21.  
  22. I ran some benchmarks with different settings.  The big hitter
  23. seems to be WT_ALLOC.
  24.     With PcBench9.0, Cpumark16:
  25.         After boot    363.2
  26.         with -f        361.9
  27.         with -s        340.9
  28.         -f, no DTE_EN    361.9
  29.         -f, no NOLOCK    361.8
  30.         -f, no FAR_COF    360.5
  31.         -f, no WT_ALLOC    341.4 <===== slowest
  32.  
  33. The sparsely documented Branch Target Buffer is set to enable
  34. far change of flow (FAR_COF).  IBM shows how to do this, but does
  35. not explain the undocumented registers used.
  36. I only enable FAR_COF BTB's when you give the "-f" option.  To disable,
  37. but leave all the others set, use "-s -m -e".
  38.  
  39. At reset, the 6x86 resets all the CCR's to zero.  The bios may (or
  40. may not) turn on some of the bits.  Below is what the settings
  41. on mine are.
  42.     * Gigabyte GA-586HX motherboard, Award bios (1.11)
  43.     * Cyrix cpu, 6x86/133(P166+) rev 2.7
  44.  
  45.  
  46. DIR0: 31  2X clock
  47. DIR1: 17  Stepping 1, rev 7 (rev v2.7)---The good version.
  48. CCR0: 02  00000010
  49.           ......1.   NC1
  50. CCR1: 82  10000010
  51.           ......1.   USE_SMI
  52.           .....0..   SMAC
  53.           ...0....  *NO_LOCK
  54.           1.......   SM3
  55. CCR2: 80  10000000
  56.           .....0..   LOCK_NW
  57.           ....0...  *SUSP_HLT
  58.           ...0....   WPR1
  59.           1.......  *USE_SUSP
  60. CCR3: 00  00000000
  61.           .......0   SMI_LOCK
  62.           ......0.   NMI_EN
  63.           .....0..   LINBRST
  64. CCR4: 17  00010111
  65.           .......1  _IORT1
  66.           ......1.  _IORT2
  67.           .....1..  _IORT4
  68.           ...1....  *DTE_EN
  69.           0.......  *CPUID
  70. CCR5: 21  00100001
  71.           .......1  *WT_ALLOC
  72.           ...0....   LBR1
  73.           ..1.....   ARREN
  74. Far COF's in BTB are enabled.
  75.  
  76.  
  77. =======================================================================
  78. The following info is from the Cyrix Web site,  Christian Ludloff's
  79. great CPU info web site, http://webusers.anet-dfw.com/~ludloff,
  80. and the IBM 6x86 BIOS Writer's Guide (document 40205).
  81.  
  82.  ------------------------------------------------------------------------------
  83.  CCR0  C0h  configuration control register #0
  84.             bit7..2  reserved
  85.             bit1     NC1 - caching for 640K..1M area
  86.                        1=disabled (=never), 0=enabled
  87.             bit0     reserved
  88.  ------------------------------------------------------------------------------
  89.  CCR1  C1h  configuration control register #1
  90.             bit7     SM3 - SMM address space address region register #3
  91.                        1=enable address region register #3 for SMM addr. space
  92.                        0=disabled (see also CCR5.ARREN, independent!)
  93.             bit6..4  reserved
  94.             bit4     N_LOCK - negate LOCK#
  95.                        1=enabled, 0=disabled
  96.             bit3     reserved
  97.             bit2     SMAC - enable SMM memory accesses with SMAADS# active
  98.                        1=enabled (SMI# ignored), 0=disabled
  99.             bit1     SMI - enable SMM pins (SMI# I/O pin and SMADS# output pin)
  100.                        1=enabled, 0=disabled (=pins float)
  101.             bit0     reserved
  102.  ------------------------------------------------------------------------------
  103.  CCR2  C2h  configuration control register #2
  104.             bit7     SUSP - enable SUSP# input pin and SUSPA# ouput pin
  105.                        1=enabled, 0=disabled (=pins float)
  106.             bit6..5  reserved
  107.             bit4     WT1 - caching for 640K..1M area
  108.                        1=force all writes to 640K..1M area that hit in cache
  109.                          issued on the external bus
  110.                        0=disabled
  111.             bit3     HALT - enable entering suspend mode on HLT inctructions
  112.                        1=enabled, 0=disabled
  113.             bit2     LockNW - prohibits changing the state of the CR0.NW bit
  114.                        1=enabled (=prohibited), 0=disabled (=allowed)
  115.             bit1..0  reserved
  116.  ------------------------------------------------------------------------------
  117.  CCR3  C3h  configuration control register #3
  118.             bit7..4  MAPEN - select active control register set for D0h..FDh
  119.                        0001=default (others are not valid at the moment)
  120.             bit3     reserved
  121.             bit2     LINBRST - enable linear address sequence for burst cycles
  122.                        1=enabled, 0=disabled
  123.             bit1     NMIEN - enable NMI during SMM
  124.                        1=enabled, 0=disabled
  125.             bit0     SMI_LOCK - SMM register lock
  126.                        1=CCR1.bit3..1 and CCR3.bit1 can't be changed in SMM;
  127.                          CCR3.bit0 can be changed in SMM; only RESET clears it!
  128.                        0=disabled
  129.  ------------------------------------------------------------------------------
  130.  CCR4  E8h  configuration control register #4
  131.             bit7     CPUID
  132.                        1=enable EFLAGS.bit21 and CPUID instruction
  133.                        0=disable EFLAGS.bit21 and CPUID instruction
  134.             bit6..5  reserved
  135.             bit4     DTE_EN - enable directory table entry cache
  136.                        1=enabled, 0=disabled
  137.             bit3     reserved
  138.             bit2..0  IORT - I/O recovery delay time
  139.                        2^x bus clock cycles (0 = fast, 6 = slow)
  140.             7 = no delay    
  141.  ------------------------------------------------------------------------------
  142.  CCR5  E9h  configuration control register #5
  143.             bit7..6  reserved
  144.             bit5     ARREN - address region registers enabled
  145.                        1=enabled, 0=disabled (see also CCR1.SM3, independent!)
  146.             bit4     LBR1 - LBR# pin
  147.                        1=assert LBR# for all accesses to 640K-1M, 0=disabled
  148.             bit3..1  reserved
  149.             bit0     WT_ALLOC - WT allocation
  150.                        1=allocate new cache lines for read and write misses
  151.                        0=allocate new cache lines for read misses only
  152.  ------------------------------------------------------------------------------
  153.  ARR0 .. ARR7  address region register #0 thru #7
  154.         Starting address and size
  155.         #7 defines the Main Memory Region
  156.  
  157.  RCR0  ..  region control register #0 thru #7
  158.             bit5     NLB - negate LBA#
  159.                        1=enabled, 0=disabled
  160.             bit4     WT - write through caching
  161.                        1=enabled, 0=disabled
  162.             bit3     WG - write gathering
  163.                        1=enabled, 0=disabled
  164.             bit2     WL - weak locking
  165.                        1=enabled, 0=disabled
  166.             bit1     WWO - weak write ordering
  167.                        1=enabled, 0=disabled
  168.             bit0     RCD - cache disabled for region (for RCR0..6 only)
  169.                      RCE - cache enabled for region (for RCR7 only)
  170.                        1=enabled (implies that the address space outside of the
  171.                          region specified by ARR7 is non-cacheable), 0=disabled
  172.