misc: Panic improvements

This commit is contained in:
mintsuki 2022-03-14 12:03:12 +01:00
parent 80f8f434f2
commit ea6475885d
2 changed files with 13 additions and 10 deletions

View File

@ -21,23 +21,25 @@ noreturn void panic(bool allow_menu, const char *fmt, ...) {
quiet = false;
if (
#if bios == 1
stage3_loaded == true &&
#endif
term_backend == NOT_READY) {
#if bios == 1
term_textmode();
#elif uefi == 1
term_vbe(0, 0);
#endif
static bool is_nested = false;
if (is_nested) {
goto nested;
}
is_nested = true;
if (
#if bios == 1
stage3_loaded == true &&
#endif
term_backend == NOT_READY) {
early_term = true;
term_vbe(0, 0);
}
nested:
if (term_backend == NOT_READY) {
term_fallback();
}

View File

@ -40,6 +40,7 @@ SECTIONS
menu = .;
term_write = .;
term_textmode = .;
term_vbe = .;
term_fallback = .;
stage3_addr = .;
data_begin = .;