home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 1999 Hardware / PCWExtra.iso / sharewar / pcproble / CMOSSV.EXE / CMOS.OFS < prev    next >
Encoding:
Text File  |  1997-08-25  |  8.8 KB  |  218 lines

  1. CMOS Offsets. How each byte of CMOS is used
  2. *******************************************
  3.  
  4. Last Updated 1996 September 29 by Roedy Green.
  5.  
  6. Understanding this documentation is not needed to use
  7. CMOSSAVE. It is provided mainly for the insatiably
  8. curious. Every machine under the sun uses CMOS a different
  9. way, so this is only a rough guide.
  10.  
  11. !       = must be restored
  12. *       = checksummed
  13. v       = volatile
  14.  
  15. CMOS RAM map, PC/AT:
  16.     offset      contents
  17. v   00h         Seconds time of day
  18. v   01h         Seconds Alarm
  19. v   02h         Minutes time of day
  20. v   03h         Minutes Alarm
  21. v   04h         Hours time of day
  22. v   05h         Hours Alarm
  23. v   06h         Day of the Week
  24. v   07h         Day of the Month
  25. v   08h         Month
  26. v   09h         Year 1980 = 0
  27.     0Ah         Status Register A
  28.                 bit 7 = updating time
  29.                 bit 6:4 = system clock divider
  30.                 bit 3:0 = periodic interrupt rate
  31. !   0Bh         Status Register B alarm
  32.                 bit 7 = abort update cycle
  33.                 bit 6 = enable periodic interrupt
  34.                 bit 5 = enable alarm interrupt
  35.                 bit 4 = enable update-ended interrupt
  36.                 bit 3 = enable square wave generator
  37.                 bit 2 = 1 = calendar in binary, 0 = bcd
  38.                 bit 1 = 1 = 24 hour clock, 0 = 12 hour clock
  39.                 bit 0 = 1 enable daylight savings
  40. v   0Ch         Status Register C flags
  41.                 bit 7 = interrupt active
  42.                 bit 6 = periodic interrupt flag
  43.                 bit 5 = alarm flag
  44.                 bit 4 = update end flag
  45.                 bit 3:0 = reserved
  46. !   0Dh         Status Register D battery
  47.                 bit 7 = Real Time Clock has power
  48.                 bit 6:0 = reserved
  49. !   0Eh         Diagnostic Status Byte
  50.                 bit 7 = RTC lost power
  51.                 bit 6 = CMOS checksum bad
  52.                 bit 5 = invalid system config
  53.                 bit 4 = invalid memory size
  54.                 bit 3 = fixed disk adapter failure
  55.                 bit 2 = invalid CMOS time
  56.                 bit 1 = reserved
  57.                 bit 0 = reserved
  58. !   0Fh         Shutdown Status Byte
  59. !*  10h         Disk Drive Type for Drives A: and B:
  60.                 The drive-type bytes use bits 7:4 (most significant nibble)
  61.                 for the first floppy drive A: and 3:0 for B:
  62.                 floppy drive types:
  63.                 00h         no drive present
  64.                 01h         360KB
  65.                 02h         1.2MB
  66.                 03h         720KB
  67.                 04h         1.44MB
  68.                 05h         2.88MB
  69.                 03h-0Fh     reserved
  70. !*  11h         (AT):Reserved    (PS/2):drive type for hard disk C:
  71.                 AMI bios uses it like this:
  72.                 bit 7   mouse enabled
  73.                 bit 6   test memory above 1 MB
  74.                 bit 5   tick sound during memory test
  75.                 bit 4   memory parity enabled
  76.                 bit 3   at bootup display setup keystroke
  77.                 bit 2   specify hard disk data location
  78.                 bit 1   pause on error
  79.                 bit 0   numlock on
  80. !*  12h
  81.                 (AT, XT/286):hard disk type for drives C: and D:
  82.                 bits 7:4 C: bits 3:0 D:
  83.                 (PS/2):drive type for hard disk D:
  84.                 Format of drive-type entry for AT, XT/286:
  85.                 0       number of cyls in drive (0-1023 allowed)
  86.                 2       number of heads per drive (0-15 allowed)
  87.                 3       starting reduced write compensation (not
  88.                         used on AT)
  89.                 5       starting cylinder for write compensation
  90.                 7       max. ECC data burst length, XT only
  91.                 8       control byte
  92.                         Bit
  93.                         7    disable disk-access retries
  94.                         6    disable ECC retries
  95.                         5-4  reserved, set to zero
  96.                         3    more than 8 heads
  97.                         2-0  drive option on XT (not used by AT)
  98.                 9       timeout value for XT (not used by AT)
  99.                12       landing zone cylinder number
  100.                14       number of sectors per track (default 17,
  101.                         0-17 allowed)
  102. !*  13h         Reserved, keyboard repeat rate
  103. !*  14h         Equipment Byte (corresponds to sw. 1 on PC and XT)
  104.                 bits 7:6 - 00 = 1 floppy 01 = 2 floppies
  105.                 bits 5:4 = 10 = colour 11 = mono
  106.                 bit 1 = coprocessor present
  107.                 bit 0 = 0 = floppies present
  108. !*  15h-16h     Base Memory Size in K      (low,high)
  109. !*  17h-18h     Expansion Memory Size in K (low,high)
  110. !*  19h         drive C: extended info
  111. !*  1Ah         drive D: extended info
  112. !*  1Bh-20h     Reserved
  113.                 (PS/2) POS information Model 50 (60 and 80 use a 2k
  114.                 CMOS RAM that is not accessible through software)
  115. !*  1Bh-1CH     AMI type 46 cyls
  116. !*  1Dh         AMI type 46 head count
  117. !*  1Eh-1Fh     AMI type 46 write precomp starting cyl
  118. !*  20h         AMI type 46 control byte
  119. !*  21h-22h     AMI type 46 landing zone cylinder
  120. !*  23h         AMI type 46 sectors per track
  121.  
  122. !*  24h-25H     AMI type 47 cyls
  123. !*  26h         AMI type 47 head count
  124. !*  27h-28h     AMI type 47 write precomp starting cyl
  125. !*  29h         AMI type 47 control byte
  126. !*  2Ah-2Bh     AMI type 47 landing zone cylinder
  127. !*  2Ch         AMI type 47 sectors per track
  128.  
  129. !*  21h         Used in AMI bioses
  130.                 bit 7   Weitek present
  131.                 bit 6   floppy seek on boot
  132.                 bit 5   first C: then A:
  133.                 bit 4   fast clock
  134.                 bit 3   external cache enabled
  135.                 bit 2   internal cache enabled
  136.                 bit 1   fast A20
  137.                 bit 0   allow turbo switch
  138. !*  22h-2Dh     Reserved (possibly checksumed)
  139.  
  140. !*  2Eh-2Fh     Checksum of Bytes 10..20 or 10..2F  (low,high)
  141. !   30h-31h     Exp. Memory Size as Det. by POST (low,high)
  142. v   32h         Date Century Byte
  143. !   33h         Information Flags (set during power-on)
  144. !   34h-36h     Reserved
  145. !   37h         Date Century on MCA
  146. !   34h-3Bh     Reserved
  147. !   3Ch         90/91 AMI Bios boot order A/C or C/A
  148. !   3Dh-3Eh     Reserved
  149. !   3Fh         quasi-volatile in Pentiums (We restore, but ignore in CMOSCHK)
  150. !   40h-79h     Reserved for chipmaker
  151.  
  152.     4Ah         AST laptop backlight timeout in minutes
  153.     4Bh         AST laptop hard disk timeout in minutes
  154.     4Ch-52h     system password scan codes
  155.  
  156. !*  60h-61H     Phoenix type 48 cyls
  157. !*  62h         Phoenix type 48 head count
  158. !*  63h-64h     Phoenix type 48 write precomp starting cyl
  159. !*  65h-65h     Phoenix type 48 landing zone cylinder
  160. !*  67h         Phoenix type 48 sectors per track
  161.  
  162. !*  75h-76H     Phoenix type 49 cyls
  163. !*  77h         Phoenix type 49 head count
  164. !*  78h-79h     Phoenix type 49 write precomp starting cyl
  165. !*  7Ah-7Bh     Phoenix type 49 landing zone cylinder
  166. !*  7Ch         Phoenix type 49 sectors per track
  167.  
  168. Notes:
  169. ******
  170.  
  171. The alarm function is used to drive the BIOS WAIT function (int
  172. 15h function 90h).
  173.  
  174. To access the configuration RAM write the byte address (00-3Fh)
  175. you need to access to I/O port 70h, then access the data via I/O
  176. port 71h.
  177.  
  178. CMOS RAM chip is a Motorola 146818
  179.  
  180. The equipment byte is used to determine the configuration for
  181. the POST power-on diagnostics.
  182.  
  183. Bytes 00-0Dh are defined by the chip for timing functions, bytes
  184. 0Eh-3Fh are defined by IBM.
  185.  
  186. Compaq 386 uses came CMOS chip as IBM AT. Extra functions:
  187.     byte 45 (2Dh) store additional info not maintained by AT
  188.     bit 0 indicates is Compaq dual-mode monitor isntalled
  189.         1 indicates whether keyclick is enabled
  190.         2 not used
  191.         3 if non-Compaq graphics adapter installed
  192.  
  193. Some CMOSes, (SXs) appear to store duplicates of registers 0:3F
  194. in 40:7F, others (DXs) store some other advanced configuration
  195. information in these registers.  Thus there are 64 byte and 128
  196. byte CMOSes.  We tell them apart by looking for a match in bytes
  197. in the checksum range.
  198.  
  199. Offsets 10..2F are included in the checksum.  We do not ever
  200. need to compute a checksum in CMOSREST since we just save and
  201. restore.  Exactly what is included in the checksum varies with
  202. the BIOS.  Sometimes only 10..20 is included.
  203.  
  204. For further information see the IBM AT Technical reference page
  205. 1-56.  PC Magazine did an article on CMOS on page 344 of the
  206. September 13, 1994 edition.
  207.  
  208. The most detailed list, especially for vendor specific bytes is
  209. in The Undocumented PC, A Programmer's Guide To I/O, CPUs, and
  210. Fixed Memory Areas by Frank van Gilluwe, Addison-Wesley
  211. ISBN 0-201-62277-7.
  212.  
  213. You can modify the VOLATILIST in CMOS.ASM if you find other volatile
  214. bytes in your cmos, in other words, bytes in CMOS that seem to change
  215. even when cmos is not corrupted.
  216.  
  217. -30-
  218.