aboutsummaryrefslogtreecommitdiff
path: root/src/pc80
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2003-07-21 20:13:45 +0000
committerEric Biederman <ebiederm@xmission.com>2003-07-21 20:13:45 +0000
commit2c018fba95a5f40c4eaaa20421e8c893dffdb62e (patch)
tree3b6ecc6eb72d145dd70bb549fe0130370d7e40fb /src/pc80
parent6d4512cdf976fc071720dbec686cf8a1a40f1db0 (diff)
- First pass at s2880 support.
- SMP cleanups (remove SMP only use CONFIG_SMP) - Minor tweaks to romcc to keep it from taking forever compiling - failover fixes - Get a good implementation of k8_cpufixup and sizeram for the opteron git-svn-id: svn://svn.coreboot.org/coreboot/trunk@998 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/pc80')
-rw-r--r--src/pc80/mc146818rtc_early.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/pc80/mc146818rtc_early.c b/src/pc80/mc146818rtc_early.c
index 30369455fe..35f3f5910f 100644
--- a/src/pc80/mc146818rtc_early.c
+++ b/src/pc80/mc146818rtc_early.c
@@ -4,7 +4,7 @@
#ifndef MAX_REBOOT_CNT
#error "MAX_REBOOT_CNT not defined"
#endif
-#if MAX_REBOOT_CNT > 14
+#if MAX_REBOOT_CNT > 15
#error "MAX_REBOOT_CNT too high"
#endif
@@ -78,6 +78,12 @@ static int do_normal_boot(void)
byte &= 0x0f; /* yes, clear the boot count */
}
+ /* Properly set the last boot flag */
+ byte &= 0xfc;
+ if ((byte >> 4) < MAX_REBOOT_CNT) {
+ byte |= (1<<1);
+ }
+
/* Are we already at the max count? */
if ((byte >> 4) < MAX_REBOOT_CNT) {
byte += 1 << 4; /* No, add 1 to the count */
@@ -86,13 +92,8 @@ static int do_normal_boot(void)
byte &= 0xfc; /* Yes, put in fallback mode */
}
- /* Is this the first boot? */
- if ((byte >> 4) <= 1) {
- byte = (byte & 0xfc) | ((byte & 1) << 1); /* yes, shift the boot bits */
- }
-
/* Save the boot byte */
cmos_write(byte, RTC_BOOT_BYTE);
- return ((byte >> 4) < MAX_REBOOT_CNT);
+ return (byte & (1<<1));
}