Compare commits

..

No commits in common. "59d69f684f0962dd0fb0ce2c5954819b8fe735c9" and "f2cc79759989e2dd5024f9ed00989367366a7baa" have entirely different histories.

3 changed files with 1 additions and 20 deletions

View File

@ -28,8 +28,6 @@ extern void setup_idt();
[[noreturn]] void handle_page_fault(Registers* regs) [[noreturn]] void handle_page_fault(Registers* regs)
{ {
CPU::disable_interrupts();
u64 cr2; u64 cr2;
asm volatile("mov %%cr2, %0" : "=r"(cr2)); asm volatile("mov %%cr2, %0" : "=r"(cr2));
kerrorln("Page fault at RIP %lx while accessing %lx!", regs->rip, cr2); kerrorln("Page fault at RIP %lx while accessing %lx!", regs->rip, cr2);
@ -39,17 +37,6 @@ extern void setup_idt();
CPU::efficient_halt(); CPU::efficient_halt();
} }
[[noreturn]] void handle_general_protection_fault(Registers* regs)
{
CPU::disable_interrupts();
kerrorln("General protection fault at RIP %lx, error code %lx!", regs->rip, regs->error);
CPU::print_stack_trace_at(regs);
CPU::efficient_halt();
}
extern "C" void handle_x86_exception(Registers* regs) extern "C" void handle_x86_exception(Registers* regs)
{ {
switch (regs->isr) switch (regs->isr)
@ -65,7 +52,7 @@ extern "C" void handle_x86_exception(Registers* regs)
case 10: FIXME_UNHANDLED_INTERRUPT("Invalid TSS"); case 10: FIXME_UNHANDLED_INTERRUPT("Invalid TSS");
case 11: FIXME_UNHANDLED_INTERRUPT("Segment not present"); case 11: FIXME_UNHANDLED_INTERRUPT("Segment not present");
case 12: FIXME_UNHANDLED_INTERRUPT("Stack-segment fault"); case 12: FIXME_UNHANDLED_INTERRUPT("Stack-segment fault");
case 13: handle_general_protection_fault(regs); case 13: FIXME_UNHANDLED_INTERRUPT("General protection fault");
case 14: handle_page_fault(regs); case 14: handle_page_fault(regs);
case 16: FIXME_UNHANDLED_INTERRUPT("x87 floating-point exception"); case 16: FIXME_UNHANDLED_INTERRUPT("x87 floating-point exception");
case 17: FIXME_UNHANDLED_INTERRUPT("Alignment check"); case 17: FIXME_UNHANDLED_INTERRUPT("Alignment check");

View File

@ -20,7 +20,6 @@ void raw_free(void*);
void* operator new(usize size, const std::nothrow_t&) noexcept; void* operator new(usize size, const std::nothrow_t&) noexcept;
void* operator new[](usize size, const std::nothrow_t&) noexcept; void* operator new[](usize size, const std::nothrow_t&) noexcept;
void operator delete(void* ptr, usize size, std::align_val_t alignment) noexcept;
template <typename T, class... Args> [[nodiscard]] Result<T*> make(Args... args) template <typename T, class... Args> [[nodiscard]] Result<T*> make(Args... args)
{ {

View File

@ -22,9 +22,4 @@ void raw_free(void* ptr)
#else #else
return free(ptr); return free(ptr);
#endif #endif
}
void operator delete(void* ptr, usize size, std::align_val_t) noexcept
{
operator delete(ptr, size);
} }