1 #include <console/console.h>
7 #include <pc80/mc146818rtc.h>
9 static void set_boot_successful(void)
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 if (IS_ENABLED(CONFIG_SKIP_MAX_REBOOT_CNT_CLEAR
)) {
20 /* Set the fallback boot bit to allow for recovery if
21 * the payload fails to boot.
22 * It is the responsibility of the payload to reset
23 * the normal boot bit to 1 if desired
25 byte
&= ~RTC_BOOT_NORMAL
;
27 /* If we are in normal mode set the boot count to 0 */
28 if (byte
& RTC_BOOT_NORMAL
)
33 outb(byte
, RTC_PORT(1));
36 static void set_boot_successful(void)
38 /* To be implemented */
42 void boot_successful(void)
44 #if CONFIG_FRAMEBUFFER_SET_VESA_MODE && !CONFIG_FRAMEBUFFER_KEEP_VESA_MODE
45 void vbe_textmode_console(void);
47 vbe_textmode_console();
49 /* Remember this was a successful boot */
50 set_boot_successful();
52 /* turn off the boot watchdog */