summaryrefslogtreecommitdiff
path: root/src/pc80/mc146818rtc_early.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pc80/mc146818rtc_early.c')
-rw-r--r--src/pc80/mc146818rtc_early.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pc80/mc146818rtc_early.c b/src/pc80/mc146818rtc_early.c
index 1d268f0482..96f8f5d0a4 100644
--- a/src/pc80/mc146818rtc_early.c
+++ b/src/pc80/mc146818rtc_early.c
@@ -1,6 +1,13 @@
#include <pc80/mc146818rtc.h>
#include <part/fallback_boot.h>
+#ifndef MAX_REBOOT_CNT
+#error "MAX_REBOOT_CNT not defined"
+#endif
+#if MAX_REBOOT_CNT > 15
+#error "MAX_REBOOT_CNT too high"
+#endif
+
static unsigned char cmos_read(unsigned char addr)
{
outb(addr, RTC_BASE_PORT + 0);