Kernel: Lock debug lock while printing fault details
This allows multiprocessor to dump clean output on concurrent faults
This commit is contained in:
parent
4bf7a08c80
commit
99270e96a9
|
@ -245,6 +245,8 @@ namespace Kernel
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug::s_debug_lock.lock();
|
||||||
|
|
||||||
if (PageTable::current().get_page_flags(interrupt_stack->ip & PAGE_ADDR_MASK) & PageTable::Flags::Present)
|
if (PageTable::current().get_page_flags(interrupt_stack->ip & PAGE_ADDR_MASK) & PageTable::Flags::Present)
|
||||||
{
|
{
|
||||||
auto* machine_code = (const uint8_t*)interrupt_stack->ip;
|
auto* machine_code = (const uint8_t*)interrupt_stack->ip;
|
||||||
|
@ -293,6 +295,8 @@ namespace Kernel
|
||||||
PageTable::current().debug_dump();
|
PageTable::current().debug_dump();
|
||||||
Debug::dump_stack_trace();
|
Debug::dump_stack_trace();
|
||||||
|
|
||||||
|
Debug::s_debug_lock.unlock(InterruptState::Disabled);
|
||||||
|
|
||||||
if (tid && Thread::current().is_userspace())
|
if (tid && Thread::current().is_userspace())
|
||||||
{
|
{
|
||||||
// TODO: Confirm and fix the exception to signal mappings
|
// TODO: Confirm and fix the exception to signal mappings
|
||||||
|
|
Loading…
Reference in New Issue