Year 2000 technical summary |
2 | PC Hardware | << >> |
2.0 | Contents |
2.0 Contents | ||
2.1 PC Hardware | ||
2.2 The BIOS | ||
2.2.1 The BIOS data area | ||
2.2.2 The BIOS software interface | ||
2.3 The Real Time Clock |
2.1 | PC Hardware |
This chapter discusses the hardware aspect of the Y2K problem on Intel x86 based PCs, the BIOS and the RTC. |
2.2 | The BIOS |
The PC BIOS (Basic Input Output System) is a ROM chip
on the main system board. It contains executable code which controls the
initial boot procedure of a PC, including self test and configuration of
various hardware components. It also provides a very simple software
interface on which an OS can rely to access disk, keyboard and screen
before custom drivers are loaded by the OS.
Most BIOSes are clearly visible as a large chip, mounted in a socket on the main system board. Typically they have a sticker on top with the vendor name and BIOS version. Most BIOS ROMs are erasable and rewritable, the sticker is there to protect the chip from ultra-violet light. Newer BIOS ROMs can be programmed by the PC itself, this type of ROM is usually a flash ROM. By creating a special boot disk containing software from the PC or system board vendor the BIOS can be updated automatically. This procedure is often used to solve bugs in the system, such as correct initialisation of hardware, and indeed to resolve Y2K related problems. |
2.2.1 | The BIOS data area |
The BIOS data area
is an area of RAM set aside for use by the BIOS. It contains hardware
settings and status data, and various scratchpad data for the BIOS.
It is placed low in physical memory, at segment address 0x40.
The following table lists the time/date related storage areas.
|
|
2.2.2 | The BIOS software interface |
The BIOS offers a software API via software interrupt vector 0x1A, this
provides a programmer interface to most of the functionality of the RTC,
and deals with the arcane timing complexities of reading and updating the
RTC registers.
|
2.3 | The Real Time Clock |
The RTC is a battery backed clock, which maintains the system date and time when the PC is powered off. It also contains a small amount of RAM(¹), which is used by the system to store such things as hard disk parameters and system settings which need to be maintained permanently. EISA and MCA machines contain extra memory, usually 2Kb or more for sotring more information about peripherals and configurations. Other functions include event timer and trigger, and square wave input to the system speaker(²) |
|
Dallas Semiconductor and Motorola make the most popular RTCs found in
PCs.
Most RTCs have various problems. They are not very accurate, often drifting
many seconds in a day. Most only have a 1 byte storage location for
the year, stored in BCD format, so it's limited to the range [00-99].
Some newer RTCs have a designated century byte, but it's not always updated
correctly, and even if it is, the BIOS may not use the century byte at all.
For the OS, it's up to the BIOS (see § 2.2.2) to provide the correct century. Of course, if the RTC can't tell the difference between the years 1900 and 2000 (or even 2100), it's bound to get the leap day calculations wrong at least once, so again, this may require correction by the BIOS. And even if the RTC is correct, the BIOS can get it wrong. For example, if the BIOS finds that the year is "00" it may fail a valid date test and assume that the CMOS battery failed, and reset the date to a default date (older AMI BIOSes are prone to this problem). |
Due to the nature of the PC, almost any program can access the RTC, at least while running DOS or Windows 3.x. Windows 95/98 does virtualise IO port access, and can detect or prevent access to the IO ports controlling the RTC, although it is not clear if it actually does this. Windows NT provides a virtual RTC, but Microsoft's implementation did not provide a century storage byte. See Chapter 3 §3.6 (OS Issues , Windows NT). |
|