unsigned int timeout = 1000000, year, mon, day, hour, min, sec;
unsigned char uip = 0, this = 0;
unsigned long flags;
+ unsigned extyear = 0;
/*
* The Linux interpretation of the CMOS clock register contents: When the
mon = CMOS_READ(RTC_MONTH);
year = CMOS_READ(RTC_YEAR);
+#ifdef CONFIG_ACPI
+ if (acpi_fadt.revision >= FADT2_REVISION_ID && acpi_fadt.century)
+ extyear = CMOS_READ(acpi_fadt.century);
+#endif
+
spin_unlock_irqrestore(&rtc_lock, flags);
/*
BCD_TO_BIN(mon);
BCD_TO_BIN(year);
- /*
- * x86-64 systems only exists since 2002.
- * This will work up to Dec 31, 2100
- */
- year += 2000;
+ if (extyear) {
+ BCD_TO_BIN(extyear);
+ year += extyear;
+ printk(KERN_INFO "Extended CMOS year: %d\n", extyear);
+ } else {
+ /*
+ * x86-64 systems only exists since 2002.
+ * This will work up to Dec 31, 2100
+ */
+ year += 2000;
+ }
return mktime(year, mon, day, hour, min, sec);
}