Fix before panic framebuffer

This commit is contained in:
EnderIce2 2024-03-21 01:57:11 +02:00
parent 3a352045ab
commit bd24471748
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -111,22 +111,20 @@ nsa void InitFont()
CPU::Stop();
}
if (FbBeforePanic != nullptr)
KernelAllocator.FreePages(FbBeforePanic, FbPagesBeforePanic);
else
if (FbBeforePanic == nullptr)
{
FbPagesBeforePanic = TO_PAGES(Display->GetSize);
FbBeforePanic = KernelAllocator.RequestPages(FbPagesBeforePanic);
memcpy(FbBeforePanic, Display->GetBuffer, Display->GetSize);
debug("Created before panic framebuffer at %#lx", FbBeforePanic);
}
memcpy(FbBeforePanic, Display->GetBuffer, Display->GetSize);
if (CrashFont == nullptr)
{
if (CrashFont)
return;
CrashFont = new Video::Font(&_binary_files_tamsyn_font_1_11_Tamsyn8x16b_psf_start,
&_binary_files_tamsyn_font_1_11_Tamsyn8x16b_psf_end,
Video::FontType::PCScreenFont2);
}
}
std::atomic<bool> UnrecoverableLock = false;
nsa __noreturn void HandleUnrecoverableException(CPU::ExceptionFrame *Frame)