fix: kernel concurrency, interrupt context, and user VA safety
This commit is contained in:
@@ -70,6 +70,7 @@ void Panic(const char *meditationString, System::PanicFrame* frame) {
|
||||
// showing the other buffer, the panic box would land on an invisible
|
||||
// surface. Safe no-op when the GPU driver is inactive.
|
||||
Drivers::Graphics::IntelGPU::PanicRestoreScanout();
|
||||
Kt::EnablePanicOutput();
|
||||
|
||||
// Header
|
||||
kerr << BOXUI_ANSI_RED_BG << BOXUI_ANSI_WHITE_FG << BOXUI_ANSI_BOLD << "\n";
|
||||
@@ -105,5 +106,11 @@ void Panic(const char *meditationString, System::PanicFrame* frame) {
|
||||
PrintHorizontalEdge(BOXUI_BL, BOXUI_BR);
|
||||
kerr << BOXUI_ANSI_RESET;
|
||||
|
||||
#if defined (__x86_64__)
|
||||
// The framebuffer is write-combining. Drain the final panic text before
|
||||
// halting all forward progress so it cannot remain in a CPU write buffer.
|
||||
asm volatile("sfence" ::: "memory");
|
||||
#endif
|
||||
|
||||
Halt();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user