1 #include <console/console.h>
2 #include <part/fallback_boot.h>
3 #include <pc80/mc146818rtc.h>
6 void boot_successful(void)
8 /* Remember I succesfully booted by setting
9 * the initial boot direction
10 * to the direction that I booted.
12 unsigned char index, byte;
13 index = inb(RTC_PORT(0)) & 0x80;
14 index |= RTC_BOOT_BYTE;
15 outb(index, RTC_PORT(0));
17 byte = inb(RTC_PORT(1));
19 byte |= (byte & 2) >> 1;
21 /* If we are in normal mode set the boot count to 0 */
24 outb(byte, RTC_PORT(1));