COHERENT manpages
This page displays the COHERENT manpage for cmos [Device for reading CMOS].
List of available manpages
Index
cmos -- Device Driver
Device for reading CMOS
The file /dev/cmos the entry via which you can read your system's CMOS. It
is a part of the driver mem, which manages memory; thus, it has major
number 0 and minor number 3.
The CMOS is a special, non-volatile area of random-access memory (RAM) that
holds information about your system's configuration. The following gives
the common meanings assigned to the various byte positions within the CMOS
area:
Real-time clock:
0x00 Seconds
0x01 Alarm, seconds
0x02 Minutes
0x03 Alarm, minutes
0x04 Hours
0x05 Alarm, hours
0x06 Day of the week
0x07 Day of the month
0x08 Month
0x09 Year
0x0A Update in progress
Diagnostic power byte:
0x0E Bit 7 -- Chip lost power
Bit 6 -- Bad checksum
Bit 5 -- Bad configuration byte
Bit 4 -- Bad memory size
Bit 3 -- Bad hard-disk byte
Bit 2 -- Bad time of day
Restart-status byte:
0x0F Reloaded when restarting, e.g., returning from
protected mode
Floppy-disk drive, drives A and B:
0x10 Bits 7-4 -- Drive A:
0 = no drive
1 = 360-kilobyte drive
2 = 1.2-megabyte drive
3 = 720-kilobyte drive
4 = 1.44-megabyte drive
Bits 3-0 -- Drive B:
0 = no drive
1 = 360-kilobyte drive
2 = 1.2-megabyte drive
3 = 720-kilobyte drive
4 = 1.44-megabyte drive
Floppy-disk drive, drives C and D:
0x11 Bits 7-4 -- Drive C:
0 = no drive
1 = 360-kilobyte drive
2 = 1.2-megabyte drive
3 = 720-kilobyte drive
4 = 1.44-megabyte drive
Bits 3-0 -- Drive D:
0 = no drive
1 = 360-kilobyte drive
2 = 1.2-megabyte drive
3 = 720-kilobyte drive
4 = 1.44-megabyte drive
Hard-disk drive:
0x12 Bits 7-4 -- First hard-disk drive
0 = No drive
1-3 = Type 1-15
F = Use contents of byte 19
Bits 3-0 -- Second hard-disk drive
0 = No drive
1-3 = Type 1-15
F = Use contents of byte 1A
Configuration of equipment:
0x014 Bits 7-6 -- Floppy disks
00 = one floppy-disk drive
01 = two floppy-disk drives
10 = three floppy-disk drives
11 = four floppy-disk drives
Bits 5-4 -- Type of display
00 = EGA/VGA
01 = CGA 40×25
10 = CGA 80×25
11 = monochrome display
Bit 1 -- floating-point coprocessor installed
Bit 0 -- Floppy-disk drive present
Memory:
0x15-0x16 Amount of memory below one megabyte
0x17-0x18 Amount of memory above one megabyte
Type of hard disk:
0x19 Type of first hard disk. Read only when
bits 7-4 of byte 0x12 equal 0xF.
0x21 Type of second hard disk. Read only when
bits 3-0 of byte 0x12 equal 0xF.
Miscellaneous:
0x2E-0x2F Checksum for bytes 0x10 through 0x2D
0x30-0x31 Indicate memory size above one megabyte
0x32 Century byte (BCD)
0x33 Flag for power-on information:
Bit 7 -- Top 128 kilobytes of RAM is installed
(shadow RAM is available)
Bit 6 -- First boot after running set-up routine
/dev/cmos limits access to a 256-byte data area. Any attempt to read or
write beyond this limit will fail.
See Also
ATclock,
clock,
device drivers,
RAM
Notes
If you want to read or set the real time clock, then you should use
/dev/clock instead of /dev/cmos.
Vendor-specific information, e.g., your system's memory configuration, is
often kept in the CMOS area at locations beyond those documented above.
Therefore, writing to undocumented regions of the CMOS area is extremely
unwise: your computer could subsequently refuse to boot up properly.
Caveat utilitor.











